Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TailwindCSS can't get completion within .html file #1153

Open
honmaple opened this issue Jan 25, 2025 · 0 comments
Open

TailwindCSS can't get completion within .html file #1153

honmaple opened this issue Jan 25, 2025 · 0 comments

Comments

@honmaple
Copy link

honmaple commented Jan 25, 2025

非常奇怪的问题,从输出的日志信息来看,配置了languageId: html后是可以获取到补全信息的

--- [23:38:20.224488] Got completion candidates (874) from 'tailwindcss' for file index.html

但是界面上却没有补全显示,在同一个项目里,html文件无法补全,但vue文件可以。

Image

我的配置很简单,只激活了tailwindcss这一个服务端

(use-package lsp-bridge
     :load-path "site-lisp/lsp-bridge"
     :autoload (lsp-bridge-mode)
     :hook (web-mode . (lambda()
                         (when (bound-and-true-p corfu-mode) (corfu-mode -1))
                         (lsp-bridge-mode)))
     :custom
     (acm-enable-yas nil)
     (lsp-bridge-python-command (expand-file-name "versions/lsp-bridge/bin/python3" (getenv "PYENV_ROOT")))
     (lsp-bridge-single-lang-server-mode-list
      '(((web-mode) . "tailwindcss")))
     (lsp-bridge-get-language-id
      (lambda (project-path file-path server-name extension-name)
        (when (string-equal server-name "tailwindcss")
          (cond ((string-equal extension-name "html") "html")
                ((string-equal extension-name "vue") "vue")
                (t "")))))

我也创建了一个测试项目用于复现问题 https://github.com/honmaple/test-tailwindcss

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant