Skip to content

Unable to use it with Ember file structure #421

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

Closed
kurocygnus opened this issue Sep 27, 2021 · 10 comments
Closed

Unable to use it with Ember file structure #421

kurocygnus opened this issue Sep 27, 2021 · 10 comments

Comments

@kurocygnus
Copy link

Hi.
I'm trying to use this in an Ember workspace, but the tailwind.config.js is on */config/
Because of this, it's not finding my prefix configuration. Any way to select the config location manually?

@bradlc
Copy link
Contributor

bradlc commented Oct 5, 2021

Hey @kurocygnus. Please can you share a GitHub repository that, when opened in VS Code, reproduces the issue?

@kurocygnus
Copy link
Author

Hey, sorry, I can't share the repository that this is happening, since it's not mine but from the company I work for.

@megalithic
Copy link

i'm having a similar issue with Elixir Phoenix apps where these types of files reside in repo_root/assets; how might we tell tailwindcss-language-server to look there for tailwind.config.js and any related tailwind files (presets we might of created too).

@megalithic
Copy link

megalithic commented Dec 3, 2021

@bradlc

Here's the directory structure of an Elixir Phoenix application (notice where the highlighted tailwind config files are located):

image

I'm using neovim nightly with the in-built neovim lsp client and latest version of @tailwindcss/language-server (0.0.5).

@bradlc
Copy link
Contributor

bradlc commented Feb 4, 2022

I don't see any reason why the config wouldn't be picked up. Is there any output from the language server?

@oskarskog
Copy link

I also have issues getting this working in a fresh Phoenix project and following the official instructions, these, to install tailwind. I have been using it daily for Ember projects for about 4 months and it has worked like a charm, only seeing issues now that I'm trying to use it with Phoenix.

I tried with neovim 6.0.1 and vscode.

The only thing showing up in the logs is this:
neovim:

[START][2022-02-05 22:10:37] LSP logging initiated
[ERROR][2022-02-05 22:10:43] .../vim/lsp/rpc.lua:420	"rpc"	"tailwindcss-language-server"	"stderr"	"\n"
[ERROR][2022-02-05 22:10:43] .../vim/lsp/rpc.lua:420	"rpc"	"tailwindcss-language-server"	"stderr"	"warn - The RTL features in Tailwind CSS are currently in preview.\nwarn - Preview features are not covered by semver, and may be improved in breaking ways at any time.\n"

vscode:

[2022-02-05 22:25:41.417] [exthost] [info] ExtensionService#_doActivateExtension bradlc.vscode-tailwindcss {"startup":false,"extensionId":{"value":"bradlc.vscode-tailwindcss","_lower":"bradlc.vscode-tailwindcss"},"activationEvent":"onStartupFinished"}
[2022-02-05 22:25:41.417] [exthost] [info] ExtensionService#loadCommonJSModule file:///Users/oskar/.vscode/extensions/bradlc.vscode-tailwindcss-0.7.6/dist/extension/index.js

Here is the test repo: repo.zip

@oskarskog
Copy link

oskarskog commented Feb 5, 2022

Thinking about it i realize that it probably doesn't work bc Phoenix doesn't install tailwind with node, it uses standalone cli. Still, would be amazing if it was possible to have LSP working also in this case.

@bradlc
Copy link
Contributor

bradlc commented Feb 15, 2022

Thinking about it i realize that it probably doesn't work bc Phoenix doesn't install tailwind with node, it uses standalone cli. Still, would be amazing if it was possible to have LSP working also in this case.

The extension works without a local version of tailwindcss since v0.7.5, so it should be fine. Your example project (repo.zip) works fine for me.

@kurocygnus Do you see anything in the Output panel? You can reveal this by running the Tailwind CSS: Show Output command from the command palette.

@kurocygnus
Copy link
Author

Hey @bradlc !
Yes, it looks like the config file it's finding is from another path... we have two different ember workspaces on the same project, so the intellisense is getting the first one it encounters.

@bradlc
Copy link
Contributor

bradlc commented Feb 21, 2022

Ah I see. Sounds like this is a duplicate of #218 then 👍

@bradlc bradlc closed this as completed Feb 21, 2022
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

4 participants