Skip to content

Commit

Permalink
Add preliminary support for v4 (#917)
Browse files Browse the repository at this point in the history
* Move utls into separate file

* Move document service to separate file

* Move project-related stuff into a separate file

* Move `TW` class to separate file

* Add comment

* Refactor

* Run server in the same process

This makes the test cycle much faster because builds happen incrementally in development while vitest is running rather than having to rebuild and re-run the tests

* Refactor

* Sync lanaguage server versions

* Update types

* Use local expect for concurrent tests

* Eliminate a call into settings cache

We’d already looked up the settings immediately before this

* Start migration to feature based checks

* wip

* Refactor project detection

* Fix line endings

* Add tests for v4

wip

* Detect v4 projects

* Load v4 projects

* Add v4 support to colors, hovers, completions, and conflict diagnostics

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Add test

* wip

* Complete @theme variables

* wip

* wip

* wip

* Fix issues with v2 projects

* Update test

* Update tests

* Re-enable test

* Use prettier to format CSS

* wip

* wip

* Fix CS

---------

Co-authored-by: Kris Braun <kris.braun@gmail.com>
  • Loading branch information
thecrypticace and KrisBraun committed Mar 5, 2024
1 parent 8d22df1 commit 6772f50
Show file tree
Hide file tree
Showing 68 changed files with 8,416 additions and 3,520 deletions.
175 changes: 150 additions & 25 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions packages/tailwindcss-language-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"@tailwindcss/aspect-ratio": "0.4.2",
"@tailwindcss/container-queries": "0.1.0",
"@tailwindcss/forms": "0.5.3",
"@tailwindcss/language-service": "*",
"@tailwindcss/line-clamp": "0.4.2",
"@tailwindcss/typography": "0.5.7",
"@types/debounce": "1.2.0",
Expand Down Expand Up @@ -65,18 +66,19 @@
"postcss": "8.4.31",
"postcss-load-config": "3.0.1",
"postcss-selector-parser": "6.0.2",
"prettier": "2.3.0",
"prettier": "^2.8.8",
"resolve": "1.20.0",
"rimraf": "3.0.2",
"stack-trace": "0.0.10",
"tailwindcss": "3.4.1",
"@tailwindcss/language-service": "*",
"typescript": "5.3.3",
"vite-tsconfig-paths": "^4.3.1",
"vitest": "^1.1.2",
"vscode-css-languageservice": "6.2.9",
"vscode-jsonrpc": "8.1.0",
"vscode-languageserver": "8.0.2",
"vscode-languageserver-textdocument": "1.0.7",
"vscode-jsonrpc": "8.2.0",
"vscode-languageclient": "8.1.0",
"vscode-languageserver": "8.1.0",
"vscode-languageserver-textdocument": "1.0.11",
"vscode-uri": "3.0.2"
},
"prettier": {
Expand Down
10 changes: 10 additions & 0 deletions packages/tailwindcss-language-server/src/cache-map.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export class CacheMap<TKey = string, TValue = any> extends Map<TKey, TValue> {
remember(key: TKey, factory: (key: TKey) => TValue): TValue {
let value = super.get(key)
if (!value) {
value = factory(key)
this.set(key, value)
}
return value!
}
}
Loading

0 comments on commit 6772f50

Please sign in to comment.