From 0fcde3f233cc72a47c96efbf83b59d7a59fd433b Mon Sep 17 00:00:00 2001 From: Minijackson Date: Mon, 31 Mar 2025 23:38:47 +0200 Subject: nixvim-dev: remove lsp-lines, migrate ;sd mapping, new ;sT mapping lsp-lines was upstreamed to neovim --- common/nixvim.nix | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'common') 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: colorschemes.melange.enable = true; + diagnostics.virtual_lines = true; + keymaps = let toggle = key: option: { @@ -304,6 +306,30 @@ inputs: action = "Trouble qflist toggle"; options.desc = "Quickfix List (Trouble)"; } + + { + key = "sd"; + action = '' + function() + local new_config = not vim.diagnostic.config().virtual_lines + vim.diagnostic.config({ virtual_lines = new_config }) + end + ''; + mode = "n"; + lua = true; + options.desc = "LSP toggle inline diagnostics"; + } + { + key = "sT"; + action = '' + function() + vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled()) + end + ''; + mode = "n"; + lua = true; + options.desc = "LSP toggle inline text"; + } ]; # TODO: -- cgit v1.2.3