valentjn / vscode-ltex

LTeX: Grammar/spell checker :mag::heavy_check_mark: for VS Code using LanguageTool with support for LaTeX :mortar_board:, Markdown :pencil:, and others
https://valentjn.github.io/ltex
Mozilla Public License 2.0
817 stars 29 forks source link

Feature request: Documentations on how to change the settings of coc-ltex (the Vim version). Also, some settings don't work as expected. #841

Open thunderbird-1990 opened 1 year ago

thunderbird-1990 commented 1 year ago

Note: Per the contribution guidelines, deleting parts of the template or not filling in vital information may result in the issue to be immediately closed as invalid.

Is your feature request related to a problem? Please describe. It is not well documented or obvious how the settings of coc-ltex (the Vim version) can be changed.

To my knowledge, neither https://valentjn.github.io/ltex/settings.html nor https://valentjn.github.io/ltex/vscode-ltex/installation-usage-coc-ltex.html makes this very clear. The local documentations (~/.config/coc/extensions/node_modules/coc-ltex/walkthrough/en/customizeSettings.md on Linux) seems to be written for vscode-ltex.

I looked into the file and realised that settings can be changed in ~/.config/coc/extensions/node_modules/coc-ltex/package.json. But it is not clear to me whether this is the intended way to customise the settings of coc-ltex, nor whether this will survive future updates.

Also, some settings don't work as expected when I directly change ~/.config/coc/extensions/node_modules/coc-ltex/package.json. For instance, setting ltex.language to "default": "en-GB" works, but setting ltex.disabledRules to "default": {"en-GB": ["OXFORD_SPELLING_Z_NOT_S"]} has no effect and the Oxford spelling continues to be suggested.

Describe the solution you'd like The page https://valentjn.github.io/ltex/vscode-ltex/installation-usage-coc-ltex.html should have a brief description on how settings of coc-ltex can be changed.

Clarification on why changing ltex.disabledRules in the above mentioned way doesn't work would also be great.

Describe alternatives you've considered I did Google this issue but couldn't find a clear answer.

Additional context None.

thunderbird-1990 commented 1 year ago

Just realised that the settings should be put into ~/.vim/coc-settings.json (which can be opened with :CocConfig).

Example:

{
  "ltex.language": "en-GB",
  "ltex.disabledRules": {"en-GB": ["OXFORD_SPELLING_Z_NOT_S"]}
}

The online documentation (e.g., https://valentjn.github.io/ltex/vscode-ltex/installation-usage-coc-ltex.html) or the local one (e.g., ~/.config/coc/extensions/node_modules/coc-ltex/walkthrough/en/customizeSettings.md) should still have a reference to this.