Open gandalfsaxe opened 6 years ago
As a workaround, I have manually enabled the latex dictionary for the folder :)
It is possible to ignore those sections:
For all file types:
"cSpell.ignoreRegExpList": [
"/^```(?:.|\\s)+?^```/mig"
],
To have it apply only to markdown:
"cSpell.languageSettings": [
{
"languageId": "markdown",
"ignoreRegExpList": [
"/^```(?:.|\\s)+?^```/mig"
]
}
]
Thanks, can confirm it works to ignore content in code fences 👍
For inspiration, prettier.io actually implemented detection of language in code fences: https://prettier.io/blog/2018/04/11/1.12.0.html#support-fenced-codeblock-lang-followed-by-attributes-4153-https-githubcom-prettier-prettier-pull-4153-by-ikatyang-https-githubcom-ikatyang
Wanted behavior for markdown:
The current behavior is a nightmare for people writing technical stuff.
Else it generate too much false positive:
Plaintext code block:
Inline code:
With regard to enable LaTeX dictionary in the markdown file, my workaround is to change the global setting in settings.json
,
"cSpell.languageSettings": [
{"languageId": "markdown", "dictionaries": ["latex"]}
]
I've posted a solution here: https://github.com/streetsidesoftware/vscode-spell-checker/issues/357?_pjax=%23repo-content-pjax-container#issuecomment-898993398
It doesn't dynamically switch to the code fence language locally within the code fence, but it excludes spell checking in code blocks, which takes care of all the false positives in them.
Great extension! However I often make code fences in markdown, resulting in LOTS of false positive when vscode-spell-checker checks the code fence as if it was markdown code. Example: