mirror of
https://github.com/cap153/nvim.git
synced 2025-12-27 03:34:57 +08:00
Update lspconfig.lua
This commit is contained in:
parent
0927c2e32d
commit
fff244d85a
1 changed files with 1 additions and 1 deletions
|
|
@ -33,7 +33,7 @@ return {
|
|||
vim.keymap.set('n', 'go', vim.lsp.buf.type_definition, opts) -- go跳转到变量类型定义的位置
|
||||
vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts) -- gr跳转到引用了对应变量或函数的位置
|
||||
vim.keymap.set('n', '<leader>rn', vim.lsp.buf.rename, opts) -- <space>rn变量重命名
|
||||
vim.keymap.set({ 'n', 'x' }, '<leader>f', function() vim.lsp.buf.format({ async = true }) end, opts) -- <space>f进行代码格式化
|
||||
-- vim.keymap.set({ 'n', 'x' }, '<leader>f', function() vim.lsp.buf.format({ async = true }) end, opts) -- <space>f进行代码格式化
|
||||
vim.keymap.set('n', '<leader>aw', vim.lsp.buf.code_action, opts) -- <space>aw可以在出现警告或错误的地方打开建议的修复方法
|
||||
vim.keymap.set('n', '<leader>d', vim.diagnostic.open_float, opts) -- <space>d浮动窗口显示所在行警告或错误信息
|
||||
vim.keymap.set('n', '<leader>-', vim.diagnostic.goto_prev, opts) -- <space>-跳转到上一处警告或错误的地方
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue