Closed jnns closed 2 years ago
I haven't yet used the JIT mode, so I can't provide a helpful answer now, until I dig into it a bit more.
Do you mind opening an issue at https://github.com/tailwindlabs/tailwindcss-intellisense ? (maybe someone already had similar issues as you)
Thank you, Предра.
I was able to find this comment in tailwindcss-intellisense issue tracker:
bradlc: The extension already supports JIT mode +1
Although I have no idea how it would work and where suggestions could be sourced from if they are not generated beforehand.
If you could create a repro repo with the bug that could be helpful.
I use JIT exclusively since it was released and I sometimes have them and sometimes don't. It would make sense to be because it look in the generated files. But also, my generated files are git ignored since I use SCSS (dist folder ignored to only track SCSS files) and when a dist folder is ignored, Sublime kinda scoffs over it and doesn't look at the files anymore somehow (they're not tracked in search, they're grayed out in the sidebar, etc.)
I've been meaning to pin down the source of the inconsistencies, especially when booting up Sublime (most lsp servers don't start right away unless I mess up with their config files, even using the restart servers command doesn't do anything).
I managed to get completions with JIT
mode.
I will need a repro repo.
Question,
@jnns did you run npm i
in the project?
Becase you need to have tailwindcss
installed in node_modules in order for LSP-tailwindcss to work.
Weird. Now it also works on my machine without me changing anything on the setup. 🥳 I was always using tailwindcss as a PostCSS plugin through postcss-cli. It must have been one of those inconsistencies that @davidwebca mentioned.
Thanks for looking into it and spending your time on this.
It seems to me that the suggestions don't work when JIT mode is enabled. Which makes sense to me if the LSP plugin actually takes the suggestions out of the generated file, because with JIT enabled there wouldn't be any classes to suggest except the ones already used.
If that's the case, should it be mentioned in the Readme file?