nvim: add some key mappings for LSP

This commit is contained in:
tastytea 2022-08-08 14:52:28 +02:00
parent c69624e00e
commit d9df2ff4ac
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
3 changed files with 3 additions and 1 deletions

View File

@ -4,8 +4,10 @@ require('keymaps')
use {
'https://github.com/neovim/nvim-lspconfig',
config = function()
map('n', '<space>e', vim.diagnostic.open_float)
map('n', '<f5>', vim.diagnostic.goto_prev)
map('n', '<f6>', vim.diagnostic.goto_next)
map('n', '<space>q', vim.diagnostic.setloclist)
-- Only map the following keys after the language server attaches to the
-- current buffer

View File

@ -20,6 +20,7 @@ use {
}
use 'https://github.com/L3MON4D3/LuaSnip'
-- compile and install new plugins when this file is saved
vim.cmd([[
augroup packer_user_config
autocmd!

View File

@ -36,4 +36,3 @@ vim.api.nvim_create_autocmd(
command = 'lua remove_trailing_whitespace()'
}
)