From be9bd648b87fb0f6e1695c765a2a057244ec16e5 Mon Sep 17 00:00:00 2001 From: KeeganForelight Date: Thu, 13 Apr 2023 16:14:44 -0400 Subject: [PATCH] testing regular lsp attach --- config/init.lua | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/config/init.lua b/config/init.lua index d240131..3b39445 100644 --- a/config/init.lua +++ b/config/init.lua @@ -133,13 +133,6 @@ vim.api.nvim_create_autocmd('LspAttach', { -- key mappings local opts = { buffer = ev.buf, - noremap = true, - focusable = false, - border = 'rounded', - source = 'always', - prefix = ' ', - scope = 'cursor', - close_events = { "BufLeave","CursorMoved","InsertEnter","FocusLost" }, } -- error viewing vim.keymap.set('n', 'e', vim.diagnostic.open_float, opts) @@ -152,10 +145,20 @@ vim.api.nvim_create_autocmd('LspAttach', { vim.keymap.set('n', 'H', vim.lsp.buf.hover, opts) -- auto hover for error viewing vim.api.nvim_create_autocmd("CursorHold", { - callback = function() - vim.diagnostic.open_float(nil, opts) - end - }) + opts = { + buffer = ev.buf, + noremap = true, + focusable = false, + border = 'rounded', + source = 'always', + prefix = ' ', + scope = 'cursor', + close_events = { "BufLeave","CursorMoved","InsertEnter","FocusLost" } + }, + callback = function() + vim.diagnostic.open_float(nil, opts) + end + }) -- local opts = { buffer = ev.buf } -- -- error viewing -- vim.keymap.set('n', 'e', vim.diagnostic.open_float, opts)