Change deprecated commands

pull/208/head
JimKarpodinis 2 years ago
parent 0981b28382
commit c859686d36

@ -121,6 +121,7 @@ cmp.setup {
behavior = cmp.ConfirmBehavior.Replace, behavior = cmp.ConfirmBehavior.Replace,
select = false, select = false,
}, },
window = {
documentation = { documentation = {
border = { "", "", "", "", "", "", "", "" }, border = { "", "", "", "", "", "", "", "" },
}, },
@ -128,4 +129,5 @@ cmp.setup {
ghost_text = false, ghost_text = false,
native_menu = false, native_menu = false,
}, },
},
} }

@ -1,6 +1,6 @@
vim.cmd [[ vim.cmd [[
try try
colorscheme darkplus colorscheme evening
catch /^Vim\%((\a\+)\)\=:E185/ catch /^Vim\%((\a\+)\)\=:E185/
colorscheme default colorscheme default
set background=dark set background=dark

@ -46,8 +46,8 @@ end
local function lsp_highlight_document(client) local function lsp_highlight_document(client)
-- Set autocommands conditional on server_capabilities -- Set autocommands conditional on server_capabilities
if client.resolved_capabilities.document_highlight then if client.server_capabilities.documentFormattingProvider then
vim.api.nvim_exec( vim.api.nvim_exec(
[[ [[
augroup lsp_document_highlight augroup lsp_document_highlight
autocmd! * <buffer> autocmd! * <buffer>
@ -76,7 +76,7 @@ local function lsp_keymaps(bufnr)
bufnr, bufnr,
"n", "n",
"gl", "gl",
'<cmd>lua vim.lsp.diagnostic.show_line_diagnostics({ border = "rounded" })<CR>', '<cmd>lua vim.diagnostic.open_float({ border = "rounded" })<CR>',
opts opts
) )
vim.api.nvim_buf_set_keymap(bufnr, "n", "]d", '<cmd>lua vim.diagnostic.goto_next({ border = "rounded" })<CR>', opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "]d", '<cmd>lua vim.diagnostic.goto_next({ border = "rounded" })<CR>', opts)
@ -86,7 +86,7 @@ end
M.on_attach = function(client, bufnr) M.on_attach = function(client, bufnr)
if client.name == "tsserver" then if client.name == "tsserver" then
client.resolved_capabilities.document_formatting = false client.server_capabilities.documentFormattingProvider = false
end end
lsp_keymaps(bufnr) lsp_keymaps(bufnr)
lsp_highlight_document(client) lsp_highlight_document(client)

Loading…
Cancel
Save