Skip to content

Commit

Permalink
feat: added contexts for code action - source fix-all errors (#599)
Browse files Browse the repository at this point in the history
* feat: added contexts for code action - source fix-all errors

* fix: resolve stylua checks

* fix: resolve stylua checks
  • Loading branch information
micaiah-effiong authored Feb 2, 2024
1 parent c3ae716 commit bc4ad12
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,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')
Expand Down

0 comments on commit bc4ad12

Please sign in to comment.