Skip to content

tailwindcss-language-server doesn't work in inline templates in components, but works elsewhere #63

@jpike88

Description

@jpike88

Fiddling with tailwind settings like includeLanguages and experimental.classRegex didn't get me anywhere. I think this is a limitation in Zed where it's unable to recognise that the template string in @component is actually HTML, although the tree-sitter files give the impression that it's aware of them when it's only syntax highlighting + ngtsc type awareness.

See example below in a simple angular component .ts file:

Image

Obviously line 14 is illegal syntax. But tailwind suggestions pop in fine.

If I try instead a string that uses the HTML Entity Parser, it works.

Image

But if I try typing that class syntax in valid html, in the template string, tailwind is ignored and some es6 autocomplete shows instead.

Image

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