-
Notifications
You must be signed in to change notification settings - Fork 197
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
Add support for TypeScript config path mapping in CSS files #1106
base: main
Are you sure you want to change the base?
Conversation
a5b5ce8
to
99f66e2
Compare
a42a518
to
75ba3b6
Compare
Caused by using CSS @import, see: - bug: tailwindlabs/tailwindcss-intellisense#1103 - pr: tailwindlabs/tailwindcss-intellisense#1106
1c6ec15
to
2934e37
Compare
64eb3e9
to
85b1042
Compare
@thecrypticace is there an insiders version to test the current changes? |
@pvds Not yet no. If you want you can test this by cloning / building the repo tho. It shouldn't be too difficult (you might need to tweak these steps a little if you're on Windows): # Clone the repo
git clone https://github.com/tailwindlabs/tailwindcss-intellisense -b fix/better-import-handling
cd tailwindcss-intellisense
# Install and build
pnpm install
pnpm run -r build
# Open with vscode
code . After doing the above you can show the debug sidebar in VScode and click launch client. That should launch an extension development host process that lets you test out the extension by opening a project. |
I also still need to rebase this PR b/c of some fixes I made / released. Planning on doing that today or maybe Monday. |
@thecrypticace I use Webstorm on a Mac and just tested it on a project I'm working on. Unfortunately using custom @import rules does not seem to work yet Webstorm using local build version of language server
Verified whether the local build of the language service works (without custom imports)Used CSSUsing custom imports
|
@pvds Can you provide a link to your project / repo for me to test with? |
No, it means that when typing something like |
@thecrypticace this is the project: https://github.com/pvds/mikrouli/ Autocomplete works in the Some notes
|
Thanks for the repro! I can reproduce the issue but I'm not 100% certain why yet. I did verify that the CSS imports look to be handled correctly but it's still creating more "projects" than it should be so something's definitely going wrong somewhere. I'll see what I can figure out. |
You're welcome, I will also try to spend some time figuring out when it exactly breaks |
@thecrypticace I think I found it: Applying the utilities layer to an
|
Ah yeah that will break one part of it b/c |
It would make sense to me that in the release version of v4 applying a layer to Curious to see what the other issue is. |
Yeah, very much agreed. IntelliSense already does a bit of work to recover from otherwise invalid CSS for imports. I'll see if I can figure out a good solution for this as well. |
I figured it out and it's also ultimately caused by the |
I've opened an issue for myself to look into better error recovery mechanisms for IntelliSense as well but in your case making sure the I plan on adding detection for things like this so we can warn. |
Sounds good! |
@thecrypticace are you planning to implement the non-trivial todos in this PR or just solve the conflicts? |
Just the conflicts for now. I'll open a separate issue once this one is merged to look into the other stuff. |
This ensures project initialization can proceed far enough that Tailwind CSS itself should attempt to initalize. It also means we can reliably detect this case and show an error in the console.
85b1042
to
4d9917c
Compare
This is a work in progress with a handful of things that need improvements regarding stylesheet loading / editing when in a v4 project.
Fixes #1103
Fixes #1100
paths
do)@import
@reference
@config
@plugin
@import
@reference
@config
(nothing to do here)@plugin
(nothing to do here)@import
(no upstream support; non-trivial)@reference
(no upstream support in@import
; non-trivial)@config
@plugin
@import
(no upstream support; non-trivial)@reference
(no upstream support in@import
; non-trivial)@config
@plugin