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 Multi Config Support #62

Closed JateNensvold closed 2 months ago

JateNensvold commented 3 months ago

Adds functionality discussed in https://github.com/davidmh/cspell.nvim/issues/61

davidmh commented 3 months ago

Hi @JateNensvold the idea makes sense, before I take a deeper look, could you address the failing tests?

JateNensvold commented 3 months ago

Yeah! The cspell.nvim tests were actually passing before my last commit, I must have forgotten to recheck after my last change. Ill take a look as soon as I have some free time this weekend and ensure they are passing in the next commit as well as address the commit message/lua style failures.

JateNensvold commented 3 months ago

Sorry for the delay. I addressed the failures that I saw in the approval workflows and they should be passing based on what I see locally.

I expect there might be some more changes needed based on your thoughts on some of the rewrites I did to some of the core helper functionality to add support for multi config and configs outside the project directory.

JateNensvold commented 3 months ago

I also noticed it this message every time I start a neovim session:

Created a new cspell.json file at $HOME/.cache/nvim/cspell.nvim/cspell.json

Looks like the file is created unconditionally every time. That doesn't sound right.

Looks like this was an unintended side effect of creating a merged cspell config that imports the other configs. I added some additional checks so the config gets/cached on disk, and is only recreated when additional config(s) have been added to the nvim setup.

davidmh commented 3 months ago

I'll give it another look later this week.