-
Sometimes, it's not advisable to have multiple (human) languages enabled when checking monolingual documents, especially if multiple languages come from the same language family. For instance, Serbian and Russian shouldn't be enabled at the same time because this can lead to false positives, or spelling alternatives being offered from the language that the document is not in. Manually changing the languages in settings.js is not practical every time we want to make the switch. vscode-spell-checker offers handy in-document settings for selecting languages:
but that may not always be ideal — especially in Markdown files, where we may prefer not to have any such meta comments in the text itself. Is there a way to write a command that would update Any thoughts or tips? Many thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 3 replies
-
A command like that doesn't currently exist for the spell checker. It is a possible enhancement. Keybinding to Settings:
|
Beta Was this translation helpful? Give feedback.
-
Thanks a lot, @Jason3S. This is all very useful. Thanks for accepting my Serbian PR. By the way, do you automatically create VSCode extensions, or should I submit another PR for it? |
Beta Was this translation helpful? Give feedback.
-
@Jason3S , I've created and tested it, and both dictionaries work within a single extension. I still need a bit of advice though. Because I created multiple locales in cspell, they are now all now showing up VSCode like this: This looks messy and doesn't allow a user to select either Cyrillic or Latin, you always need to have both enabled. So, there are two issues I'd like to resolve:
Please let me know. |
Beta Was this translation helpful? Give feedback.
-
Nicely done. Since there are no differences, then having a single locale I think it is worth having the three codes+script combos:
I'll Update the Spell Checker to include the list of scripts. I think we can go with what you made in a Preview version, then update it when things are fixed. |
Beta Was this translation helpful? Give feedback.
-
Yes, that makes sense: Just to clarify, I should:
And when you say:
Does that mean that the users will eventually be able to select either Cyrillic or Latin, or both — from the UI? |
Beta Was this translation helpful? Give feedback.
@ttasovac,
A command like that doesn't currently exist for the spell checker. It is a possible enhancement.
Keybinding to Settings:
cSpell.language
You could try using this keybinding:
keybindings.json
CSpell Language Extensions
Each language extension comes with its own command to enable/disable the locale.
It is possible to add keybindings for them:
Using Overrides
cSpell.overrides
provides a way to use the file path as a way to select the locale.