Commit Graph

146 Commits (31e28e862f79114ba3890f40033d78d29cdfdec5)

Author SHA1 Message Date
Josh Price 92410c1bf8
Support Surface templates (#597)
Surface support is defined here https://github.com/msaraiva/vscode-surface/blob/master/syntaxes/surface.json

See https://github.com/tailwindlabs/tailwindcss-intellisense/issues/407 and 1253902e88
2022-08-30 10:06:34 +01:00
Brad Cornes 112fae6a6c
Replace `multi-regexp2` with `becke-ch--regex--s0-0-v1--base--pl--lib` (#590) 2022-08-05 16:58:50 +01:00
Brad Cornes d09a4b11f1
Deduplicate classlist candidates (#572) 2022-07-06 16:40:29 +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 15bc6dbc19 Improve `theme` helper detection 2022-06-02 14:40:37 +01:00
Brad Cornes 76cbaa4948
Add support for arbitrary variants (#557)
* Support arbitrary variants

* Bump typescript and types versions
2022-05-26 11:31:22 +01:00
Brad Cornes a2b694c3e0
Fix overeager `<style>` detection (#543) 2022-04-28 12:14:36 +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 cd1678bd8d
Fix language features when using nested Vue `<template>` (#532) 2022-04-19 15:02:27 +01:00
Brad Cornes 183cc2f863
Revert "Improve conflict diagnostics (#503)" (#525)
This reverts commit ddfaea21cc.
2022-04-13 22:24:02 +01:00
Remco Haszing bc2e5edd45
Convert dlv require statements to imports (#521)
It was already imported in one place, that appears to work fine.

Using `require` results in invalid ESM output, because `require` is not
defined in ES modules.
2022-04-13 17:10:47 +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 d344400688 Fix flakiness caused by expired cache entries 2022-04-12 19:11:48 +01:00
Brad Cornes ddfaea21cc
Improve conflict diagnostics (#503) 2022-03-04 15:41:44 +00:00
Brad Cornes 86497bb380
Rework language boundary detection (#502)
* Fix `classRegex` error

* Rework language boundary detection
2022-03-02 17:16:35 +00:00
Brad Cornes a082bb3fd7
Fix `classRegex` error (#501) 2022-02-28 13:49:07 +00:00
Brad Cornes 4be5d9d082
Detect conflicting multi-rule classes (#498) 2022-02-25 13:20:02 +00:00
Lucas Vazquez 627d463f8f
Prevent errors in not semicolon languages (#461)
* fix: prevent errors in not semicolon languages

* fix: extends fix for sugarss and stylus

* Formatting

* Fix document access

Co-authored-by: Brad Cornes <bradlc41@gmail.com>
2022-02-23 11:18:53 +00:00
dozyio 32e202a149
Add support for gohtmltmpl files for Hugo (#473) 2022-02-15 22:29:48 +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 4e8918ad8c Disable variant order linting and sorting for tailwindcss v3 2021-12-06 15:40:54 +00:00
Brad Cornes e47f5fa539 Ignore `content: var(--tw-content)` when determining color 2021-11-05 16:29:34 +00:00
Brad Cornes ba21a2f1d8 fix color detection 2021-10-08 18:24:57 +01:00
Brad Cornes 251d32faaf increase classlist search range (#414) 2021-10-08 17:36:17 +01:00
Brad Cornes d74a53ae9e update color extraction to allow parentheses (#423) 2021-10-08 17:06:10 +01:00
Brad Cornes 0f4d93b96e add `classAttributes` setting 2021-10-08 16:51:14 +01:00
Brad Cornes d32e9cc086 bump `postcss` 2021-10-08 10:55:38 +01:00
Brad Cornes d641b8eb2b allow whitespace around class attribute `=` (#426) 2021-10-04 18:14:24 +01:00
Brad Cornes 214e2b487b add `accent-color` to list of color-related CSS properties 2021-10-04 16:10:16 +01:00
Brad Cornes 53743f2faa
Add support for v3-alpha (#424)
* wip

* Update v3 support, color handling

* Update diagnostics and completions

* bump language service

* update context api usage

* bump language service
2021-10-01 14:11:45 +01:00
Brad Cornes a4f5a5f287 tweak style block regexes 2021-09-29 16:38:23 +01:00
Brad Cornes 62ddc243d3 Merge branch 'master' into bugfix-style 2021-09-24 17:48:42 +01:00
Brad Cornes 1253902e88 add `phoenix-heex` language (#407) 2021-09-24 16:11:23 +01:00
Brad Cornes 7e2b53cd11 avoid false positives when parsing colors (#415) 2021-09-24 15:05:07 +01:00
Brad Cornes 6367de3870 update `<style>` patterns 2021-09-10 12:33:35 +01:00
Brad Cornes 6812188323 Fix error when rule doesn't have a parent 2021-09-03 13:23:55 +01:00
Brad Cornes 02d7b4fc09 Merge branch 'master' into css-helpers 2021-08-18 12:10:36 +01:00
Brad Cornes 79a3f2b5a1 use character-base ranges when looking for classes 2021-08-13 17:59:14 +01:00
Brad Cornes 3d6e9b7e4d remove logs 2021-08-13 17:50:50 +01:00
Brad Cornes 569635067c update css helper hovers 2021-07-12 15:23:16 +01:00
Brad Cornes 114284865d prettier 2021-07-07 12:38:00 +01:00
Brad Cornes 579d580896 update diagnostic message 2021-07-07 12:37:41 +01:00
Akihiro Okuno 1da2139684
Avoid `invalidConfigPath` for function values
Pass `validateConfigPath` if a type of value equals to `function`. The purpose of this commit is to avoid unwanted warnings when we define theme values as functions in tailwind.config.js, which, for example, are required to define theme colors with opacity enabled. https://github.com/tailwindlabs/tailwindcss/discussions/2206#discussioncomment-60081
2021-07-06 18:33:46 +09:00
Brad Cornes c2a9479a4d remove `@defaults` when stringifying CSS 2021-07-05 14:09:33 +01:00
Brad Cornes eaa76f195a fix semi-colon insertion for indented rules 2021-07-05 14:03:21 +01:00
Brad Cornes c2345f0112 update `@tailwind` completions and diagnostics 2021-06-16 19:37:35 +01:00
Brad Cornes 16864d96ae ignore empty `content` when determining rule color 2021-06-15 20:39:53 +01:00
Brad Cornes 6e092ddf33 add astro languages 2021-06-05 15:46:00 +01:00
Brad Cornes 14ec688199 formatting 2021-06-04 17:00:34 +01:00
Brad Cornes 388cbb8351 tweak opacity modifier completions 2021-06-04 17:00:27 +01:00
Brad Cornes 73886ffbf0 tweak semi-colon regex 2021-06-04 13:37:44 +01:00
Brad Cornes 4de605928b support tailwindcss v2.2 2021-06-04 12:17:00 +01:00
Brad Cornes bdb398bf80 add lerna and separate language server package 2021-06-01 12:37:15 +01:00
Brad Cornes b7bf51f156 fix completions and hovers inside `<style>` (fixes #334) 2021-05-20 16:50:10 +01:00
Brad Cornes b8dc88d699 show pixel equivalents in jit mode (fixes #332) 2021-05-20 13:24:16 +01:00
Brad Cornes 5cf4b1717d [JIT] add opacity modifier completions 2021-05-18 12:22:18 +01:00
Brad Cornes 4cee488fb4 fix @​variants completions/diagnostics in JIT mode (fixes #324) 2021-05-17 12:38:52 +01:00
Brad Cornes 482b5bc7af fix @​apply in plugins in jit mode 2021-05-10 13:41:48 +01:00
Brad Cornes 2f2d66124a resolve jit modules together 2021-05-06 18:01:54 +01:00
Brad Cornes e08ac09959 fix re-init short-circuit
now it takes config dependencies into account
2021-05-05 17:56:45 +01:00
Brad Cornes 15fd935c57 update diagnostic name 2021-05-05 14:52:22 +01:00
Brad Cornes 580b183d89 remove unused imports 2021-05-04 12:41:13 +01:00
Brad Cornes a72226c141 update settings schema 2021-05-04 12:40:50 +01:00
Brad Cornes e0ef982fd5 update colorDecorators setting 2021-05-04 12:17:06 +01:00
Brad Cornes 6aabc3d9a5 short-circuit re-initialisation 2021-05-04 11:55:32 +01:00
Brad Cornes 99297add4e add jit support, refactor for general reliability 2021-05-03 18:00:04 +01:00
Brad Cornes 5a810fd193 tweak pixel equivalent comment spacing (#200) 2021-02-07 20:58:41 +00:00
Brad Cornes 14f0fe9f3f replace `experimental.showPixelValues` setting with `showPixelEquivalents` and enable by default (#200) 2021-02-05 14:49:06 +00:00
Brad Cornes 0e66dac7b7 update class attribute regex (#233) 2021-01-08 15:53:02 +00:00
Brad Cornes 4b10581005 add emmet noise check (#146) 2020-12-10 17:22:06 +00:00
Brad Cornes 763fc18300
Merge pull request #222 from dcalhoun/add-rescript-support
Add ReScript support
2020-12-10 14:14:09 +00:00
Brad Cornes e530f03739 add missing import 2020-12-07 15:52:01 +00:00
Brad Cornes b2d47d220b add hover, color decorator, linting support for classRegex setting (#129) 2020-12-07 15:39:44 +00:00
David Calhoun dcde392ba6 Add ReScript support 2020-12-06 13:31:39 -06:00
Brad Cornes 534eb253ac update custom regex support (#129)
fixes "ors" in regexes
2020-12-02 13:52:09 +00:00
Brad Cornes d115e008d1 remove log 2020-12-02 13:29:56 +00:00
Brad Cornes 615fd7f630 add experimental showPixelValues setting 2020-12-01 19:05:58 +00:00
Brad Cornes 85fb953d0a classRegex: increase search range, make search global (#129) 2020-12-01 16:35:46 +00:00
Brad Cornes c508a028d4 add support for [ngClass] attribute (#187) 2020-11-30 18:15:31 +00:00
Brad Cornes 3fc1a11196 add mdx language support 2020-11-30 15:54:31 +00:00
Brad Cornes 9c60e0bfca add @​layer completions 2020-11-27 17:13:46 +00:00
Brad Cornes 4f0e415df7 update docs urls 2020-11-27 17:05:58 +00:00
Brad Cornes a4fdd949be add experimental classRegex setting (#129) 2020-11-27 16:56:19 +00:00
Brad Cornes 5633349c49 remove comment 2020-11-26 20:07:56 +00:00
Brad Cornes e0f8d73a79 respect editor tab size in CSS previews 2020-11-26 20:07:39 +00:00
Brad Cornes fa875e1d50 export completionsFromClassList 2020-11-26 18:27:13 +00:00
Brad Cornes 689aaa6d3b update color parser to avoid false positives (#180) 2020-11-24 15:50:11 +00:00
Brad Cornes e6a371921f update class attribute regex 2020-11-24 15:45:08 +00:00
Brad Cornes 2c05f5df3a improve support for tailwindcss v2 2020-11-19 17:34:59 +00:00
Brad Cornes 0cce870c13 update for at-apply changes in v2 2020-11-03 11:08:39 +00:00
Brad Cornes 33523b3f11 remove lerna and update lsp deps 2020-11-03 11:02:30 +00:00
Brad Cornes 8aca9fcd37 import types only 2020-10-08 17:06:29 +01:00
Brad Cornes ccf7cd57a7 separate out tailwindcss-language-service package 2020-10-08 16:20:54 +01:00