Reputation: 15335
I use Visual Studio Code and the Code Spell Checker extension.
I'm trying to get Code Spell Checker to ignore strings that start with $
I'm no RegEx wiz but I think the proper regex for this is ^\$
I've tried all number of options for cSpell.ignoreRegExpList
including:
"cSpell.ignoreRegExpList": [ "^\\$" ]
"cSpell.ignoreRegExpList": [ "^\$" ]
"cSpell.ignoreRegExpList": [ "^/\$" ]
with no luck.
Is it possible to set Code Spell Checker to ignore strings that start with $
and if so, what's the correct way to set it in my User Settings file?
Upvotes: 6
Views: 4397
Reputation: 741
The regular expression need to match against the entire text to be ignored.
"cSpell.ignoreRegExpList": [
"^\\$.+"
]
UPDATE:
Ahh, I misunderstood, I thought you wanted to ignore lines starting with $. To ignore words starting with $ use: "\\$\\w+"
Upvotes: 8