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
|
||||
})
|
||||
|
||||
vim.diagnostic.config({
|
||||
virtual_text = false, -- Turn off inline diagnostics
|
||||
})
|
||||
vim.diagnostic.config({ virtual_text = false}) -- Turn off inline diagnostics
|
||||
|
||||
-- Show all diagnostics on current line in floating window
|
||||
vim.api.nvim_set_keymap(
|
||||
'n', '<Leader>d', ':lua vim.diagnostic.open_float()<CR>',
|
||||
{ noremap = true, silent = true }
|
||||
)
|
||||
vim.api.nvim_set_keymap( 'n', '<Leader>d', ':lua vim.diagnostic.open_float()<CR>', opts)
|
||||
|
||||
-- Go to next diagnostic (if there are multiple on the same line, only shows
|
||||
-- one at a time in the floating window)
|
||||
vim.api.nvim_set_keymap(
|
||||
'n', '<Leader>n', ':lua vim.diagnostic.goto_next()<CR>',
|
||||
{ noremap = true, silent = true }
|
||||
)
|
||||
vim.api.nvim_set_keymap( 'n', '<Leader>n', ':lua vim.diagnostic.goto_next()<CR>', opts)
|
||||
|
||||
-- Go to prev diagnostic (if there are multiple on the same line, only shows
|
||||
-- one at a time in the floating window)
|
||||
vim.api.nvim_set_keymap(
|
||||
'n', '<Leader>p', ':lua vim.diagnostic.goto_prev()<CR>',
|
||||
{ noremap = true, silent = true }
|
||||
)
|
||||
vim.api.nvim_set_keymap( 'n', '<Leader>p', ':lua vim.diagnostic.goto_prev()<CR>', opts)
|
||||
|
||||
-- Use a loop to conveniently call 'setup' on multiple servers and
|
||||
-- map buffer local keybindings when the language server attaches
|
||||
|
Loading…
Reference in New Issue
Block a user