diff options
Diffstat (limited to 'lua/plugins/lsp.lua')
| -rw-r--r-- | lua/plugins/lsp.lua | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 68da19a..6ad37c3 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -33,6 +33,25 @@ return { local hl = "DiagnosticSign" .. type vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl }) end + vim.diagnostic.config({ + update_in_insert = true, + virtual_text = false, + }) + vim.api.nvim_create_autocmd("CursorHold", { + buffer = bufnr, + callback = function() + local opts = { + header = '', + source = 'always', + border = {{' '},{' '},{' '},{' '}}, + focusable = false, + close_events = { "BufLeave", "CursorMoved", "InsertEnter", }, + prefix = ' ', + scope = 'cursor', + } + vim.diagnostic.open_float(nil, opts) + end + }) end, }, } |
