diff options
| author | Kyren223 <ulmliad223@gmail.com> | 2024-07-29 17:15:29 +0300 |
|---|---|---|
| committer | Kyren223 <ulmliad223@gmail.com> | 2024-07-29 17:15:29 +0300 |
| commit | 5d609cf73679f9d630a858603dd65137fb07e4fe (patch) | |
| tree | 31befaf86f186ef27069f99f28dc0bb953f67d89 /.config/nvim | |
| parent | 30751966c01d57dd24b0c1992d8ffb78a73f4928 (diff) | |
feat(neovim): added tiny-inline-diagnostics and disabled lsp_lines
Diffstat (limited to '.config/nvim')
| -rw-r--r-- | .config/nvim/lua/custom/plugins/lsp-lines.lua | 3 | ||||
| -rw-r--r-- | .config/nvim/lua/custom/plugins/tiny-inline-diagnostic.lua | 24 |
2 files changed, 26 insertions, 1 deletions
diff --git a/.config/nvim/lua/custom/plugins/lsp-lines.lua b/.config/nvim/lua/custom/plugins/lsp-lines.lua index 4975f48..9240777 100644 --- a/.config/nvim/lua/custom/plugins/lsp-lines.lua +++ b/.config/nvim/lua/custom/plugins/lsp-lines.lua @@ -2,9 +2,10 @@ return { -- NOTE: [Good alternative](https://github.com/rachartier/tiny-inline-diagnostic.nvim) -- although, this plugin is amazing, so I wouldn't switch it most likely 'https://git.sr.ht/~whynothugo/lsp_lines.nvim', - event = 'LspAttach', + event = 'VeryLazy', config = function() require('lsp_lines').setup() + vim.diagnostic.config({ virtual_lines = false }) vim.keymap.set('n', '<Leader>dt', require('lsp_lines').toggle, { desc = '[D]iagnostics [T]oggle inline' }) end, } diff --git a/.config/nvim/lua/custom/plugins/tiny-inline-diagnostic.lua b/.config/nvim/lua/custom/plugins/tiny-inline-diagnostic.lua new file mode 100644 index 0000000..930ba95 --- /dev/null +++ b/.config/nvim/lua/custom/plugins/tiny-inline-diagnostic.lua @@ -0,0 +1,24 @@ +return { + 'rachartier/tiny-inline-diagnostic.nvim', + event = 'VeryLazy', + opts = { + options = { + -- Throttle the update of the diagnostic when moving cursor, in milliseconds. + -- You can increase it if you have performance issues. + -- Or set it to 0 to have better visuals. + throttle = 0, + + -- The minimum length of the message, otherwise it will be on a new line. + softwrap = 15, + + -- If multiple diagnostics are under the cursor, display all of them. + multiple_diag_under_cursor = true, + + --- Enable it if you want to always have message with `after` characters length. + break_line = { + enabled = false, + after = 30, + }, + }, + }, +} |
