Skip to content

Commit

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

* feat: added contexts for code action - source fix-all errors

* fix: resolve stylua checks

* fix: resolve stylua checks
  • Loading branch information
micaiah-effiong authored and Thomas Briand committed Mar 8, 2024
1 parent 8979db2 commit cbf747f
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 @@ -518,7 +518,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 cbf747f

Please sign in to comment.