diff options
author | Minijackson <minijackson@riseup.net> | 2025-03-31 23:38:47 +0200 |
---|---|---|
committer | Minijackson <minijackson@riseup.net> | 2025-03-31 23:38:47 +0200 |
commit | 0fcde3f233cc72a47c96efbf83b59d7a59fd433b (patch) | |
tree | 4bcea293a034b639b0e77977f40019410c7b630f /common/nixvim.nix | |
parent | 5eaa5212a5b55819bcf7027dcd01080a7dbf0532 (diff) | |
download | nixos-config-reborn-0fcde3f233cc72a47c96efbf83b59d7a59fd433b.tar.gz nixos-config-reborn-0fcde3f233cc72a47c96efbf83b59d7a59fd433b.zip |
nixvim-dev: remove lsp-lines, migrate ;sd mapping, new ;sT mapping
lsp-lines was upstreamed to neovim
Diffstat (limited to 'common/nixvim.nix')
-rw-r--r-- | common/nixvim.nix | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/common/nixvim.nix b/common/nixvim.nix index 768540e..abcd4d6 100644 --- a/common/nixvim.nix +++ b/common/nixvim.nix | |||
@@ -65,6 +65,8 @@ inputs: | |||
65 | 65 | ||
66 | colorschemes.melange.enable = true; | 66 | colorschemes.melange.enable = true; |
67 | 67 | ||
68 | diagnostics.virtual_lines = true; | ||
69 | |||
68 | keymaps = | 70 | keymaps = |
69 | let | 71 | let |
70 | toggle = key: option: { | 72 | toggle = key: option: { |
@@ -304,6 +306,30 @@ inputs: | |||
304 | action = "<cmd>Trouble qflist toggle<cr>"; | 306 | action = "<cmd>Trouble qflist toggle<cr>"; |
305 | options.desc = "Quickfix List (Trouble)"; | 307 | options.desc = "Quickfix List (Trouble)"; |
306 | } | 308 | } |
309 | |||
310 | { | ||
311 | key = "<leader>sd"; | ||
312 | action = '' | ||
313 | function() | ||
314 | local new_config = not vim.diagnostic.config().virtual_lines | ||
315 | vim.diagnostic.config({ virtual_lines = new_config }) | ||
316 | end | ||
317 | ''; | ||
318 | mode = "n"; | ||
319 | lua = true; | ||
320 | options.desc = "LSP toggle inline diagnostics"; | ||
321 | } | ||
322 | { | ||
323 | key = "<leader>sT"; | ||
324 | action = '' | ||
325 | function() | ||
326 | vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled()) | ||
327 | end | ||
328 | ''; | ||
329 | mode = "n"; | ||
330 | lua = true; | ||
331 | options.desc = "LSP toggle inline text"; | ||
332 | } | ||
307 | ]; | 333 | ]; |
308 | 334 | ||
309 | # TODO: | 335 | # TODO: |