lsp-tailwindcss icon indicating copy to clipboard operation
lsp-tailwindcss copied to clipboard

Tailwind LSP provides completions outside of required boundaries. Sugestions?

Open ovistoica opened this issue 6 months ago • 0 comments

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 :)

ovistoica avatar Aug 06 '24 05:08 ovistoica