@@ -324,7 +324,7 @@ vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = tr
324
324
vim .keymap .set (' n' , ' [d' , vim .diagnostic .goto_prev , { desc = ' Go to previous diagnostic message' })
325
325
vim .keymap .set (' n' , ' ]d' , vim .diagnostic .goto_next , { desc = ' Go to next diagnostic message' })
326
326
vim .keymap .set (' n' , ' <leader>e' , vim .diagnostic .open_float , { desc = ' Open floating diagnostic message' })
327
- vim .keymap .set (' n' , ' <leader>q ' , vim .diagnostic .setloclist , { desc = ' Open diagnostics list' })
327
+ vim .keymap .set (' n' , ' <leader>ql ' , vim .diagnostic .setloclist , { desc = ' Open diagnostics list' })
328
328
329
329
-- [[ Highlight on yank ]]
330
330
-- See `:help vim.highlight.on_yank()`
@@ -535,6 +535,14 @@ local on_attach = function(_, bufnr)
535
535
vim .api .nvim_buf_create_user_command (bufnr , ' Format' , function (_ )
536
536
vim .lsp .buf .format ()
537
537
end , { desc = ' Format current buffer with LSP' })
538
+
539
+ local function quickfix ()
540
+ vim .lsp .buf .code_action ({
541
+ filter = function (a ) return a .isPreferred end ,
542
+ apply = true
543
+ })
544
+ end
545
+ vim .keymap .set (' n' , ' <leader>qf' , quickfix , { buffer = bufnr , noremap = true , silent = true , desc = ' LSP: [Q]uick [F]ix' })
538
546
end
539
547
540
548
-- document existing key chains
0 commit comments