In the LSP default settings, it looks like the javascript-typescript-langserver
language server is hard-coded to look for the scopes source.js
and source.jsx
. By default, JS Custom syntaxes use scopes like source.js.react
. (This is so that syntaxes embedding source.js
will embed the core syntax. Otherwise, you would have infinite recursion with custom template tags that used the HTML syntax.)
If this is the cause of the problem, then you could get around it by either adding "scope": "source.js"
to the React configuration in your JS Custom settings, or by changing your LSP settings so that javascript-typescript-langserver
will look for source.js.react
. (I feel like LSP should consider source.js.react
to match source.js
, but I’m not very familiar with its internals.)
Several other LSP client default settings also hard-code source.js
. Some even hard-code Packages/Babel/JavaScript (Babel).sublime-syntax
.