Open command line in the same folder you downloaded the extension
Type the following command:
code --install-extension openhab-0.1.0.vsix
Open Visual Studio Code
Open openhab configuration (openHAB-conf) folder
Enjoy!
Further development
There are a number of ideas that we’d like to implement in the extension (like incorporating LSP for better Xtend syntax validation).
I truly believe this will become a solid alternative for Eclipse SmartHome Designer.
In the meantime we’ll be working with @Kai to publish the extension in the VS Marketplace, so you won’t need to install it manually.
This is really great. I like especially the idea of using the LSP. Would be great to have a language server implementation of the sitemap and rule syntax. This could then be uses for VS.Code, brower-based editors and Java-based tooling.
the first questions arise.
How does the preview work? Do I need to have some services running or is it just parsing the sitemap and has the default styles applied internally? Currently it shows nothing for my sitemaps (or a newly created one).
I thought so, but was hoping that maybe the sitemap is just parsed with the help of static/internal openHAB stylesheets or scripts (just UI and non-functional). So basically it is just a browser window within vsCode.
I’ve already made a PR to make it work under macOS.
Should be no problem to make it work under *NIX, albeit the mounting scheme is not the same on every distro.
@KidSquid@Confectrician It’s certainly possible! There’s an issue in the pipeline to utilize LSP for Xtend language. This way we would get all the goodness that’s seen in ESHD - code formatting, quick suggesting, validation and so on.
Prerequisite of that feature is to upgrade Xtend to a newer version.
@dennisausbremen Thank you for the PR! I’ll take a look at it today.