fixing virtual sort

This commit is contained in:
KeeganForelight 2023-04-13 15:33:13 -04:00
parent 63b960cad2
commit 88a520f7c0

View File

@ -87,6 +87,29 @@ lspconfig.pylsp.setup{}
-- TypeScript
lspconfig.tsserver.setup{}
-- Fix virtual text going off screen
vim.diagnostic.config({
virtual_text = false,
signs = true,
underline = true,
update_in_insert = false,
severity_sort = true,
})
vim.api.nvim_create_autocmd("CursorHold", {
buffer = bufnr,
callback = function()
local opts = {
focusable = false,
close_events = { "BufLeave", "CursorMoved", "InsertEnter", "FocusLost" },
border = 'rounded',
source = 'always',
prefix = ' ',
scope = 'cursor',
}
vim.diagnostic.open_float(nil, opts)
end
})
-- lsp mappingsd
vim.keymap.set('n', '<leader>gD', vim.lsp.buf.declaration, opts)
vim.keymap.set('n', '<leader>gd', vim.lsp.buf.definition, opts)