EvgeniyPeshkov / syntax-highlighter

Syntax Highlighter extension for Visual Studio Code (VSCode). Based on Tree-sitter.
https://marketplace.visualstudio.com/items?itemName=evgeniypeshkov.syntax-highlighter
MIT License
217 stars 43 forks source link

Adding new languages #60

Closed tinygiant98 closed 3 years ago

tinygiant98 commented 3 years ago

Looking to see if there's been any movement on instructions for adding new languages. I went through the entire extension and modified it for inclusion of a new language. The debug run shows the existence of all required files and the parser the wasm file is based on correctly parses the files. However, no semantic highlighting is occurring. The modified extension packages, registers to vscode correctly, and the activation and other events run at the correct time when opening and editing a file.

I have a feeling the wasm file is somehow to blame, but also need to make sure I integrated the language correctly. Any documentation in this regard would be much appreciated. Thanks for the extension!

jonorthwash commented 1 year ago

I'm also having trouble adding new languages.

I've managed to get rtx format detected and to load the tree-sitter-rtx module, but there's no highlighting. I think I'm missing one piece of the puzzle still?

You can view my work on this to date and an example of rtx format.

tinygiant98 commented 1 year ago

@jonorthwash Don't know if this will help. I probably can't do much for you since I haven't touched this in quite some time as we developed a different solution while waiting for tree-sitter-graph to get further along. I did have another "language" successfully using syntax highlighting based on this extension and a new tree-sitter grammar. The biggest challenge I remember having is compiling the wasm after a grammar change.

This is the extension repo for my version (not many changes): https://github.com/tinygiant98/syntax-highlighter This is the tree-sitter repo for the language we were adding: https://github.com/tinygiant98/tree-sitter-nwscript

Hope some of this helps. It worked really well for the six or so months we used it.