diff options
| author | Micah Effiong <52747707+micaiah-effiong@users.noreply.github.com> | 2024-02-02 21:24:46 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-02 15:24:46 -0500 |
| commit | 90ef2afcfacd1ee1aa7de14401c25eea9a226931 (patch) | |
| tree | 33a332f72690395c4a7e506f5dfd9ad48a5fb578 /nvim/init.lua | |
| parent | 82746c2032e79c5093f391b7fd103add8887b5fd (diff) | |
| download | dots-90ef2afcfacd1ee1aa7de14401c25eea9a226931.tar.gz | |
feat: added contexts for code action - source fix-all errors (#599)
* feat: added contexts for code action - source fix-all errors
* fix: resolve stylua checks
* fix: resolve stylua checks
Diffstat (limited to 'nvim/init.lua')
| -rw-r--r-- | nvim/init.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nvim/init.lua b/nvim/init.lua index 6c6ae02..c7e6400 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -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') |