testing regular lsp attach

main
KeeganForelight 2 years ago
parent be9bd648b8
commit e9628aa329

@ -131,9 +131,7 @@ vim.diagnostic.config({
vim.api.nvim_create_autocmd('LspAttach', {
callback = function(ev)
-- key mappings
local opts = {
buffer = ev.buf,
}
local opts = { buffer = ev.buf,}
-- error viewing
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, opts)
vim.keymap.set('n', '<leader>[d', vim.diagnostic.goto_prev, opts)
@ -145,20 +143,19 @@ vim.api.nvim_create_autocmd('LspAttach', {
vim.keymap.set('n', '<leader>H', vim.lsp.buf.hover, opts)
-- auto hover for error viewing
vim.api.nvim_create_autocmd("CursorHold", {
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
})
callback = function()
opts = {
buffer = ev.buf,
focusable = false,
border = 'rounded',
source = 'always',
prefix = ' ',
scope = 'cursor',
close_events = { "BufLeave","CursorMoved","InsertEnter","FocusLost" },
}
vim.diagnostic.open_float(nil, opts)
end
})
-- local opts = { buffer = ev.buf }
-- -- error viewing
-- vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, opts)

Loading…
Cancel
Save