nvim: replace deprecated lsp, fix keymaps

This commit is contained in:
TheK4n 2023-02-25 13:48:31 +03:00
parent 6b2496f7a2
commit e3503d3070
3 changed files with 8 additions and 2 deletions

View File

@ -39,7 +39,7 @@ end
-- Use a loop to conveniently call 'setup' on multiple servers and
-- map buffer local keybindings when the language server attaches
local servers = { 'pyright', 'sumneko_lua', 'rust_analyzer' }
local servers = { 'pyright', 'lua_ls', 'rust_analyzer' }
for _, lsp in ipairs(servers) do
nvim_lsp[lsp].setup {
on_attach = on_attach,

View File

@ -27,7 +27,12 @@ map('n', '<Enter>', 'o<ESC>', opts)
map('n', '<Space>', 'O<ESC>', opts)
-- x to blackhole
map('n', 'x', '"_x', opts)
map({'n', 'v'}, 'x', '"_x', opts)
-- Put without overwrite yanked text
map('x', 'p', 'P', opts)
-- Increment/decrement
map('n', '+', '<C-a>', opts)

View File

@ -9,6 +9,7 @@ opt.number = true
opt.relativenumber = true
opt.clipboard:append { 'unnamed' }
opt.clipboard:append { 'unnamedplus' }
opt.shm = opt.shm["_value"] .. "I" -- disable startup message