diff options
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/plugins/lsp_lines.lua | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lua/plugins/lsp_lines.lua b/lua/plugins/lsp_lines.lua new file mode 100644 index 0000000..5adcb8e --- /dev/null +++ b/lua/plugins/lsp_lines.lua @@ -0,0 +1,21 @@ +local status_ok, lsp_lines = pcall(require, "lsp_lines") +if not status_ok then + return +end + +lsp_lines.setup() + +vim.keymap.set("n", "g?", function() + local lines_enabled = not vim.diagnostic.config().virtual_lines + vim.diagnostic.config( + { + virtual_lines = lines_enabled, + virtual_text = not lines_enabled + } + ) +end, { noremap = true, silent = true }) + +vim.diagnostic.config({ + virtual_text = true, + virtual_lines = false +}) |
