summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hypr/hypridle.conf2
-rw-r--r--nvim/init.lua1
-rw-r--r--nvim/lua/lsp.lua22
-rw-r--r--nvim/lua/plugins.lua20
-rw-r--r--sh/aliases8
-rw-r--r--zsh/zshenv1
6 files changed, 50 insertions, 4 deletions
diff --git a/hypr/hypridle.conf b/hypr/hypridle.conf
index 8e87946..2983bf9 100644
--- a/hypr/hypridle.conf
+++ b/hypr/hypridle.conf
@@ -6,7 +6,7 @@ general {
listener {
timeout = 150 # 2.5min.
- on-timeout = brightnessctl -s set 10 # set monitor backlight to minimum, avoid 0 on OLED monitor.
+ on-timeout = brightnessctl set 0 # set monitor backlight to minimum, avoid 0 on OLED monitor.
on-resume = brightnessctl -r # monitor backlight restore.
}
diff --git a/nvim/init.lua b/nvim/init.lua
index cf11420..4b295d5 100644
--- a/nvim/init.lua
+++ b/nvim/init.lua
@@ -1,5 +1,6 @@
require('options')
require('keymaps')
+require('lsp')
require('plugins')
require('colorscheme')
require('term')
diff --git a/nvim/lua/lsp.lua b/nvim/lua/lsp.lua
new file mode 100644
index 0000000..343c76b
--- /dev/null
+++ b/nvim/lua/lsp.lua
@@ -0,0 +1,22 @@
+-- Remove Global Default Key mapping
+vim.keymap.del("n", "grn")
+vim.keymap.del("n", "gra")
+vim.keymap.del("n", "grr")
+vim.keymap.del("n", "gri")
+vim.keymap.del("n", "gO")
+
+-- Create keymapping
+-- LspAttach: After an LSP Client performs "initialize" and attaches to a buffer.
+vim.api.nvim_create_autocmd("LspAttach", {
+ callback = function(args)
+ local keymap = vim.keymap
+ local lsp = vim.lsp
+ local bufopts = { noremap = true, silent = true }
+
+ keymap.set("n", "gr", lsp.buf.references, bufopts)
+ keymap.set("n", "gd", lsp.buf.definition, bufopts)
+ keymap.set("n", "<space>rn", lsp.buf.rename, bufopts)
+ keymap.set("n", "K", lsp.buf.hover, bufopts)
+ keymap.set("n", "<space>f", lsp.buf.format, bufopts)
+ end
+})
diff --git a/nvim/lua/plugins.lua b/nvim/lua/plugins.lua
index 0801939..8056494 100644
--- a/nvim/lua/plugins.lua
+++ b/nvim/lua/plugins.lua
@@ -12,6 +12,26 @@ end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
+ -- LSP manager
+ { "mason-org/mason.nvim", opts = {} },
+ {
+ "mason-org/mason-lspconfig.nvim",
+ dependencies = {
+ "mason-org/mason.nvim",
+ "neovim/nvim-lspconfig",
+ },
+ opts = {
+ ensure_installed = { "pylsp", "clangd", "rust_analyzer", "zls" },
+ },
+ },
+ {
+ "neovim/nvim-lspconfig",
+ config = function()
+ local lspconfig = require("lspconfig")
+
+ lspconfig.pylsp.setup({})
+ end,
+ },
"tanvirtin/monokai.nvim",
'preservim/nerdtree',
'ziglang/zig.vim',
diff --git a/sh/aliases b/sh/aliases
index ca8106e..4fc427f 100644
--- a/sh/aliases
+++ b/sh/aliases
@@ -18,12 +18,14 @@ case `uname -s` in
alias ls="ls -h"
;;
"Linux")
- alias ls="ls -h $COLOR_FLAGS_GNU"
+ #alias ls="ls -h $COLOR_FLAGS_GNU"
+ alias ls="eza"
;;
esac
alias ll='ls -l'
-alias la='ls -A'
-alias lla='ls -lA'
+alias lt='ls -l --total-size'
+alias la='ls -a'
+alias lla='ls -la'
alias lb='lsblk'
alias md='mkdir -p'
alias ch='cd $HOME'
diff --git a/zsh/zshenv b/zsh/zshenv
index df0371e..3719ef4 100644
--- a/zsh/zshenv
+++ b/zsh/zshenv
@@ -2,5 +2,6 @@
unset HISTFILE
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
export skip_global_compinit=1
+fpath=($XDG_CONFIG_HOME/functions $fpath)
[ -f /etc/profile ] && . /etc/profile
[ -f "$XDG_CONFIG_HOME/sh/profile" ] && . "$XDG_CONFIG_HOME/sh/profile"