AstroNvim / astrocommunity

A community repository of common plugin specifications
GNU General Public License v3.0
1.04k stars 214 forks source link

coc-nvim: better integration #942

Closed wroyca closed 2 months ago

wroyca commented 2 months ago

📑 Description

This PR is a draft to add better defaults to coc.nvim and fix some compatibilities with plugins (e.g. Neodev). There's a lot of area that I'm not sure how to approach due to AstroNvim abstraction, so if anyone wants to review, it's probably best to go ahead by pushing commits directly on the PR without worries, I will sync and rebase locally

Remaining things to do:

ℹ Additional Information

github-actions[bot] commented 2 months ago

Review Checklist

Does this PR follow the [Contribution Guidelines](development guidelines)? Following is a partial checklist:

Proper conventional commit scoping:

mehalter commented 2 months ago

This is not a good approach because of this notice: https://github.com/neoclide/coc.nvim/blob/master/doc/coc.txt#L1843-L1845

Note: those configuration would overwrite the configuration from the user's settings file, unless you have to use some dynamic variables, using the settings file is recommended.

This is not a good approach for configuration for a shared configuration that users can override.

Also the interaction with neodev is also incorrect. Part of the advantage of neodev is that it doesn't mess up the lua language server for non-neovim lua projects which this setup would do as well. It would be nice to add good integration in the language packs for coc but as it stands currently and the way coc.nvim is configured it is highly not recommended to do it this way especially in an environment where people will want to change values.

wroyca commented 2 months ago

This is not a good approach because of this notice: https://github.com/neoclide/coc.nvim/blob/master/doc/coc.txt#L1843-L1845

Note: those configuration would overwrite the configuration from the user's settings file, unless you have to use some dynamic variables, using the settings file is recommended.

This is not a good approach for configuration for a shared configuration that users can override.

Also the interaction with neodev is also incorrect. Part of the advantage of neodev is that it doesn't mess up the lua language server for non-neovim lua projects which this setup would do as well. It would be nice to add good integration in the language packs for coc but as it stands currently and the way coc.nvim is configured it is highly not recommended to do it this way especially in an environment where people will want to change values.

Make sense, unfortunate that user configuration doesn't override, thank for the review!