Jason
Jason

Reputation: 15335

Set Code Spell Checker ignore strings that start with a $

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:

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

Answers (1)

Jason Dent
Jason Dent

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

Related Questions