Open darcyparker opened 2 months ago
I just tried https://github.com/runem/lit-analyzer/tree/master/packages/ts-lit-plugin and it works for uhtml's html
template literals too. So I now have LSP support for the content inside uhtml's template literals - working in neovim. I imagine it works for any editor that has LSP.
Unfortunately it doesn't work with uhtml's svg
template literals.... (yet)
It's also worth adding to the FAQ topic about signals, that it also works with https://github.com/tc39/proposal-signals https://github.com/proposal-signals/signal-polyfill
PR welcome 🥳
In the https://webreflection.github.io/uhtml/#faq, I suggest a section about tooling such as:
@literals/rollup-plugin-html-css-minifier
to be useful for minimizing the uhtml templates with vite/rolluprollup-plugin-minify-html-literals
which has had some npm vulnerabilities for some timeI am interested in recommendations on how to setup
prettier
to format uhtml's svg/html literals. (Is there such a solution? If so, I think this would a useful FAQ item too.The vscode plugin support for syntax highlighting is nice. I noticed that neovim supports it OOTB with tree-sitter (Works nicely for me... here are screenshots here https://github.com/nvim-treesitter/nvim-treesitter/pull/3678 when support was added. I imagine other editors with tree-sitter support can do it too.)
Another topic I am interested in (but don't know if there is answer), is getting LSP support for the HTML/SVG elements and attributes with tagged templates. Syntax highlighting works with tree-sitter... I am still researching if there is a way to get LSP support.