TradingView
kaigouthro
24 May 2023 22:37

Textmate Language for Pine Script v5 2023-05 

Açıklama

Updated Syntax Colouring to include UDT and methods and libraries, and a few other extras.

Remember to Update when new built in language features are introduced.

This will not be Maintained frequently, it's an update to present times

Sürüm Notları


To use a tmLanguage file in VS-Code or Sublime Text:

* 1. Download and install the theme or file to the correct location for your respective editor:
- VS Code: `~/.vscode/extensions/[theme].tmLanguage`
- Sublime Text: `~/Packages/[theme].tmLanguage`

* 2. Activate the theme or tmLanguage file within the editor's settings.

* 3. For VS Code, you can also use the VS Code command pallete to install a new theme or modify your syntax highlighting preferences.

* 4. For Sublime Text, you can select the theme or language file from the toolbar in the top-right corner.

Sürüm Notları

Note to self: test more.

If anyone is interested in an ACE editor mode, let me know.

Sürüm Notları

Updated because matching scopes to Pine Editor more closely, and looks good across hundreds of themes in sync with other code languages.

Sürüm Notları

Fixed a few hidden bugs, got rid of any overlaps, went completist on all current built ins.

If you use the "tomorrow night" themes it is nostalgia for the old pine editor.


It also highlights markdown comment code (basics), and with a //``` tag, will highlight your source code or embedded pine script in comments ( good for building markdown ++ hovers for libraries)
Yorumlar
PineCoders
In the name of all TradingViewers, thank you for your valuable contribution to the community, and congrats!
kurtsmock
I'm not sure, but I think I added some pull requests to the github. This is for the Pine Editor Themes and Pine Script vsc extensions.
the github un is JeylaniB? At any rate. I think I'm getting the hang of it. The new theme uses colors identical to the pine editor.
The syntaxes ps.tmLanguage.json had to be updated though the way I did it and I fear that will break the other themes, however with the new tmLangage.json file, the pinescript specific rules are much easier to identify in the json.

Let me know if I"m barking up the wrong tree here
Talk soon =)
kaigouthro
@kurtsmock, i actually have some updates i did, i'll take a peek, i tried to tackle a few weird issues related to parsing as though it were compile req. i've tested it on some 400,000 lines of m own code to look for anomalies manually, i have to build an automated testing framework... i'll take a peek, thank you!
kurtsmock
@kaigouthro, If you look at my forked repository called pinescript_syntax_highlighting you'll find my full list. It has basically all build-in functions and variables.

The nice thing is that you can just load that since if something isn't working right you'll notice it stick out very easily. The only thing that can't be covered is new functions and variables, but since they're in alphabetical order you can pretty quickly scroll through the pinescript docs and see if there's new ones that aren't on the built-in-list.pine file.
kaigouthro
@kurtsmock, i didn't see a pull req, but i just did an update on github, some minor scope standardizing, and a fell swoop to the bulk of strings. reminds me i gotta go look at something
businessduck
Why are you prefer to use vscode?
kaigouthro
@businessduck, remote development is very easy, and i've been customizing user interfaces for a very long time, and in general, the flood of customizations available makes it easy for me. it's onl drawback is that one workspace can not span two monitors in the same open session.
PineCoders
This publication is now featured in our Editors' Picks: tradingview.com/scripts/editors-picks/ .
kurtsmock
Nice I've never used textmate. Is it a VSC plugin?
kaigouthro
@kurtsmock, VS-CODE actually uses textmate.. go use either of the two exxensions available, navigate to their folder and replace the tmLanguage. ( or online there are other ways :) )
Daha Fazla