diff options
author | ZachIR <zachir@librem.one> | 2025-06-29 13:45:59 -0500 |
---|---|---|
committer | ZachIR <zachir@librem.one> | 2025-06-29 13:45:59 -0500 |
commit | 899c83d0d917e29ff4fe38f8e5186edcbaa30d71 (patch) | |
tree | 9dccd4740553a8f0dfe5629934a35727d52e382b | |
parent | 8ae73b338403d45c6075639e0b61d2cae9ac4f3e (diff) | |
parent | 9f80bcde3c3ff4e35be9aaeda800ed4bed2f174c (diff) |
Merge branch 'master' into car
-rw-r--r-- | hypr/hypridle.conf | 2 | ||||
-rw-r--r-- | nvim/init.lua | 1 | ||||
-rw-r--r-- | nvim/lua/lsp.lua | 22 | ||||
-rw-r--r-- | nvim/lua/plugins.lua | 20 | ||||
-rw-r--r-- | sh/aliases | 8 | ||||
-rw-r--r-- | zsh/zshenv | 1 |
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', @@ -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' @@ -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" |