nvim: replace deprecated lsp, fix keymaps
This commit is contained in:
parent
6b2496f7a2
commit
e3503d3070
@ -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,
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user