diff options
| author | srdusr <trevorgray@srdusr.com> | 2023-05-06 20:37:54 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2023-05-06 20:37:54 +0200 |
| commit | 8dfd2e2ac634c30a2411f3e8c8ac4ae4c6a0c163 (patch) | |
| tree | f997f0bc58142a7c52e70eb5877efbb30150527c | |
| parent | 36c2f520a387176996c6082bf0e6e31c49eec278 (diff) | |
| download | dotfiles-8dfd2e2ac634c30a2411f3e8c8ac4ae4c6a0c163.tar.gz dotfiles-8dfd2e2ac634c30a2411f3e8c8ac4ae4c6a0c163.zip | |
Add lsp_lines.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 +}) |
