From faa8ae6d1eaacc6651634360d82838276658aaf0 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 25 Feb 2022 18:21:35 +0100 Subject: [PATCH] home: vim: add 'lsp_lines' I dislike the diagnostics *next* to affected lines. This looks neater, though the best look would be a simple hover window or status line message instead, like ALE used to do. It might grow on me however. --- home/vim/default.nix | 1 + home/vim/plugin/settings/lsp_lines.vim | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 home/vim/plugin/settings/lsp_lines.vim diff --git a/home/vim/default.nix b/home/vim/default.nix index 9fac4c6..574b01e 100644 --- a/home/vim/default.nix +++ b/home/vim/default.nix @@ -64,6 +64,7 @@ in # LSP and linting lightline-lsp + lsp_lines-nvim # Show diagnostics *over* regions null-ls-nvim # LSP integration for linters and formatters plenary-nvim # 'null-ls' dependency ]; diff --git a/home/vim/plugin/settings/lsp_lines.vim b/home/vim/plugin/settings/lsp_lines.vim new file mode 100644 index 0000000..10b46a3 --- /dev/null +++ b/home/vim/plugin/settings/lsp_lines.vim @@ -0,0 +1,9 @@ +lua << EOF +-- Show LSP diagnostics on virtual lines over affected regions +require("lsp_lines").register_lsp_virtual_lines() + +-- Disable virtual test next to affected regions +vim.diagnostic.config({ + virtual_text = false, +}) +EOF