Closed pmooney-socraticworks closed 1 day ago
Hi @pmooney-socraticworks!
I just looked into this, and unfortunately it seems impossible. Syntax highlighting in VSCode is done with Textmate Grammar files - and those are really static files.
There are feature requests in the VSCode repo (e.g. https://github.com/microsoft/vscode/issues/53885 ), but as for now, this is just not supported - and until they add that, I'm afraid, we cannot support dynamic tagName
for syntax highlighting.
Since this is something that we cannot do, I'm going to close this issue. Have a great day!
I have an
apollo.config.js
file that looks like this:I am using this property on the Apollo config to specify a unique tag name, since the code base I'm in has about 3 different libraries that export a
graphql
orgql
tag name, as well as a decorated tag that I have created within my codebase. I want to improve DX by making sure unaware developers are importing the correctgraphql
tag (the one I created), rather than blindly auto-importing the wrong one, hence the unique tag name.This works properly with the VSCode extension (I can navigate to fragment definitions, etc), however syntax highlighting does not respect the custom tag name. I have resorted to adding
#graphql
to the beginning of my template literal strings to recover the syntax highlighting.Would it be possible to update the syntax highlighting to respect the custom
tagName
property please?