Visitar URL original
Suggested FAQ documentation · Issue #135 · WebReflection/uhtml · GitHub
Skip to content

Suggested FAQ documentation  #135

Description

@darcyparker

In the https://webreflection.github.io/uhtml/#faq, I suggest a section about tooling such as:

  • Minification
    • I found @literals/rollup-plugin-html-css-minifier to be useful for minimizing the uhtml templates with vite/rollup

I 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 nvim-treesitter/nvim-treesitter#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.

Activity

  1. darcyparker commented on Sep 20, 2024

    @darcyparker
    Author

    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)

  2. darcyparker commented on Sep 20, 2024

    @darcyparker
    Author

    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

  3. WebReflection commented on Sep 23, 2024

    @WebReflection
    Owner

    PR welcome 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions