Commit e871fc9
authored
Add support for TypeScript config path mapping in CSS files (#1106)
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
- [x] Recover from missing stylesheet imports
- [ ] Recover from unparsable stylesheet imports (not sure if possible)
- [x] Read path aliases from tsconfig.json
- [x] Log errors from analyzing CSS files during the resolve imports
stage (the cause of #1100)
- [x] Watch for tsconfig.json file changes and reload when they change
(or maybe only when the list of seen `paths` do)
- [x] Consider path aliases when doing project discovery
- [x] Consider path aliases when loading the design system
- [x] Allow in `@import`
- [x] Allow in `@reference`
- [x] Allow in `@config`
- [x] Allow in `@plugin`
- [ ] Consider path aliases when producing diagnostics
- [ ] Allow in `@import`
- [ ] Allow in `@reference`
- [x] Allow in `@config` (nothing to do here)
- [x] Allow in `@plugin` (nothing to do here)
- [ ] Consider path aliases when generating document links
- [ ] Allow in `@import` (no upstream support; non-trivial)
- [ ] Allow in `@reference` (no upstream support in `@import`;
non-trivial)
- [x] Allow in `@config`
- [x] Allow in `@plugin`
- [ ] Consider path aliases when offering completions
- [ ] Allow in `@import` (no upstream support; non-trivial)
- [ ] Allow in `@reference` (no upstream support in `@import`;
non-trivial)
- [x] Allow in `@config`
- [x] Allow in `@plugin`1 parent 9dfa540 commit e871fc9
File tree
44 files changed
+1341
-295
lines changed- packages
- tailwindcss-language-server
- src
- css
- lib
- resolver
- util
- v4
- tests
- fixtures/v4
- invalid-import-order
- missing-files
- path-mappings
- src/a
- hover
- tailwindcss-language-service
- src
- vscode-tailwindcss
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
44 files changed
+1341
-295
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
Lines changed: 56 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | | - | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
22 | 56 | | |
23 | | - | |
24 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
25 | 62 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
Lines changed: 33 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | | - | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
195 | 197 | | |
196 | 198 | | |
197 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
Lines changed: 49 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
14 | | - | |
| 13 | + | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
| |||
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
134 | 139 | | |
135 | 140 | | |
136 | 141 | | |
| |||
191 | 196 | | |
192 | 197 | | |
193 | 198 | | |
194 | | - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
195 | 204 | | |
196 | 205 | | |
197 | 206 | | |
| |||
321 | 330 | | |
322 | 331 | | |
323 | 332 | | |
324 | | - | |
325 | | - | |
326 | 333 | | |
327 | 334 | | |
328 | 335 | | |
| |||
340 | 347 | | |
341 | 348 | | |
342 | 349 | | |
343 | | - | |
| 350 | + | |
344 | 351 | | |
345 | 352 | | |
346 | 353 | | |
| |||
418 | 425 | | |
419 | 426 | | |
420 | 427 | | |
421 | | - | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
422 | 432 | | |
423 | 433 | | |
424 | 434 | | |
| |||
445 | 455 | | |
446 | 456 | | |
447 | 457 | | |
448 | | - | |
| 458 | + | |
449 | 459 | | |
450 | 460 | | |
451 | | - | |
| 461 | + | |
452 | 462 | | |
453 | 463 | | |
454 | 464 | | |
455 | | - | |
| 465 | + | |
456 | 466 | | |
457 | 467 | | |
458 | 468 | | |
| |||
497 | 507 | | |
498 | 508 | | |
499 | 509 | | |
500 | | - | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
501 | 514 | | |
502 | 515 | | |
503 | 516 | | |
| |||
513 | 526 | | |
514 | 527 | | |
515 | 528 | | |
516 | | - | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
517 | 535 | | |
518 | 536 | | |
519 | 537 | | |
| |||
527 | 545 | | |
528 | 546 | | |
529 | 547 | | |
| 548 | + | |
530 | 549 | | |
531 | 550 | | |
532 | | - | |
| 551 | + | |
533 | 552 | | |
534 | | - | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
535 | 557 | | |
536 | 558 | | |
537 | 559 | | |
| |||
594 | 616 | | |
595 | 617 | | |
596 | 618 | | |
597 | | - | |
| 619 | + | |
598 | 620 | | |
599 | | - | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
600 | 624 | | |
601 | 625 | | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
602 | 630 | | |
603 | 631 | | |
604 | 632 | | |
605 | 633 | | |
606 | 634 | | |
607 | | - | |
608 | | - | |
609 | | - | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
610 | 639 | | |
611 | 640 | | |
612 | 641 | | |
| |||
0 commit comments