Skip to content

Tailwind LSP provides completions outside of required boundaries. Sugestions? #72

@ovistoica

Description

@ovistoica

I have 3 LSP servers started in a TSX file (tsx-ts-mode)
image

Tailwind should provide completions only inside class or className strings but currently it provides completions in other areas where tailwind would be irelevant

image
image

My current config:

(use-package lsp-tailwindcss
  :straight '(lsp-tailwindcss :type git :host github :repo "merrickluo/lsp-tailwindcss")
  :init (setq lsp-tailwindcss-add-on-mode t)
  :config
  (setq lsp-tailwindcss-major-modes '(tsx-ts-mode css-ts-mode clojure-mode)
        lsp-tailwindcss-rustywind-command nil
        lsp-tailwindcss-validate nil
        lsp-tailwindcss-code-actions nil
        lsp-tailwindcss-class-attributes ["class" "className" "ngClass" ":class"]))

Do you have any idea why this might be happening?

This is a bad situation because tailwind normally has a lot of completion candidates and it competes heavily with completions with typescript

This doesn't happen in VSCode and there tailwind completions appear only within className strings
image

I'm happy to look into the issue myself but what I want is a nudge in the right direction :)

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