【问题标题】:Tailwind CSS IntelliSense not working on my VS codeTailwind CSS IntelliSense 不适用于我的 VS 代码
【发布时间】:2021-10-11 00:38:01
【问题描述】:

我最近开始在我的 react 应用中使用 tailwind CSS。当我在元素中使用它的类时,顺风工作。但是当我开始输入时,Intellisense 插件不建议类。 我看到其他人有同样的问题并看到其他人解释的解决方案,但毕竟我无法解决这个问题。

当我创建 .html 文件时,它不适用于 html 文件

我使用https://tailwindcss.com/docs/guides/create-react-app上的tilwind安装文档来安装tailwind。


我尝试了一些其他人所说的设置和配置:

"tailwindCSS.includeLanguages": { "javascriptreact": "html", “typescriptreact”:“html”, “明文”:“html” },

“emmet.triggerExpansionOnTab”:真,

“tailwindCSS.emmetCompletions”:真,

但毕竟它仍然不起作用,我不知道我还能做什么。 如果有人可以帮我解决这个问题。谢谢

【问题讨论】:

  • 其中一个问题是打开一个不包含tailwind.config.js 的文件夹/选择文件夹。例如src 文件夹。

标签: reactjs visual-studio-code tailwind-css


【解决方案1】:

尝试将此添加到 vscode setting.json:

"editor.quickSuggestions": { "strings": true }

这对我有用,因为我在输入字符串时似乎遇到了自动建议的问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-01-17
    • 2019-08-04
    • 1970-01-01
    • 2021-09-04
    • 1970-01-01
    • 1970-01-01
    • 2021-06-18
    相关资源
    最近更新 更多