Merge 'upstream/master' feat: added contexts for code action - source fix-all errors

This commit is contained in:
Damjan 9000 2024-02-03 23:41:37 +01:00
commit 7d6751539d

View File

@ -16,7 +16,9 @@ local on_attach = function(_, bufnr)
end
nmap('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
nmap('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
nmap('<leader>ca', function()
vim.lsp.buf.code_action { context = { only = { 'quickfix', 'refactor', 'source' } } }
end, '[C]ode [A]ction')
nmap('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
nmap('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')