Skip to content
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

Vimscript codebox property #2613

Open
guidomz opened this issue Dec 5, 2024 · 3 comments
Open

Vimscript codebox property #2613

guidomz opened this issue Dec 5, 2024 · 3 comments

Comments

@guidomz
Copy link

guidomz commented Dec 5, 2024

Please consider adding vimscript as one of the options for codebox property.

@giuspen
Copy link
Owner

giuspen commented Dec 7, 2024

I did search on the internet but couldn't find an existing vimscript.lang definition file for gtksourceview
I don't have time to write it myself but if you do you can follow the syntax definition tutorials
Language Definition v2.0 Introduction
Language Definition v2.0 Reference
Language Definition v2.0 Tutorial
And for examples already bundled in cherrytree:
https://github.com/giuspen/cherrytree/tree/master/language-specs
If you provide a simple valid version of vimscript.lang I will include it into next version.
You can test yourself after cloning cherrytree just put your file in the same folder of the others linked above and run ./build/cherrytree

@gitvectors
Copy link

Could this approach work at the other (complex) end of the spectrum.

The official and reference implementation of the Wolfram Language lies in Mathematica and associated online services. These are closed source. Wolfram Research has, however, released a parser of the language under the open source MIT License. The parser was originally developed in C++ but was rewritten in Rust in 2023.

https://www.wolfram.com/language/index.php.en

@giuspen
Copy link
Owner

giuspen commented Dec 7, 2024

Certainly @gitvectors it is possible to write syntax highlighting definition for every language.
Ideally you would start from the syntax highlighting (keywords and colours) definition for another toolkit and convert it into gtksourceview ".lang" file (which is an xml).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants