aboutsummaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorDamjan 9000 <damjan.9000@gmail.com>2024-02-03 23:41:37 +0100
committerDamjan 9000 <damjan.9000@gmail.com>2024-02-03 23:41:37 +0100
commit7d6751539d14e16a2279e411d526e13873b47c29 (patch)
tree108dfdd91c900e4d866e72e6fbd540b82dfb47ca /lua
parent58284c23f2d0622a5864190aa997ac6925b3f591 (diff)
parentbc4ad1218b908ec4efc3b0f6ea6e3cb4940b0084 (diff)
Merge 'upstream/master' feat: added contexts for code action - source fix-all errors
Diffstat (limited to 'lua')
-rw-r--r--lua/lsp-setup.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/lua/lsp-setup.lua b/lua/lsp-setup.lua
index 2675a81..c626df3 100644
--- a/lua/lsp-setup.lua
+++ b/lua/lsp-setup.lua
@@ -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')