-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a Syntax highlighter [VSCode] #4
Comments
hi, I started work on this here. Basic syntax highlighting works, but I still have to make sure I dont have any regex blindspots. Am planning to add full language support that will enable vscode users to see the output of their templates on hover(just like tailwindcss is doing). Let me know if you need me to add or remove other things. To use the extension just clone the repo, and press F5 when you open the cloned folder on vscode. |
Hi, the tokenization method (textmate grammar) which vscode uses makes it very hard to match contents that span multiple lines. The discussion of this problem can be found here microsoft/vscode-textmate#41.
using the current state of Uzo2005/tim-vscode-extension@622fe94 to highlight this shows that syntax highlight breaks for the value of the |
Hey, thanks for your effort! There is an unfinished .sublime-syntax available that you can use for inspiration. There will be 3 types of strings, Single-quoted strings are one-liners
Double-quoted stringsAllow multi-line strings but require double quote be escaped using a backslash
Triple-quoted string literalsSimilar with Nim's triple quoted strings, may span multiple lines that don't need escaping. This may be helpful for injecting quick JS code and other dirty string-based data.
Template literalsFor this we can take a look at JavaScript.tmLanguage
A summary of Tim keywordsKeywords
Also, there will be a special dot expression
Other chars and aliases
Comparison operators
Math Operators
Data types
Special
|
better
|
Thanks a lot for clarifying all the possible tokens, it makes everything clearer now. I will take hints from the sublime syntax extension and improve the vscode extension.
which also allows chaining of
which means |
I agree. let's use |
Hi, I am done with everything involving syntax highlighting and so am ready to publish version 0.0.1 of the extension. You can preview the extension by:
I have some questions on how to go about the publication:
Thanks PS: sorry for taking so long, we had lots of tests to write this week |
Nice! Thank you, Cletus! You can use your repo to publish the extension. If you want, use this banner in Thanks for using Tim and helping with this <3 Hopefully soon I will finish the docs and release the first version. Cheers! |
thanks, I really believe that Tim will solve all the pain points I experience with html templating languages, so I really want to see it go mainstream. I just published the extension here |
https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide
The text was updated successfully, but these errors were encountered: