shorten keybind expressions
This commit is contained in:
parent
2544f1130f
commit
d26fa59d72
22
vimrc.lua
22
vimrc.lua
@ -107,26 +107,18 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
|||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({ virtual_text = false}) -- Turn off inline diagnostics
|
||||||
virtual_text = false, -- Turn off inline diagnostics
|
|
||||||
})
|
|
||||||
-- Show all diagnostics on current line in floating window
|
-- Show all diagnostics on current line in floating window
|
||||||
vim.api.nvim_set_keymap(
|
vim.api.nvim_set_keymap( 'n', '<Leader>d', ':lua vim.diagnostic.open_float()<CR>', opts)
|
||||||
'n', '<Leader>d', ':lua vim.diagnostic.open_float()<CR>',
|
|
||||||
{ noremap = true, silent = true }
|
|
||||||
)
|
|
||||||
-- Go to next diagnostic (if there are multiple on the same line, only shows
|
-- Go to next diagnostic (if there are multiple on the same line, only shows
|
||||||
-- one at a time in the floating window)
|
-- one at a time in the floating window)
|
||||||
vim.api.nvim_set_keymap(
|
vim.api.nvim_set_keymap( 'n', '<Leader>n', ':lua vim.diagnostic.goto_next()<CR>', opts)
|
||||||
'n', '<Leader>n', ':lua vim.diagnostic.goto_next()<CR>',
|
|
||||||
{ noremap = true, silent = true }
|
|
||||||
)
|
|
||||||
-- Go to prev diagnostic (if there are multiple on the same line, only shows
|
-- Go to prev diagnostic (if there are multiple on the same line, only shows
|
||||||
-- one at a time in the floating window)
|
-- one at a time in the floating window)
|
||||||
vim.api.nvim_set_keymap(
|
vim.api.nvim_set_keymap( 'n', '<Leader>p', ':lua vim.diagnostic.goto_prev()<CR>', opts)
|
||||||
'n', '<Leader>p', ':lua vim.diagnostic.goto_prev()<CR>',
|
|
||||||
{ noremap = true, silent = true }
|
|
||||||
)
|
|
||||||
|
|
||||||
-- Use a loop to conveniently call 'setup' on multiple servers and
|
-- Use a loop to conveniently call 'setup' on multiple servers and
|
||||||
-- map buffer local keybindings when the language server attaches
|
-- map buffer local keybindings when the language server attaches
|
||||||
|
Loading…
Reference in New Issue
Block a user