vscode: tweak spell-checking configuration

it doesn't seem possible to override the includeRegExpList for specific
languages/file types if there's a global match, so list the common
languages explicitly to limit spell-checking in comments/strings there.
Other filetypes are using the built-in (or user-configured) defaults.
Add a second section for git-commit files as an example of how to extend
the configuration for other file-types.

Change-Id: I3c8039ba3b6b5951ce29a9f290e35b6a9bbdb4ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187066
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
This commit is contained in:
Christian Lohmaier
2025-06-26 14:21:00 +02:00
parent c6b9c12d6a
commit fc67c70eac

View File

@ -141,9 +141,9 @@
"cSpell.noSuggestDictionaries": ["ignoreWords"],
"cSpell.languageSettings": [
{
// check all file types, but only in comments and strings (what the regexes consider
// a comment/string)
"languageId": "*",
// limit spellchecking to comments and strings (what the regexes consider
// a comment/string) for these languages/file-types
"languageId": "c,objective-c,cpp,objective-cpp,makefile,m4,perl,python,automake",
// turn off compound words, because it is only checking strings.
"allowCompoundWords": false,
// Only check comments and strings
@ -155,6 +155,13 @@
"ignoreRegExpList": [
"/#include.*/"
]
},
{
"languageId": "git-commit",
"allowCompoundWords": true,
"ignoreRegExpList": [
"/Change-Id:.*/"
]
}
],
// hide from "Problems" tab, however also makes it less visible in the editor, but there are