ManiaScript for Visual Studio Code
Moderator: English Moderator
ManiaScript for Visual Studio Code
https://github.com/MattMcFarland/vscode-maniascript
Hi all, just released this and thought you might find it very helpful. I actually rewrote the grammar files so that IDEs can get a lot more information from the code. I'm planning on adding autocompletion/intellisense soon and snippets soon as well.
You can install it by searching and installing the extension called `vscode-maniascript`
EDIT: Version 1.1.2 released as of 3/27/2017:
You can get a copy of this extension for VSCode here: https://marketplace.visualstudio.com/it ... aniascript
Last edited by tonechild on 27 Mar 2017, 10:54, edited 2 times in total.
Re: ManiaScript for Visual Studio Code
That's actually pretty neat, thanks for that!
Check out my Personal Twitter account!
Re: ManiaScript for Visual Studio Code
Great one, thanks! Looking forward for the other features
Specs: Windows 7 Home Premium 64-bit SP1 | Intel Core i5 2500K @ 3.30GHz | 4,00GB Dual-Channel DDR3 @ 668MHz (9-9-9-24) | ASUSTeK Computer INC. P8Z68-V (LGA1155) | 1920x1080@60Hz|2047MB NVIDIA GeForce GTX 560
Re: ManiaScript for Visual Studio Code
Wooaaaaaaaah, this is what's been missing!!! and ofc warm welcome to forums
I tried to write grammar multiple times, and I've endup each time having massive headache and even not close to working grammar.
Big kudos tonechild so cool. sooo cool to finally have ide support.
Question:
Would you be extra kind to provide also native .tmLanguage ruleset for other ides which supports it ?
So cool. Wow.
I tried to write grammar multiple times, and I've endup each time having massive headache and even not close to working grammar.
Big kudos tonechild so cool. sooo cool to finally have ide support.
Question:
Would you be extra kind to provide also native .tmLanguage ruleset for other ides which supports it ?
So cool. Wow.
Re: ManiaScript for Visual Studio Code
Hey!
So glad this is helping others!
To answer the question regarding native tmLanguage support - This should be availble for use with any language using .tmLanguage format.
Because .tmLanguage files are difficult to maintain, I have created a build script that builds smaller and organized YAML files into the standard .tmLanguage format. You can see this here: https://github.com/MattMcFarland/ManiaScript.tmLanguage
You should be able to easily port these to other editors, but let me know if that is not the case, and if something is missing!!!
ALSO, I've just released 0.3.0 today with the following changes:
Added label support +++Foo+++ / ***Foo*** ... ***
---
Added Template String script tag support
---
Added String Format support (<$1>)
So glad this is helping others!
To answer the question regarding native tmLanguage support - This should be availble for use with any language using .tmLanguage format.
Because .tmLanguage files are difficult to maintain, I have created a build script that builds smaller and organized YAML files into the standard .tmLanguage format. You can see this here: https://github.com/MattMcFarland/ManiaScript.tmLanguage
You should be able to easily port these to other editors, but let me know if that is not the case, and if something is missing!!!
ALSO, I've just released 0.3.0 today with the following changes:
Added label support +++Foo+++ / ***Foo*** ... ***
---
Added Template String script tag support
---
Added String Format support (<$1>)
Last edited by tonechild on 23 Mar 2017, 18:40, edited 1 time in total.
Re: ManiaScript for Visual Studio Code
So I tried, and failed alreadytonechild wrote: ↑23 Mar 2017, 16:36 To answer the question regarding native tmLanguage support - This should be availble for use with any language using .tmLanguage format.
Because .tmLanguage files are difficult to maintain, I have created a build script that builds smaller and organized YAML files into the standard .tmLanguage format. You can see this here: https://github.com/MattMcFarland/vscode ... c/syntaxes
You should be able to easily port these to other editors, but let me know if that is not the case, and if something is missing!!!
If I do direct YAML to XML it's wrong format and doesn't work
direct yaml-to-xml:
Code: Select all
<?xml version="1.0"?>
<plist><fileTypes><item0>Script.txt</item0></fileTypes><firstLineMatch>#RequireContext</firstLineMatch>
Code: Select all
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>Script.txt</string>
<string>txtm</string>
</array>
<key>firstLineMatch</key>
<string>#RequireContext</string>
I found vscode plugin to do transform for the files easily, but it fails to install since I have only community edition of visual studio.
https://github.com/Togusa09/vscode-tmlanguage/releases
Re: ManiaScript for Visual Studio Code
I wasn't aware you could use vscode extensions for vs?
AFAIK visual studio code is different than visual studio. vscode is 100% free for one
THe YAML files are using a custom builder, so you would have to use node, then npm install, then npm run build to create the official .tmLanguage files. Have you tried that? They are not in the github repo (only src files are)
the npm build script converts using the same libraries that plugin you mentioned uses to convert, in fact I used the source from that plugin as inspiration for my build script. (they used a lot of verbose code tho I did it in by far less lines)
Observe: https://github.com/Togusa09/vscode-tmla ... #L147-L170
The 2 libraries: yamljs and plist are used to convert the yaml files, which I use here: https://github.com/MattMcFarland/ManiaS ... js#L14-L17
Which give the exact same results
You can use the following commands to build the .tmLanguage files - please make sure you have nodejs isntalled first
Then you should see the portable .tmLanguage files in the /syntaxes directory.
I hope this helps!
AFAIK visual studio code is different than visual studio. vscode is 100% free for one
THe YAML files are using a custom builder, so you would have to use node, then npm install, then npm run build to create the official .tmLanguage files. Have you tried that? They are not in the github repo (only src files are)
the npm build script converts using the same libraries that plugin you mentioned uses to convert, in fact I used the source from that plugin as inspiration for my build script. (they used a lot of verbose code tho I did it in by far less lines)
Observe: https://github.com/Togusa09/vscode-tmla ... #L147-L170
The 2 libraries: yamljs and plist are used to convert the yaml files, which I use here: https://github.com/MattMcFarland/ManiaS ... js#L14-L17
Which give the exact same results
You can use the following commands to build the .tmLanguage files - please make sure you have nodejs isntalled first
Code: Select all
# in BASH command line interface:
npm install
npm run build
I hope this helps!
Last edited by tonechild on 23 Mar 2017, 18:40, edited 2 times in total.
Re: ManiaScript for Visual Studio Code
ye, trying it now.
I missed the build script earlier. Thanks for clarification!
I missed the build script earlier. Thanks for clarification!
Re: ManiaScript for Visual Studio Code
Yea! The build script does make things a little bit less transparent - so I may add some documentation around this in the contributing section so others can easily see how this works.
I was also thinkinf of removing the .tmLanguage build script alltogether from this repo, and creating another repo that is generic and just creates the .tmLanguage file - then other plugins (like the vscode) plugin can pull that lib in as a dependency. I'm not sure though, just thinking atm.
I was also thinkinf of removing the .tmLanguage build script alltogether from this repo, and creating another repo that is generic and just creates the .tmLanguage file - then other plugins (like the vscode) plugin can pull that lib in as a dependency. I'm not sure though, just thinking atm.
Re: ManiaScript for Visual Studio Code
1.0.0 Release!
Major deal, but small changes.
I've removed the tmLanguage build process from the vscode extension itself, because I plan on reusing it for the atom editor, and I think there should be a single source of truth for tmLanguages
The tmLanguage repo is here: https://github.com/MattMcFarland/ManiaScript.tmLanguage
The vs plugin now just installs the tmlanguage repo from npm as a dependency.
Major deal, but small changes.
I've removed the tmLanguage build process from the vscode extension itself, because I plan on reusing it for the atom editor, and I think there should be a single source of truth for tmLanguages
The tmLanguage repo is here: https://github.com/MattMcFarland/ManiaScript.tmLanguage
The vs plugin now just installs the tmlanguage repo from npm as a dependency.
Who is online
Users browsing this forum: No registered users and 2 guests