Disable spell-check for a subset of a language


I am writing my thesis in Latex and I would naturally want spell-check to be turned on. However, I do not want the spell-checker to flag all of my reference labels and each of my 32 custom commands as incorrect spelling.

For example, when I reference a figure like so:

See Figure \ref{fig_bar_chart} for more detailes.

I want the spell-checker to tell me I misspelled “detailes” but I don’t want it to tell me that “fig_bar_chart” is misspelled.

When I log the cursor scope, it tells me that the scope inside the \ref{} command is:


My grammars config currently has text.tex.latex in it, but I want to exclude “meta.reference.latex”.

I tried adding it with a “!” before it but it doesn’t work – is there any way to do this?


This is a duplicate of the previous topic:

We like to unify similar discussions under one topic so that people don’t have to read a bunch of different threads to get the whole story. Please continue the discussion there. I’ll be closing this topic as duplicate.

There also seems to be an open Issue around this:

closed #3

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.