Not logged inOpenClonk Forum
Up Topic Development / Developer's Corner / VS Code Extension
- - By Apfelclonk Date 2020-02-11 18:15 Edited 2020-02-18 22:03

VS Code Extension



As some might already know I am working in an extension for VSCode to leverage OpenClonk Development.
I will keep this thread up to date. Please leave any question or feedback down below.

Install:
Search for "OpenClonk" in the Marketplace within VSCode, you will find it there.

Also GitHub

0.1.1
I just rolled out a small patch. It includes:
- Fixes to grammar
- Whitespaces in paths in the settings json file should be fixed.

[0.2.0] - 2020-02-11
Changed
- Added activation points, so extension is not enabled when you work projects, unrelated to openclonk.
- Improved grammar.
- Some furthur polishing of the integration in VSCode.
- Clean-up of the templates. They now have recent OpenClonk version and don't throw errors on startup.
Fixed
- Settings entries can now be edited via the VSCode settings page.
- Changed prefix of the settings from "oclang" to "oc-ext". You will have to update your settings though.
Reply
Parent - By J. J. [py] Date 2020-02-11 18:33
Working under windows 7!
My .json file looks like the attached screenshot -->
Attachment: Capture.PNG (6k)
Parent - By Zapper [de] Date 2020-02-11 23:27
Nice!
Parent - By Apfelclonk Date 2020-02-18 22:04
There is a new version available with some small improvements. I hope to produce some more advanced features, once I finish writing a parser for analysis.
Reply
Parent - - By Luchs Date 2020-02-26 23:29
I'm working on something...

Attachment: oclsp.png (66k)
Parent - By Zapper [de] Date 2020-02-27 07:24
I am ex-static about that!
Parent - - By Apfelclonk Date 2020-02-27 20:37 Edited 2020-02-27 20:45
Cool! I tried building a parser in typescript for this usecase, but I got wired up, not having a suitable structure, which made things hard to debug and to implement all of its features.

Also, is this for syntax check only or will you generate an AST for furthur analysis?
Reply
Parent - By Luchs Date 2020-02-27 23:37
It's just running the script through the real parser and capturing the diagnostic messages. It still needs some work to get the code locations right.

I'm not sure how far that approach will get us for other language server features, though. I suppose it would be possible to capture symbol names for completion, but the parser obviously won't work for half-written code. An extra parser might still be worthwhile.
Parent - - By Luchs Date 2020-03-08 23:25
I got it in a somewhat usable state now.

Source for the language server (install Rust and run cargo build)
Compiled binary for Windows
Patch for the VS Code extension

Apfelclonk - I can do a pull request if you're interested in adding this to the extension.
Parent - By Apfelclonk Date 2020-03-10 20:49
If you list your changes to the changelog.md (you can take the version 0.3.0) and make a PR, that would be awesome. Seems like I forgot to merge the 0.2.0 into master, which I did just now. I hope that doesn't leave you with much merge work to do. Thanks for your contribution, btw. Feel also free to name yourself in any author or contribution field.
Reply
Parent - By Marky Date 2020-05-03 21:11
Can we get an icon theme for it? Working with VS code makes it really hard for me to discern objects, scenarios, and so forth. The visual aid provided by icons would be really helpful: https://code.visualstudio.com/api/extension-capabilities/theming#_adding-a-new-icon-theme
Up Topic Development / Developer's Corner / VS Code Extension

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill