Some lsp fixes

This commit is contained in:
Oliver Hartmann 2022-02-28 14:31:25 +01:00
parent 4a076eacd9
commit da4f4674a5

View File

@ -49,6 +49,7 @@ local on_attach = function(client, bufnr)
-- Symbols Outline
buf_set_keymap('n', '<leader>s', '<cmd>SymbolsOutline<cr>', opts)
vim.cmd [[autocmd CursorHold <buffer> lua vim.diagnostic.open_float({focusable = false})]]
-- Set some keybinds conditional on server capabilities
if client.resolved_capabilities.document_formatting then
@ -62,7 +63,6 @@ local on_attach = function(client, bufnr)
if client.resolved_capabilities.document_highlight then
vim.api.nvim_exec([[
hi LspReferenceRead cterm=bold ctermbg=red guibg=DarkGreen
hi LspReferenceText cterm=bold ctermbg=Black guibg=DarkYellow guifg=Black
hi LspReferenceWrite cterm=bold ctermbg=red guibg=DarkRed
augroup lsp_document_highlight
autocmd! * <buffer>