Closed maxnrm closed 2 months ago
@maxnrm Can you provide a repro that showcases your project structure including the VSCode workspace setup and Tailwind CSS config file(s)?
If you have a workspace file open the path is relative to that file — which is definitely intentional — because that's the file you specify the settings in. Per-folder overrides are not (yet) supported for tailwindCSS.experimental.configFile
and VSCode will warn you about this:
That's interesting. I guess the problem is that I store workspace files in separate directory from actual project folder. Thanks.
What version of VS Code are you using?
VSCode version: 1.87.2
What version of Tailwind CSS IntelliSense are you using?
Tailwind CSS IntelliSense version: v0.10.5
What version of Tailwind CSS are you using?
TailwindCSS version: v3.4.1
What package manager are you using?
No JS package manager, I use Go
What operating system are you using?
OS: Manjaro Linux
Tailwind config
VS Code settings
Reproduction URL
Just open any project from VSCode code-workspace file and set
tailwindCSS.experimental.configFile
Describe your issue
When
tailwindCSS.experimental.configFile
is set in a project, that was open from VSCode code-workspace and it is relative path, it is using base path of code-workspace file, and I presume a correct behaviour would be to use path to project folder as base path.I think possible problem cause is here: https://github.com/tailwindlabs/tailwindcss-intellisense/blob/daa8bb2821af9cffd4d3a0e2c5982aeea0e2bd7e/packages/tailwindcss-language-server/src/tw.ts#L136
workspaceFolder
which contains actual path to project folder, that workspace is opening, probably should be used insteadpath.dirname(workspaceFile)
, but I don't have enough understanding of VSCode extensions nor this package internals to create a proper PR.Temporary solution could be to use aboslute path to config, which I do for now.
Thanks in advance.