vscode-language-renpy icon indicating copy to clipboard operation
vscode-language-renpy copied to clipboard

[Enhancement] - Avoiding putting Textmate Scopes in local settings.json

Open multimokia opened this issue 1 year ago • 2 comments

Looking at VSCode's Markdown extension, I notice that the same behaviour with highlighting, underlining, italics, and bold etc. are all accomplished without modifying the user's local settings json

Is this possible to accomplish here as well? It'd be great to not have the extension needing to depend on whatever's in the settings json to make some of its richer highlighting features.

multimokia avatar Aug 31 '22 19:08 multimokia

That would be great, so far I've not discovered a way to do this yet. But I can definitely take a look at the markdown extension, to see how that's done.

I do have to note that markdown is most likely added by the theme, and we can't directly modify or add to the current theme. The only way I found, is this round about way of adding custom text mate scopes.

duckdoom4 avatar Aug 31 '22 22:08 duckdoom4

I found this: https://code.visualstudio.com/api/language-extensions/semantic-highlight-guide#custom-textmate-scope-mappings

It seems to be a way to do what you're doing without modifying a user's settings. As well, it seems like the extension would likely benefit from a semanticTokenProvider given the existence of a tokenizer (and thus helping to improve python handling)

multimokia avatar Sep 04 '22 18:09 multimokia