Closed tamasfe closed 2 years ago
The syntax tree has been implemented:
I cannot find a legitimate use-case right now, other than the syntax tree, which is useful only for development.
How do I install the lsp server to try this out?
https://github.com/rhaiscript/lsp#contributing These should be enough from the master branch, tell me if something doesn't work.
Unfortunately my primary machine is Windows... do you have a workflow for building it on Windows?
Unfortunately I don't have access to windows atm, the commands should be the same though.
You'll need to have nodejs installed.
From that step the setup is pretty much:
npm install --global yarn
npm install --global vsce
Then in the editors/vscode
directory:
yarn install
vsce package --no-yarn
code --install-extension --force rhai-0.0.0.vsix
The last command just installs the .vsix extension file in vscode, there are other methods to do that if that fails.
As for the language server, it's just a cargo binary cargo install --path crates/lsp --debug
.
But yeah, I haven't tested any of this, I'll get a windows vm at some point in the next days.
Do I have to turn off the Rhai syntax highlighting extension first?
Do I have to turn off the Rhai syntax highlighting extension first?
The syntax highlight will conflict but the rest should be fine.
I see that you keep a grammer file there for syntax highlighting. That should work as well as my own, probably even better as I based mine on a JavaScript grammer.
Yes, I wanted to incorporate type hints let a: Type
into yours but it ended up being easier to write a new one with that in mind. It's partially based on typescript's syntax rules.
Show a dedicated VSCode activity panel for Rhai.
Things to display: