Help wanted: VS code extension
Would love to see a super solid VS code extension for Nue that looks great and works great. That is: the colors are perfected and consistent for CSS, HTML/Nue, JavaScript, and Nuemark. Less is more — so the colors could look something like this:
I use Sublime myself, but I would switch to VS code if the above is solid, especially Nuemark which probably requires most work. I have no experience in building language servers for VS so help here would be golden.
I can take a look, if I understand the request more completely. It doesn't seem difficult, but to clarify, is this a request for a color theme or a syntax highlighting extension for Nue-specific language tokens? It all looks pretty good now in my default theme, but more colors. So this seems this is more of a request for a minimal color theme with fewer colors than most themes, matching a Sublime theme?
@appurist this would be awesome! Do you mind joining our slack community to discuss this ?
is this a request for a color theme or a syntax highlighting extension for Nue-specific language tokens?
It seems to be a request for syntax highlighting. I created an issue regarding LSPs before seeing this issue.
I would highly recommend whoever does end up working on this focus on creating a more general LSP for intellisense and inline code errors, etc., and a separate TextMate grammar/tree sitter parser for the syntax highlighting.
This would allow developers to install the LSP and highlighting grammar and then be able to use it in their editor of choice. This is highly important for adoption as a lot of loyal code editor users — for example, the lovely users of NeoVim — will be less likely to pick up the framework due to not being able to use their favorite editor for coding.
I did join the slack community but my spare time was suddenly occupied so I have not had a chance to follow up on this. If anyone else wants to pick up the ball, I'd suggest joining the Slack and letting Tero know. Sorry, but I won't be able to take a look at this after all, at least for many months, if at all.
Hi folks, I would be glad to pick it up. No experience with LSPs neither but very interested about the topic.
Some quick notes on LSP's that you may find helpful based on my knowledge from configuring them in various text editors:
Some things you'll need to consider are root files because everything is written in html and md you'll need to implement a root file which lets the LSP know that it's running in a nue project, a good example of this in the Nue project is the site.yaml file.
-
html: layout components / build time "server side" components -
htm/dhtml: islands / runtime client side components -
md: md content + content tags -
yaml: config and data
Trigger nue project: site.yaml exists
Interessted in this topic... has anyone taken a look into this?
I did but I've been busy lately. I have to take care of some stuff before I can get back to this, in a few weeks or so.
https://github.com/yyz945947732/vscode-nue
how about this has anyone checked it?
Did not know about it but it seems to just add nue attributes support to vscode html extension, which is a good start but far from complete.
Did not know about it but it seems to just add nue attributes support to vscode html extension, which is a good start but far from complete.
Yes, I’m the author of this library. I originally made it just to help with some demo runs (it was built pretty early on when Nue.js just started), so it’s not really a full-featured or production-ready extension—more like an early tool for getting things going. Language service stuff is super tricky and time-consuming, and to be honest, I don’t really have the skills or time to handle all that right now. So I really hope someone more experienced and motivated can take over. It’d be awesome if Nue.js could have an official, well-built VSCode extension someday.
Maybe take a look at valor.js if anyone’s interested.
Completely agree with you, I indeed started something with Volar. Unfortunately, it's lacking some (up to date) documentation but I think it can be an interesting first try since Vue and Astro extensions are based on it.
I'll get back on this in the next weeks and will open a public repo as soon as I have some early basic stuff working.
here's my VSCode extension to help with authoring TextMate grammars https://marketplace.visualstudio.com/items?itemName=RedCMD.tmlanguage-syntax-highlighter