diff options
Diffstat (limited to '.config')
| -rw-r--r-- | .config/hypr/hyprland.conf | 6 | ||||
| -rw-r--r-- | .config/nvim/TODO | 2 | ||||
| -rw-r--r-- | .config/nvim/lua/options.lua | 3 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/glance.lua | 10 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/lspconfig.lua | 19 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/signature.lua | 10 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/trouble.lua | 37 |
7 files changed, 86 insertions, 1 deletions
diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 6a9e9c3..366fe5b 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -10,6 +10,12 @@ env = XCURSOR_THEME,whiteglass exec-once = startup exec-once = hyprctl dispatch workspace 1 +env = XDG_CURRENT_DESKTOP, Hyprland +env = XDG_SESSION_TYPE, wayland +env = XDG_SESSION_DESKTOP, Hyprland +exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP +exec-once = start-xdg-portal-hyprland + input { kb_layout = us kb_options = ctrl:nocaps diff --git a/.config/nvim/TODO b/.config/nvim/TODO index bb924ac..c8cc46a 100644 --- a/.config/nvim/TODO +++ b/.config/nvim/TODO @@ -1,2 +1,4 @@ - save more than one yank (emacs killring like) - undo chunks typed in insert mode +- argument preview in status bar +- next snippet argument diff --git a/.config/nvim/lua/options.lua b/.config/nvim/lua/options.lua index 2010277..9a5901c 100644 --- a/.config/nvim/lua/options.lua +++ b/.config/nvim/lua/options.lua @@ -32,3 +32,6 @@ vim.opt.swapfile = false vim.opt.backup = false vim.opt.undodir = os.getenv("HOME") .. "/.cache/nvim/undodir" vim.opt.undofile = true + +-- misc +vim.opt.updatetime = 700 diff --git a/.config/nvim/lua/plugins/glance.lua b/.config/nvim/lua/plugins/glance.lua new file mode 100644 index 0000000..9c43939 --- /dev/null +++ b/.config/nvim/lua/plugins/glance.lua @@ -0,0 +1,10 @@ +return { + 'dnlhc/glance.nvim', + cmd = 'Glance', + config = function() + require("glance").setup({}) + end, + keys = { + { 'gr', '<CMD>Glance references<CR>' } + } +} diff --git a/.config/nvim/lua/plugins/lspconfig.lua b/.config/nvim/lua/plugins/lspconfig.lua index 2fcfa9b..86194b1 100644 --- a/.config/nvim/lua/plugins/lspconfig.lua +++ b/.config/nvim/lua/plugins/lspconfig.lua @@ -8,7 +8,7 @@ local on_attach = function(client, bufnr) keymap('n', 'gD', vim.lsp.buf.declaration, { desc = 'Go to declaration' }) keymap('n', 'gI', vim.lsp.buf.implementation, { desc = 'Go to implementation' }) keymap('n', 'gy', vim.lsp.buf.type_definition, { desc = 'Go to type definition' }) - keymap('n', 'gr', vim.lsp.buf.references, { desc = 'List references' }) + -- keymap('n', 'gr', vim.lsp.buf.references, { desc = 'List references' }) keymap('n', '<leader>ds', vim.lsp.buf.document_symbol, { desc = 'List document symbols' }) keymap('n', '<leader>ws', vim.lsp.buf.workspace_symbol, { desc = 'List workspace symbols' }) @@ -74,5 +74,22 @@ return { end, } end + + -- Autohighlight symbol under cursor + vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, { + callback = function() + local bufnr = vim.api.nvim_get_current_buf() + if next(vim.lsp.get_clients({ buffer = bufnr })) then + vim.lsp.buf.document_highlight() + end + end, + }) + -- Clear highlights when cursor moves + vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI" }, { + callback = function() + vim.lsp.buf.clear_references() + end, + }) + end } diff --git a/.config/nvim/lua/plugins/signature.lua b/.config/nvim/lua/plugins/signature.lua new file mode 100644 index 0000000..0d0a174 --- /dev/null +++ b/.config/nvim/lua/plugins/signature.lua @@ -0,0 +1,10 @@ +return { + "ray-x/lsp_signature.nvim", + event = "InsertEnter", + opts = { + bind = true, + handler_opts = { + border = "rounded" + } + }, +} diff --git a/.config/nvim/lua/plugins/trouble.lua b/.config/nvim/lua/plugins/trouble.lua new file mode 100644 index 0000000..3741f30 --- /dev/null +++ b/.config/nvim/lua/plugins/trouble.lua @@ -0,0 +1,37 @@ +return { + "folke/trouble.nvim", + opts = {}, -- for default options, refer to the configuration section for custom setup. + cmd = "Trouble", + keys = { + { + "<leader>xx", + "<cmd>Trouble diagnostics toggle<cr>", + desc = "Diagnostics (Trouble)", + }, + { + "<leader>xX", + "<cmd>Trouble diagnostics toggle filter.buf=0<cr>", + desc = "Buffer Diagnostics (Trouble)", + }, + { + "<leader>cs", + "<cmd>Trouble symbols toggle focus=false<cr>", + desc = "Symbols (Trouble)", + }, + { + "<leader>cl", + "<cmd>Trouble lsp toggle focus=false win.position=right<cr>", + desc = "LSP Definitions / references / ... (Trouble)", + }, + { + "<leader>xL", + "<cmd>Trouble loclist toggle<cr>", + desc = "Location List (Trouble)", + }, + { + "<leader>xQ", + "<cmd>Trouble qflist toggle<cr>", + desc = "Quickfix List (Trouble)", + }, + }, +} |
