Commit Graph

115 Commits (35b9d115bb17afcdc2b8757ff4ca710fa024acc3)

Author SHA1 Message Date
Max 35b9d115bb
Migrate from deprecated text document (#781)
* Removed instances of deprecated TextDocument

* Replaced TextDocument type in diagnostics
2023-05-15 11:21:43 +01:00
Brad Cornes 8266d6b0aa
Resolve helper functions in CSS previews (#766) 2023-04-25 16:47:12 +01:00
Brad Cornes 8f45144eb7 Fix culori type 2023-04-25 16:45:03 +01:00
Mark Skelton c5d20ab343
fix: Don't attempt to read from deleted CSS files (#765) 2023-04-24 14:26:52 +01:00
Brad Cornes 2e2dcc2e0e
Fix first-party plugin usage when using bundled version of `tailwindcss` (#751) 2023-03-30 10:30:52 +01:00
Brad Cornes 85e32e3adf Account for `loadConfig` returning `{default:config}` just in case
See also: https://github.com/tailwindlabs/tailwindcss/pull/10898
2023-03-29 15:50:12 +01:00
Brad Cornes 9482dd95ad
Bump bundled version of `tailwindcss` to `v3.3.0` (#749) 2023-03-29 15:43:15 +01:00
Brad Cornes 18dd2e7b09 Ensure `itemDefaults.data` is used in VS Code Insiders 2023-03-28 11:59:47 +01:00
Brad Cornes db61c8891b
Exclude classes in `blocklist` from IntelliSense (#746) 2023-03-27 18:56:02 +01:00
Brad Cornes 7978a2eb28 Fix format assumption when resolving module dependencies
https://github.com/tailwindlabs/tailwindcss/pull/10878
2023-03-27 18:49:25 +01:00
Remco Haszing ae18cb2449
Remove language service dependency on TextDocuments (#742)
The code actions API depends on `TextDocuments`. This is specific to the
language server. This makes it hard to use without a language server.

The use of `TextDocuments` has been removed. Instead, the resolved text
document is passed down.
2023-03-27 18:39:56 +01:00
Brad Cornes 33f94bae1a
Fix use of certain built-in node modules in config file (#745) 2023-03-26 18:20:24 +01:00
Brad Cornes fdc64cfef1 Fix `getModuleDependencies`
439fdadb3a
2023-03-20 18:57:44 +00:00
Brad Cornes d14c81f45d
Replace `detective-typescript` (#739) 2023-03-20 17:46:45 +00:00
Brad Cornes 28b4abb644
Support TS/ESM config files (#738) 2023-03-20 11:12:02 +00:00
Brad Cornes 016373e79a
Bundle `@tailwindcss/container-queries` (#733) 2023-03-13 11:21:29 +00:00
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