davidmh / cspell.nvim

A companion plugin for null-ls/none-ls, adding support for CSpell diagnostics and code actions.
85 stars 15 forks source link

CSpell code actions not applied in gitcommit #65

Closed snikoletopoulos closed 1 month ago

snikoletopoulos commented 1 month ago

Describe the bug When using cspell with none-ls I added as extra_filetypes the gitcommit filetype. Diagnostics work fine. However, code actions are not available to fix spelling mistakes.

none-ls info shows cspell attached for diagnostics and code actions.

To Reproduce

  1. Add cspell code actions and diagnostics to none-ls
  2. Add a .with to each and add extra_filetypes = { "gitcommit" }
  3. Run git commit and type a misspelled word
davidmh commented 1 month ago

Hi @snikoletopoulos,

I'm not able to reproduce the issue, I've tried with both my personal configuration:

https://github.com/user-attachments/assets/90948490-a256-4c72-af9e-60baf4ea3ba7

And the minimal configuration described in this repo:

https://github.com/user-attachments/assets/1e5843c2-01bb-46d9-9508-3da670ced657

Could you try to reproduce using the minimal init example? Also, which neovim version are you using?

snikoletopoulos commented 1 month ago

Thank you for taking the time to investigate this. I'm using version v0.10.1 I'll try the repo you linked on Sunday probably.

snikoletopoulos commented 1 month ago

So i tried it with the minimal config, and can confirm it works. Sorry for the inconvenience.

Do you have any guiding points for how to debug my config to see why it is not working? None-ls is attached with cspell attached for diagnostics and code actions but I get no code actions.

davidmh commented 1 month ago

That's great news, I would start by checking if other null-ls linters have the same problem, if they don't, then I would put vim.notify calls as debug messages through the different callbacks for the code actions in the plugin's config see:

Those callbacks happen after the action gets executed, that's just a way to see if the actions are coming through.

If you see the messages but the action is not applied to the current buffer, I would look into any plugins that may have control over the current buffer.

davidmh commented 1 month ago

If none of that works, I would try bisecting your neovim config to narrow down from your whole config.