Commit Graph

99 Commits (cf2a5535b997dd43825a6ca07f87d7058418610b)

Author SHA1 Message Date
Brad Cornes ce897c9b12
Support `InitializeParams.rootUri` (#725)
* Support `InitializeParams.rootUri`

* Remove log
2023-03-10 11:09:36 +00:00
Brad Cornes 8e70fbb460
Add workspace root document selector when there's exactly one active project (#711) 2023-01-27 13:40:13 +00:00
Brad Cornes 8c152bd650
Only watch directories up to workspace root (#709)
* Don't watch beyond workspace root

* Catch errors when adding paths to chokidar watcher

* Normalize paths

* wip
2023-01-27 11:24:28 +00:00
Brad Cornes 7fdf6c437d
Normalize document selector pattern (#708) 2023-01-27 10:35:37 +00:00
Brad Cornes 0fab387f77
Update `context.getClassList` usage (#707)
* Update `context.getClassList` usage

* fix default metadata
2023-01-27 10:33:35 +00:00
Brad Cornes 637f838725
Use `itemDefaults` to reduce size of completion lists (#706)
* Use completion list `itemDefaults`

* more defaults
2023-01-27 10:30:27 +00:00
Brad Cornes 86850376db Reduce size of project key in completion items 2023-01-16 19:28:49 +00:00
Brad Cornes dd6bb57f68
Escape brackets in glob patterns (#694) 2023-01-05 14:56:39 +00:00
Brad Cornes d0b4a3ecda
Fix document selector when `configFile` setting is a string (#693) 2023-01-05 14:28:04 +00:00
Brad Cornes 07ad87e8da
Support class modifiers (#686) 2023-01-03 16:22:15 +00:00
Merrick Luo 0a900b9bf6
Fix method called before initialize (#667)
wait for init in onInitialize before sending response to the client,
so that client won't try to do request before the lsp handlers are registered.
2022-12-13 17:05:12 +00:00
anbcodes a740b0e240
Fix error when `initializationOptions` is undefined (#656)
Co-authored-by: Anbcodes <me@anb.codes>
2022-11-09 10:01:34 +00:00
Brad Cornes 55d2b9e8da
Improve `experimental.configFile` in multi-root workspaces (#640) 2022-10-20 18:41:01 +01:00
Brad Cornes 30bf090d71 Add missing default function 2022-10-20 17:48:54 +01:00
Brad Cornes b26e122fac
Add automatic support for multi-config workspaces, including `@config` resolution (#633)
* wip

* wip

* Boot client if a CSS file contains `@config`

* wip

* Check document exists

* wip

* Fix duplicate document selector

* wip

* Use enum for document selector priorities

* Delete unused functions

* Remove unused state type

* Share glob patterns

* Update config file glob

* fix logs

* Fix filename checks on Windows

* Don't show error popups

* wip

* handle negated content paths

* Handle non-tailwind dependency installs

* add package root to document selectors

* tidy

* wip

* dedupe document selectors

* Fix `@config` regex

* Fix document selectors when using `experimental.configFile`

* Remove log
2022-10-18 20:35:02 +01:00
Brad Cornes f59adbe35b Adopt `getVariants` API 2022-10-17 18:05:04 +01:00
Brad Cornes bf57dd14bc Add support for `@config` 2022-10-17 17:59:07 +01:00
Brad Cornes 1b730cb656 Theme helper improvements 2022-10-17 17:56:00 +01:00
Brad Cornes c9acd0d124
Fix IntelliSense when separator is `--` (#628)
* Fix IntelliSense when separator is `--`

* Tidy up
2022-10-13 09:23:19 +01:00
Brad Cornes 72569b00dd
Fix `configFile` path resolution (#617) 2022-09-30 15:09:12 +01:00
Brad Cornes 8aa2064684
Merge settings with defaults (#605) 2022-09-13 17:31:09 +01:00
A.I d32e11fa60
fix: guard against optional client capabilities (#602)
for client like lsp-mode for emacs which doesn't have colorProvider,
server is failing to start, and according to the specification, the
capabilities here is all optional, so we should guard the nil situation.
2022-09-12 10:13:02 +01:00
Brad Cornes aeb1595b86
Use patched version of `enhanced-resolve` (#600) 2022-09-07 16:49:29 +01:00
Brad Cornes 0efcdd773e
Support `node:` module prefix (#585) 2022-07-25 17:43:37 +01:00
Brad Cornes d298014070
Support `require.extensions` mutations (#583) 2022-07-25 16:28:54 +01:00
Brad Cornes f368c1c454
Don't watch `package.json` files (#573) 2022-07-06 17:08:36 +01:00
Brad Cornes 05a8685c49 Bump `dset` to `v3.1.2` 2022-07-06 16:12:54 +01:00
Brad Cornes a39da43e4c
Support `insiders` versions of `tailwindcss` (#571)
* Support `insiders` versions of `tailwindcss`

* Revert import reorder
2022-07-06 16:07:13 +01:00
Brad Cornes 82d0d442e8 Account for undefined dependencies 2022-05-16 11:00:34 +01:00
Brad Cornes 78a20f4daf
Add `experimental.configFile` setting (#541)
* Add experimental `configFile` setting

* Fix initial capability registration

* Update readme

* Add setting default and description

* Remove unused variable

* Be more defensive when reading setting

* Fix type

* Fix type
2022-04-25 15:06:31 +01:00
Brad Cornes c56e800f23
Add settings to enable/disable specific features (#535)
* Add `suggest` and `hover` settings

* Rename settings, add `codeActions` setting
2022-04-20 15:04:51 +01:00
Brad Cornes fbbd4bc2d0
Add Tailwind CSS language mode (#518)
* Use `esbuild`

* Replace direct `eval`

* add initial language mode

* Update capabilities, add rename provider

* Update vscode types

* Add completion middleware to match built-in CSS provider

* Update language config to match built-in CSS language

* Add folding region completion provider

* Add stylesheet cache

* Add log and error handling

* Update settings handling, debounce validation

* Fix response flakiness by always augmenting CSS

* Respect folding range limit

* Use uncommon symbol as `@media` placeholder

* Update readme

* Use `esbuild` for language server build

* Add `theme()` completion item

* Avoid errors when using `@media screen()`

* Update readme

* Add CSS server to build script

* Rename language mode server file in prod

* Update VS Code `engines` and types versions

* Update grammar
2022-04-13 14:05:41 +01:00
Brad Cornes 0a6e5def00
Replace `@vercel/ncc` with `esbuild` (#517)
* Use `esbuild`

* Replace direct `eval`

* Use `esbuild` for language server build
2022-04-13 13:54:33 +01:00
Brad Cornes e173a6fa64 Filter out empty `files.exclude` items 2022-01-24 12:21:15 +00:00
Brad Cornes 85cf5edccb Protect against undefined separator (#427) 2022-01-17 18:06:28 +00:00
Brad Cornes 9bc82821c7 Fix for missing `files` config 2022-01-17 15:40:55 +00:00
Brad Cornes 6eb310dfda Remove log 2022-01-17 15:21:43 +00:00
Brad Cornes 08927cb758 Add default excluded files (for non-vscode clients) 2022-01-17 15:14:09 +00:00
Brad Cornes 5b675434f0 Don't read configuration from `initializationOptions` 2022-01-17 13:58:13 +00:00
Brad Cornes ff52e815b6 Add `files.exclude` setting 2022-01-07 17:13:11 +00:00
Brad Cornes 6fdef8616a Add bundled version of `tailwindcss` and first-party plugins 2022-01-07 11:42:39 +00:00
Brad Cornes f5006a8ff2 Exclude `*` from class completions 2021-12-06 16:06:30 +00:00
Brad Cornes a655ad4701 Bump `@parcel/watcher`
Adds M1 builds for language server
2021-11-26 15:07:15 +00:00
Brad Cornes d256d5388e Update variant API for compatibility with `v3-alpha.2` 2021-11-05 16:13:22 +00:00
Brad Cornes 1557dfdabf Ensure jit state is reset 2021-11-05 12:38:54 +00:00
Brad Cornes 634b8c6fb1 Fix mode identification when using nested presets (#431) 2021-10-29 17:51:55 +01:00
Brad Cornes e786ece8c3 Catch errors when resolving config and creating context 2021-10-29 17:49:42 +01:00
Brad Cornes 1eb62db848 reinstate `console.log` override 2021-10-08 17:36:41 +01:00
Brad Cornes 80e2e5aba5 Fix resolution of WSL files on Windows (#411) 2021-10-08 16:48:44 +01:00
Brad Cornes d32e9cc086 bump `postcss` 2021-10-08 10:55:38 +01:00