fixed deprecated resolved_capabilities
This commit is contained in:
parent
37b7a68c45
commit
3a0e386252
@ -61,15 +61,15 @@ local on_attach = function(client, bufnr)
|
||||
vim.cmd([[autocmd CursorHold <buffer> lua OpenDiagFloat()]])
|
||||
|
||||
-- Set some keybinds conditional on server capabilities
|
||||
if client.resolved_capabilities.document_formatting then
|
||||
if client.server_capabilities.documentFormattingProvider then
|
||||
buf_set_keymap('n', '<space>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts)
|
||||
end
|
||||
if client.resolved_capabilities.document_range_formatting then
|
||||
if client.server_capabilities.documentRangeFormattingProvider then
|
||||
buf_set_keymap('v', '<space>f', '<esc><cmd>lua vim.lsp.buf.range_formatting()<CR>', opts)
|
||||
end
|
||||
|
||||
-- Set autocommands conditional on server_capabilities
|
||||
if client.resolved_capabilities.document_highlight then
|
||||
if client.server_capabilities.document_highlight then
|
||||
vim.api.nvim_exec(
|
||||
[[
|
||||
hi LspReferenceRead cterm=bold ctermbg=red guibg=DarkGreen
|
||||
|
Loading…
x
Reference in New Issue
Block a user