nue icon indicating copy to clipboard operation
nue copied to clipboard

Help wanted: VS code extension

Open tipiirai opened this issue 1 year ago • 14 comments

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:

image

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.

tipiirai avatar Aug 15 '24 09:08 tipiirai

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 avatar Nov 15 '24 18:11 appurist

@appurist this would be awesome! Do you mind joining our slack community to discuss this ?

tipiirai avatar Nov 29 '24 08:11 tipiirai

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.

maclong9 avatar Jan 29 '25 13:01 maclong9

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.

appurist avatar Jan 29 '25 15:01 appurist

Hi folks, I would be glad to pick it up. No experience with LSPs neither but very interested about the topic.

rilaaax avatar Feb 08 '25 15:02 rilaaax

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.

maclong9 avatar Feb 08 '25 15:02 maclong9

  • 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

nobkd avatar Feb 08 '25 16:02 nobkd

Interessted in this topic... has anyone taken a look into this?

hichem-dahi avatar Mar 18 '25 20:03 hichem-dahi

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.

rilaaax avatar Mar 18 '25 21:03 rilaaax

https://github.com/yyz945947732/vscode-nue

how about this has anyone checked it?

hichem-dahi avatar Mar 19 '25 01:03 hichem-dahi

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.

rilaaax avatar Mar 19 '25 22:03 rilaaax

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.

yyz945947732 avatar Apr 08 '25 06:04 yyz945947732

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.

rilaaax avatar Apr 08 '25 21:04 rilaaax

here's my VSCode extension to help with authoring TextMate grammars https://marketplace.visualstudio.com/items?itemName=RedCMD.tmlanguage-syntax-highlighter

RedCMD avatar Aug 15 '25 02:08 RedCMD