@enjoys/context-engine 1.2.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/codeActions/css.json +111 -0
- package/data/codeActions/tailwindcss.json +76 -0
- package/data/codeLens/css.json +68 -0
- package/data/codeLens/tailwindcss.json +47 -0
- package/data/color/css.json +124 -0
- package/data/color/tailwindcss.json +53 -0
- package/data/commands/css.json +41 -0
- package/data/commands/manifest.json +729 -727
- package/data/commands/tailwindcss.json +53 -0
- package/data/completion/css.json +383 -0
- package/data/completion/javascript.json +27 -0
- package/data/completion/redis-cli.json +1 -1
- package/data/completion/tailwindcss.json +284 -0
- package/data/completion/typescript.json +27 -0
- package/data/declaration/css.json +59 -0
- package/data/declaration/tailwindcss.json +65 -0
- package/data/definition/css.json +115 -0
- package/data/definition/redis-cli.json +1 -1
- package/data/definition/tailwindcss.json +115 -0
- package/data/documentHighlight/css.json +50 -0
- package/data/documentHighlight/tailwindcss.json +65 -0
- package/data/documentRangeFormatting/css.json +101 -0
- package/data/documentRangeFormatting/tailwindcss.json +55 -0
- package/data/documentSymbol/css.json +96 -0
- package/data/documentSymbol/tailwindcss.json +61 -0
- package/data/foldingRange/css.json +66 -0
- package/data/foldingRange/tailwindcss.json +60 -0
- package/data/formatting/css.json +73 -0
- package/data/formatting/tailwindcss.json +48 -0
- package/data/hover/css.json +68 -0
- package/data/hover/redis-cli.json +1 -1
- package/data/hover/tailwindcss.json +968 -0
- package/data/implementation/css.json +65 -0
- package/data/implementation/tailwindcss.json +59 -0
- package/data/inlayHints/css.json +87 -0
- package/data/inlayHints/tailwindcss.json +111 -0
- package/data/inlineCompletions/css.json +125 -0
- package/data/inlineCompletions/javascript.json +12 -0
- package/data/inlineCompletions/tailwindcss.json +411 -0
- package/data/inlineCompletions/typescript.json +12 -0
- package/data/linkedEditingRange/css.json +40 -0
- package/data/linkedEditingRange/tailwindcss.json +30 -0
- package/data/links/css.json +55 -0
- package/data/links/tailwindcss.json +40 -0
- package/data/manifest.json +62 -0
- package/data/onTypeFormatting/css.json +82 -0
- package/data/onTypeFormatting/tailwindcss.json +63 -0
- package/data/rangeSemanticTokens/css.json +125 -0
- package/data/rangeSemanticTokens/tailwindcss.json +95 -0
- package/data/references/css.json +65 -0
- package/data/references/tailwindcss.json +59 -0
- package/data/rename/css.json +91 -0
- package/data/rename/tailwindcss.json +58 -0
- package/data/selectionRange/css.json +55 -0
- package/data/selectionRange/tailwindcss.json +35 -0
- package/data/semanticTokens/css.json +107 -0
- package/data/semanticTokens/tailwindcss.json +161 -0
- package/data/signatureHelp/css.json +137 -0
- package/data/signatureHelp/tailwindcss.json +64 -0
- package/data/typeDefinition/css.json +53 -0
- package/data/typeDefinition/tailwindcss.json +47 -0
- package/package.json +1 -1
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"language": "tailwindcss",
|
|
3
|
+
"declarations": [
|
|
4
|
+
{
|
|
5
|
+
"pattern": "@layer\\s+(base|components|utilities)\\s*\\{",
|
|
6
|
+
"captureGroup": 1,
|
|
7
|
+
"kind": "module",
|
|
8
|
+
"description": "Tailwind @layer block declaration — defines custom styles within a specific Tailwind layer."
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"pattern": "@apply\\s+([\\w\\s:/-]+)\\s*;",
|
|
12
|
+
"captureGroup": 1,
|
|
13
|
+
"kind": "variable",
|
|
14
|
+
"description": "Tailwind @apply rule — applies utility classes inline within a custom CSS rule."
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"pattern": "@tailwind\\s+(base|components|utilities|variants)\\s*;",
|
|
18
|
+
"captureGroup": 1,
|
|
19
|
+
"kind": "namespace",
|
|
20
|
+
"description": "Tailwind directive — injects a layer of generated Tailwind styles into the stylesheet."
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"pattern": "@config\\s+['\"]([^'\"]+)['\"]\\s*;",
|
|
24
|
+
"captureGroup": 1,
|
|
25
|
+
"kind": "file",
|
|
26
|
+
"description": "Tailwind @config directive — specifies the configuration file path for this stylesheet."
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"pattern": "\\.([\\w-]+)\\s*\\{[^}]*@apply",
|
|
30
|
+
"captureGroup": 1,
|
|
31
|
+
"kind": "class",
|
|
32
|
+
"description": "Custom CSS class that uses @apply to compose Tailwind utilities."
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"pattern": "@responsive\\s*\\{",
|
|
36
|
+
"captureGroup": 0,
|
|
37
|
+
"kind": "module",
|
|
38
|
+
"description": "Legacy Tailwind @responsive directive — generates responsive variants of contained utilities."
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"pattern": "@variants\\s+([\\w,\\s]+)\\s*\\{",
|
|
42
|
+
"captureGroup": 1,
|
|
43
|
+
"kind": "module",
|
|
44
|
+
"description": "Legacy Tailwind @variants directive — generates state variants for contained utilities."
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"pattern": "addUtilities\\s*\\(",
|
|
48
|
+
"captureGroup": 0,
|
|
49
|
+
"kind": "function",
|
|
50
|
+
"description": "Tailwind plugin API — registers new utility classes via the plugin system."
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"pattern": "addComponents\\s*\\(",
|
|
54
|
+
"captureGroup": 0,
|
|
55
|
+
"kind": "function",
|
|
56
|
+
"description": "Tailwind plugin API — registers new component classes via the plugin system."
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"pattern": "matchUtilities\\s*\\(",
|
|
60
|
+
"captureGroup": 0,
|
|
61
|
+
"kind": "function",
|
|
62
|
+
"description": "Tailwind plugin API — registers dynamic utilities that accept arbitrary values."
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
{
|
|
2
|
+
"language": "css",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"display": {
|
|
5
|
+
"signature": "display: <display-outside> || <display-inside> | <display-listitem> | <display-internal> | <display-box> | <display-legacy>",
|
|
6
|
+
"description": "Specifies the type of rendering box used for an element. Controls the outer display type (block/inline) and inner display type (flow/flex/grid/table).",
|
|
7
|
+
"type": "property"
|
|
8
|
+
},
|
|
9
|
+
"position": {
|
|
10
|
+
"signature": "position: static | relative | absolute | fixed | sticky",
|
|
11
|
+
"description": "Sets how an element is positioned in the document flow. `relative` offsets from normal position; `absolute` removes from flow relative to positioned ancestor; `fixed` relative to viewport; `sticky` toggles between relative and fixed based on scroll.",
|
|
12
|
+
"type": "property"
|
|
13
|
+
},
|
|
14
|
+
"flex": {
|
|
15
|
+
"signature": "flex: none | [ <flex-grow> <flex-shrink>? || <flex-basis> ]",
|
|
16
|
+
"description": "Shorthand for flex-grow, flex-shrink, and flex-basis. Determines how a flex item grows or shrinks to fill available space in a flex container.",
|
|
17
|
+
"type": "shorthand-property"
|
|
18
|
+
},
|
|
19
|
+
"grid": {
|
|
20
|
+
"signature": "grid: <grid-template> | <grid-template-rows> / [ auto-flow && dense? ] <grid-auto-columns>?",
|
|
21
|
+
"description": "Shorthand for grid-template-rows, grid-template-columns, grid-template-areas, grid-auto-rows, grid-auto-columns, and grid-auto-flow. Establishes a grid formatting context.",
|
|
22
|
+
"type": "shorthand-property"
|
|
23
|
+
},
|
|
24
|
+
"margin": {
|
|
25
|
+
"signature": "margin: [ <length> | <percentage> | auto ]{1,4}",
|
|
26
|
+
"description": "Sets the margin area on all four sides. Margins create extra space around an element. Accepts auto for horizontal centering of block elements.",
|
|
27
|
+
"type": "shorthand-property"
|
|
28
|
+
},
|
|
29
|
+
"padding": {
|
|
30
|
+
"signature": "padding: [ <length> | <percentage> ]{1,4}",
|
|
31
|
+
"description": "Sets the padding area on all four sides. Padding creates space between the element's content and its border. Cannot be negative.",
|
|
32
|
+
"type": "shorthand-property"
|
|
33
|
+
},
|
|
34
|
+
"box-sizing": {
|
|
35
|
+
"signature": "box-sizing: content-box | border-box",
|
|
36
|
+
"description": "Defines how the total width and height of an element is calculated. `content-box` (default) excludes padding/border from width/height; `border-box` includes them.",
|
|
37
|
+
"type": "property"
|
|
38
|
+
},
|
|
39
|
+
"z-index": {
|
|
40
|
+
"signature": "z-index: auto | <integer>",
|
|
41
|
+
"description": "Sets the stacking order of a positioned element. Elements with a higher z-index are rendered in front. Only applies to positioned elements (not static). Creates a new stacking context when set to a non-auto value on positioned elements.",
|
|
42
|
+
"type": "property"
|
|
43
|
+
},
|
|
44
|
+
"overflow": {
|
|
45
|
+
"signature": "overflow: [ visible | hidden | clip | scroll | auto ]{1,2}",
|
|
46
|
+
"description": "Controls what happens when content overflows an element's box. Can set x and y independently. `hidden` clips and prevents scrolling; `scroll` always shows scrollbars; `auto` shows scrollbars only when needed; `clip` clips without creating a scroll container.",
|
|
47
|
+
"type": "shorthand-property"
|
|
48
|
+
},
|
|
49
|
+
"opacity": {
|
|
50
|
+
"signature": "opacity: <alpha-value>",
|
|
51
|
+
"description": "Sets the transparency level. Values from 0.0 (fully transparent) to 1.0 (fully opaque). Applies to the entire element and all its children. Creates a new stacking context.",
|
|
52
|
+
"type": "property"
|
|
53
|
+
},
|
|
54
|
+
"transition": {
|
|
55
|
+
"signature": "transition: <property> <duration> <timing-function>? <delay>?",
|
|
56
|
+
"description": "Shorthand for transition-property, transition-duration, transition-timing-function, and transition-delay. Defines smooth transitions between CSS property values when they change.",
|
|
57
|
+
"type": "shorthand-property"
|
|
58
|
+
},
|
|
59
|
+
"animation": {
|
|
60
|
+
"signature": "animation: <name> <duration> <timing-function>? <delay>? <iteration-count>? <direction>? <fill-mode>? <play-state>?",
|
|
61
|
+
"description": "Shorthand to configure CSS animations. References @keyframes rules by name. Controls timing, repetition, direction, and fill behavior.",
|
|
62
|
+
"type": "shorthand-property"
|
|
63
|
+
},
|
|
64
|
+
"transform": {
|
|
65
|
+
"signature": "transform: none | <transform-function>+",
|
|
66
|
+
"description": "Applies 2D or 3D transformations — translate, rotate, scale, skew, matrix, perspective. Multiple functions are applied right to left. Creates a new stacking context and containing block for positioned descendants.",
|
|
67
|
+
"type": "property"
|
|
68
|
+
},
|
|
69
|
+
"var()": {
|
|
70
|
+
"signature": "var( <custom-property-name> , <declaration-value>? )",
|
|
71
|
+
"description": "Substitutes the value of a CSS custom property. Custom properties are defined with a -- prefix and are inherited. An optional fallback value is used if the property is not defined or is invalid.",
|
|
72
|
+
"type": "function"
|
|
73
|
+
},
|
|
74
|
+
"calc()": {
|
|
75
|
+
"signature": "calc( <calc-sum> )",
|
|
76
|
+
"description": "Performs mathematical calculations for CSS values. Supports +, -, *, / operators and can mix different units (px, %, rem, vw, etc.). Nesting is allowed: calc(calc(...) + ...).",
|
|
77
|
+
"type": "function"
|
|
78
|
+
},
|
|
79
|
+
"@media": {
|
|
80
|
+
"signature": "@media <media-query-list> { <stylesheet> }",
|
|
81
|
+
"description": "Applies enclosed styles conditionally based on the result of one or more media queries. Tests media type (screen, print) and features (width, height, orientation, color-scheme, prefers-reduced-motion, hover, pointer).",
|
|
82
|
+
"type": "at-rule"
|
|
83
|
+
},
|
|
84
|
+
"@keyframes": {
|
|
85
|
+
"signature": "@keyframes <keyframes-name> { <keyframe-block-list> }",
|
|
86
|
+
"description": "Defines the intermediate steps in a CSS animation as a set of keyframes. Each keyframe describes the style at a given percentage (0%/from to 100%/to) of the animation cycle. Referenced by animation-name.",
|
|
87
|
+
"type": "at-rule"
|
|
88
|
+
},
|
|
89
|
+
"@supports": {
|
|
90
|
+
"signature": "@supports <supports-condition> { <stylesheet> }",
|
|
91
|
+
"description": "Feature query that applies styles only if the browser supports the given CSS declarations or features. Supports `not`, `and`, `or` operators and `selector()` function.",
|
|
92
|
+
"type": "at-rule"
|
|
93
|
+
},
|
|
94
|
+
"@layer": {
|
|
95
|
+
"signature": "@layer <layer-name>? { <stylesheet> } | @layer <layer-name>#;",
|
|
96
|
+
"description": "Declares cascade layers to explicitly control the order of CSS specificity. Styles in earlier-declared layers have lower priority. Unlayered styles have the highest priority. Part of CSS Cascade Layers specification.",
|
|
97
|
+
"type": "at-rule"
|
|
98
|
+
},
|
|
99
|
+
"@container": {
|
|
100
|
+
"signature": "@container <container-name>? <container-condition> { <stylesheet> }",
|
|
101
|
+
"description": "Applies styles based on the size of a containing element (container queries). Requires the container element to have `container-type: inline-size | size`. Enables component-level responsive design independent of viewport size.",
|
|
102
|
+
"type": "at-rule"
|
|
103
|
+
},
|
|
104
|
+
"custom-properties": {
|
|
105
|
+
"signature": "--<name>: <value>",
|
|
106
|
+
"description": "CSS custom properties (CSS variables) are entities defined by authors that contain specific values reusable throughout a document. Set with -- prefix and accessed via var(). They participate in the cascade and are inherited by default.",
|
|
107
|
+
"type": "concept"
|
|
108
|
+
},
|
|
109
|
+
"specificity": {
|
|
110
|
+
"signature": "(ID, Class, Type)",
|
|
111
|
+
"description": "The algorithm browsers use to determine which CSS declaration applies. Three components: ID selectors (#id), class/attribute/pseudo-class selectors (.class, [attr], :hover), and type/pseudo-element selectors (div, ::before). Higher specificity wins. !important overrides normal specificity.",
|
|
112
|
+
"type": "concept"
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
{
|
|
2
|
+
"language": "tailwindcss",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"@tailwind": {
|
|
5
|
+
"signature": "@tailwind base | components | utilities | variants",
|
|
6
|
+
"description": "Directive to inject Tailwind's generated styles into your CSS. Each layer can be included independently.",
|
|
7
|
+
"type": "directive"
|
|
8
|
+
},
|
|
9
|
+
"@apply": {
|
|
10
|
+
"signature": "@apply {utility-classes...};",
|
|
11
|
+
"description": "Inline existing Tailwind utility classes into custom CSS rules. Enables reusing utility-first patterns in component styles.",
|
|
12
|
+
"type": "directive"
|
|
13
|
+
},
|
|
14
|
+
"@layer": {
|
|
15
|
+
"signature": "@layer base | components | utilities { ... }",
|
|
16
|
+
"description": "Tells Tailwind which layer a set of custom styles belongs to. Valid layers: base, components, utilities.",
|
|
17
|
+
"type": "directive"
|
|
18
|
+
},
|
|
19
|
+
"@config": {
|
|
20
|
+
"signature": "@config '{path}';",
|
|
21
|
+
"description": "Specifies which Tailwind config file to use for a CSS file. Useful in monorepos with multiple configs.",
|
|
22
|
+
"type": "directive"
|
|
23
|
+
},
|
|
24
|
+
"theme()": {
|
|
25
|
+
"signature": "theme('{dotPath}' [, '{defaultValue}'])",
|
|
26
|
+
"description": "Access Tailwind theme values in CSS. E.g. `theme('colors.blue.500')` returns `#3b82f6`. Supports dot notation for nested values.",
|
|
27
|
+
"type": "function"
|
|
28
|
+
},
|
|
29
|
+
"screen()": {
|
|
30
|
+
"signature": "screen('{breakpoint}')",
|
|
31
|
+
"description": "Reference responsive breakpoints by name in media queries. E.g. `@media screen('md')` compiles to `@media (min-width: 768px)`.",
|
|
32
|
+
"type": "function"
|
|
33
|
+
},
|
|
34
|
+
"container": {
|
|
35
|
+
"signature": "container",
|
|
36
|
+
"description": "A component class that sets width: 100% and applies responsive max-width at each breakpoint (sm: 640px, md: 768px, lg: 1024px, xl: 1280px, 2xl: 1536px).",
|
|
37
|
+
"type": "utility"
|
|
38
|
+
},
|
|
39
|
+
"sm": {
|
|
40
|
+
"signature": "sm:{utility}",
|
|
41
|
+
"description": "Responsive prefix applying styles at min-width: 640px. Mobile-first breakpoint.",
|
|
42
|
+
"type": "breakpoint"
|
|
43
|
+
},
|
|
44
|
+
"md": {
|
|
45
|
+
"signature": "md:{utility}",
|
|
46
|
+
"description": "Responsive prefix applying styles at min-width: 768px.",
|
|
47
|
+
"type": "breakpoint"
|
|
48
|
+
},
|
|
49
|
+
"lg": {
|
|
50
|
+
"signature": "lg:{utility}",
|
|
51
|
+
"description": "Responsive prefix applying styles at min-width: 1024px.",
|
|
52
|
+
"type": "breakpoint"
|
|
53
|
+
},
|
|
54
|
+
"xl": {
|
|
55
|
+
"signature": "xl:{utility}",
|
|
56
|
+
"description": "Responsive prefix applying styles at min-width: 1280px.",
|
|
57
|
+
"type": "breakpoint"
|
|
58
|
+
},
|
|
59
|
+
"2xl": {
|
|
60
|
+
"signature": "2xl:{utility}",
|
|
61
|
+
"description": "Responsive prefix applying styles at min-width: 1536px.",
|
|
62
|
+
"type": "breakpoint"
|
|
63
|
+
},
|
|
64
|
+
"arbitrary-values": {
|
|
65
|
+
"signature": "{property}-[{value}]",
|
|
66
|
+
"description": "Use arbitrary values with square bracket notation for one-off styles. E.g. `w-[200px]`, `bg-[#1da1f2]`, `grid-cols-[1fr_2fr]`.",
|
|
67
|
+
"type": "syntax"
|
|
68
|
+
},
|
|
69
|
+
"important-modifier": {
|
|
70
|
+
"signature": "!{utility}",
|
|
71
|
+
"description": "Prefix any utility with `!` to generate the style with `!important`. E.g. `!p-4` → `padding: 1rem !important`.",
|
|
72
|
+
"type": "modifier"
|
|
73
|
+
},
|
|
74
|
+
"dark-mode": {
|
|
75
|
+
"signature": "dark:{utility}",
|
|
76
|
+
"description": "Applies styles when dark mode is active. Controlled by `darkMode` option in config: 'media' (prefers-color-scheme) or 'class' (.dark parent).",
|
|
77
|
+
"type": "variant"
|
|
78
|
+
},
|
|
79
|
+
"group": {
|
|
80
|
+
"signature": "group / group-hover: / group-focus:",
|
|
81
|
+
"description": "Mark a parent with `group` class and style children with `group-{state}:` variants. Children respond to parent hover/focus/active states.",
|
|
82
|
+
"type": "variant"
|
|
83
|
+
},
|
|
84
|
+
"peer": {
|
|
85
|
+
"signature": "peer / peer-hover: / peer-focus: / peer-checked:",
|
|
86
|
+
"description": "Mark a sibling with `peer` class and use `peer-{state}:` on subsequent siblings. Enables sibling-based conditional styling.",
|
|
87
|
+
"type": "variant"
|
|
88
|
+
},
|
|
89
|
+
"jit-mode": {
|
|
90
|
+
"signature": "mode: 'jit'",
|
|
91
|
+
"description": "Just-In-Time compilation mode generates styles on demand. Default in Tailwind CSS v3+. Enables arbitrary values, all variants, and faster build times.",
|
|
92
|
+
"type": "configuration"
|
|
93
|
+
},
|
|
94
|
+
"utility-class": {
|
|
95
|
+
"signature": "{property}-{value}",
|
|
96
|
+
"description": "Tailwind utility classes follow a `{property}-{value}` pattern. The property maps to a CSS property and the value maps to a design token from the theme configuration.",
|
|
97
|
+
"type": "concept"
|
|
98
|
+
},
|
|
99
|
+
"negative-values": {
|
|
100
|
+
"signature": "-{utility}-{value}",
|
|
101
|
+
"description": "Prefix utilities with `-` for negative values. E.g. `-m-4` → `margin: -1rem`, `-translate-x-full` → `transform: translateX(-100%)`.",
|
|
102
|
+
"type": "syntax"
|
|
103
|
+
},
|
|
104
|
+
"tailwind-config": {
|
|
105
|
+
"signature": "tailwind.config.js",
|
|
106
|
+
"description": "Configuration file for customizing Tailwind: theme (colors, spacing, fonts), plugins, content paths, dark mode, prefix, important, and variant order.",
|
|
107
|
+
"type": "configuration"
|
|
108
|
+
},
|
|
109
|
+
"content-configuration": {
|
|
110
|
+
"signature": "content: ['{paths}']",
|
|
111
|
+
"description": "Specifies file paths for Tailwind to scan for class names. Required for tree-shaking unused styles. Supports glob patterns.",
|
|
112
|
+
"type": "configuration"
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"language": "css",
|
|
3
|
+
"highlightPatterns": [
|
|
4
|
+
{
|
|
5
|
+
"pattern": "([a-z-]+)\\s*(?=:)",
|
|
6
|
+
"kind": "text",
|
|
7
|
+
"description": "CSS property names. Highlights declarations like display, margin, padding, color, background, etc."
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"pattern": "([.#]?[a-zA-Z_][a-zA-Z0-9_-]*)\\s*(?=[{,>+~:\\[\\s])",
|
|
11
|
+
"kind": "text",
|
|
12
|
+
"description": "CSS selector names. Highlights class (.name), ID (#name), and element (tag) selectors."
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"pattern": "var\\(\\s*(--(([a-zA-Z_][a-zA-Z0-9_-]*)))\\s*(?:,\\s*[^)]*)?\\)",
|
|
16
|
+
"kind": "read",
|
|
17
|
+
"description": "CSS custom property references. Highlights var(--name) usages to show where variables are consumed."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"pattern": "--(([a-zA-Z_][a-zA-Z0-9_-]*))\\s*:",
|
|
21
|
+
"kind": "write",
|
|
22
|
+
"description": "CSS custom property definitions. Highlights --property-name declarations to show where variables are assigned."
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"pattern": "@(media|keyframes|supports|layer|container|font-face|import|charset|namespace|page|counter-style|property)\\b",
|
|
26
|
+
"kind": "text",
|
|
27
|
+
"description": "CSS at-rule keywords. Highlights @-prefixed rule identifiers."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"pattern": "#([0-9a-fA-F]{3,8})\\b|\\b(rgb|rgba|hsl|hsla|oklch|lab|lch|color)\\(",
|
|
31
|
+
"kind": "text",
|
|
32
|
+
"description": "CSS color values. Highlights hex colors and color function invocations."
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"pattern": "(:(hover|focus|active|visited|first-child|last-child|nth-child|nth-of-type|not|is|where|has|focus-visible|focus-within|checked|disabled|enabled|empty|root|target|lang|any-link|placeholder-shown|required|optional|valid|invalid|in-range|out-of-range|read-only|read-write|default|indeterminate))\\b",
|
|
36
|
+
"kind": "text",
|
|
37
|
+
"description": "CSS pseudo-class selectors. Highlights state-based and structural pseudo-classes."
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"pattern": "(::?(before|after|first-line|first-letter|selection|placeholder|marker|backdrop|file-selector-button|cue|part|slotted))\\b",
|
|
41
|
+
"kind": "text",
|
|
42
|
+
"description": "CSS pseudo-element selectors. Highlights virtual elements that style specific parts of an element."
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"pattern": "\\b(calc|var|min|max|clamp|env|attr|url|linear-gradient|radial-gradient|conic-gradient|repeating-linear-gradient|repeating-radial-gradient|image-set|counter|counters|fit-content|minmax|repeat)\\s*\\(",
|
|
46
|
+
"kind": "text",
|
|
47
|
+
"description": "CSS function calls. Highlights built-in CSS functions."
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"language": "tailwindcss",
|
|
3
|
+
"highlightPatterns": [
|
|
4
|
+
{
|
|
5
|
+
"pattern": "\\b(flex|grid|block|inline|hidden|table|contents|flow-root|inline-flex|inline-grid|inline-block)\\b",
|
|
6
|
+
"kind": "text",
|
|
7
|
+
"description": "Highlight Tailwind display/layout utility class names."
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"pattern": "\\b(p|m|px|py|pt|pr|pb|pl|mx|my|mt|mr|mb|ml|gap|space-x|space-y)-\\d+\\b",
|
|
11
|
+
"kind": "text",
|
|
12
|
+
"description": "Highlight Tailwind spacing utility class names."
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"pattern": "\\b(w|h|min-w|max-w|min-h|max-h|size)-[\\w/]+\\b",
|
|
16
|
+
"kind": "text",
|
|
17
|
+
"description": "Highlight Tailwind sizing utility class names."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"pattern": "\\b(text|font|leading|tracking|decoration|underline|overline|line-through|no-underline)-[\\w-]+\\b",
|
|
21
|
+
"kind": "text",
|
|
22
|
+
"description": "Highlight Tailwind typography utility class names."
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"pattern": "\\b(bg|from|via|to)-[\\w-]+\\b",
|
|
26
|
+
"kind": "text",
|
|
27
|
+
"description": "Highlight Tailwind background and gradient utility class names."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"pattern": "\\b(border|rounded|ring|divide|outline)-[\\w-]*\\b",
|
|
31
|
+
"kind": "text",
|
|
32
|
+
"description": "Highlight Tailwind border and ring utility class names."
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"pattern": "\\b(shadow|opacity|blur|backdrop-blur|brightness|contrast|saturate)-[\\w-]*\\b",
|
|
36
|
+
"kind": "text",
|
|
37
|
+
"description": "Highlight Tailwind effects and filter utility class names."
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"pattern": "\\b(sm|md|lg|xl|2xl):",
|
|
41
|
+
"kind": "text",
|
|
42
|
+
"description": "Highlight responsive breakpoint prefixes."
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"pattern": "\\b(hover|focus|active|visited|disabled|first|last|odd|even|focus-within|focus-visible):",
|
|
46
|
+
"kind": "text",
|
|
47
|
+
"description": "Highlight state variant prefixes."
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"pattern": "\\b(dark|group-hover|group-focus|peer-focus|peer-checked|peer-hover):",
|
|
51
|
+
"kind": "text",
|
|
52
|
+
"description": "Highlight dark mode and group/peer variant prefixes."
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"pattern": "@(tailwind|apply|layer|config|responsive|variants|screen)",
|
|
56
|
+
"kind": "text",
|
|
57
|
+
"description": "Highlight Tailwind CSS at-rule directives."
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"pattern": "\\b(slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-(50|100|200|300|400|500|600|700|800|900|950)\\b",
|
|
61
|
+
"kind": "text",
|
|
62
|
+
"description": "Highlight Tailwind default color palette references."
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
{
|
|
2
|
+
"language": "css",
|
|
3
|
+
"defaultOptions": {
|
|
4
|
+
"tabSize": 2,
|
|
5
|
+
"insertSpaces": true
|
|
6
|
+
},
|
|
7
|
+
"rangeFormattingRules": [
|
|
8
|
+
{
|
|
9
|
+
"description": "Normalize property declaration spacing",
|
|
10
|
+
"pattern": "([a-z-]+)\\s*:\\s*",
|
|
11
|
+
"action": "replace",
|
|
12
|
+
"options": {
|
|
13
|
+
"replacement": "$1: ",
|
|
14
|
+
"scope": "declaration"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"description": "Ensure proper indentation within rule blocks",
|
|
19
|
+
"pattern": "^(\\s*)([a-z-]+\\s*:)",
|
|
20
|
+
"action": "reindent",
|
|
21
|
+
"options": {
|
|
22
|
+
"baseIndent": "parentBlock",
|
|
23
|
+
"indentSize": 2,
|
|
24
|
+
"scope": "block"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"description": "Normalize brace formatting for rule blocks",
|
|
29
|
+
"pattern": "([^\\s])\\s*\\{",
|
|
30
|
+
"action": "replace",
|
|
31
|
+
"options": {
|
|
32
|
+
"replacement": "$1 {",
|
|
33
|
+
"scope": "rule"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"description": "Ensure closing brace alignment",
|
|
38
|
+
"pattern": "^(\\s*)\\}",
|
|
39
|
+
"action": "reindent",
|
|
40
|
+
"options": {
|
|
41
|
+
"matchIndent": "openingBrace",
|
|
42
|
+
"scope": "block"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"description": "Ensure semicolons terminate declarations",
|
|
47
|
+
"pattern": "([a-z-]+\\s*:[^;{}]+?)\\s*(?=\\n\\s*[a-z-]|\\n\\s*\\})",
|
|
48
|
+
"action": "appendSemicolon",
|
|
49
|
+
"options": {
|
|
50
|
+
"scope": "declaration"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"description": "Remove extra blank lines within a rule block",
|
|
55
|
+
"pattern": "\\n\\s*\\n\\s*\\n",
|
|
56
|
+
"action": "replace",
|
|
57
|
+
"options": {
|
|
58
|
+
"replacement": "\n\n",
|
|
59
|
+
"scope": "block"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"description": "Normalize comma-separated selectors to one per line",
|
|
64
|
+
"pattern": ",\\s*([.#a-zA-Z*:\\[])",
|
|
65
|
+
"action": "replace",
|
|
66
|
+
"options": {
|
|
67
|
+
"replacement": ",\n$1",
|
|
68
|
+
"scope": "rule"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"description": "Remove trailing whitespace on each line",
|
|
73
|
+
"pattern": "[ \\t]+$",
|
|
74
|
+
"action": "replace",
|
|
75
|
+
"options": {
|
|
76
|
+
"replacement": "",
|
|
77
|
+
"scope": "statement"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"description": "Normalize space in !important declarations",
|
|
82
|
+
"pattern": "\\s*!\\s*important",
|
|
83
|
+
"action": "replace",
|
|
84
|
+
"options": {
|
|
85
|
+
"replacement": " !important",
|
|
86
|
+
"scope": "declaration"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"description": "Format multi-value properties with consistent spacing",
|
|
91
|
+
"pattern": ",\\s*(?=[^\\n])",
|
|
92
|
+
"action": "replace",
|
|
93
|
+
"options": {
|
|
94
|
+
"replacement": ", ",
|
|
95
|
+
"scope": "declaration"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
"adjustToSyntaxNode": true,
|
|
100
|
+
"supportedRangeTypes": ["statement", "block", "rule", "declaration"]
|
|
101
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"language": "tailwindcss",
|
|
3
|
+
"defaultOptions": {
|
|
4
|
+
"tabSize": 2,
|
|
5
|
+
"insertSpaces": true
|
|
6
|
+
},
|
|
7
|
+
"rangeFormattingRules": [
|
|
8
|
+
{
|
|
9
|
+
"description": "Sort utility classes in @apply rules within the selected range",
|
|
10
|
+
"pattern": "@apply\\s+([\\w\\s:/-]+);",
|
|
11
|
+
"action": "sortClasses",
|
|
12
|
+
"options": {
|
|
13
|
+
"order": "headwind"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"description": "Normalize whitespace in class lists within the selected range",
|
|
18
|
+
"pattern": "class\\s*=\\s*[\"']([^\"']+)[\"']",
|
|
19
|
+
"action": "normalizeWhitespace",
|
|
20
|
+
"options": {
|
|
21
|
+
"singleSpace": true,
|
|
22
|
+
"trimEdges": true
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"description": "Format @layer block indentation within the selected range",
|
|
27
|
+
"pattern": "@layer\\s+\\w+\\s*\\{[\\s\\S]*?\\}",
|
|
28
|
+
"action": "formatBlock",
|
|
29
|
+
"options": {
|
|
30
|
+
"indentSize": 2,
|
|
31
|
+
"insertSpaces": true
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"description": "Normalize @apply directive spacing within the selected range",
|
|
36
|
+
"pattern": "@apply\\s{2,}",
|
|
37
|
+
"action": "replaceWhitespace",
|
|
38
|
+
"options": {
|
|
39
|
+
"replacement": "@apply "
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"description": "Format CSS rule blocks within the selected range",
|
|
44
|
+
"pattern": "\\.[\\w-]+\\s*\\{[^}]*\\}",
|
|
45
|
+
"action": "formatBlock",
|
|
46
|
+
"options": {
|
|
47
|
+
"indentSize": 2,
|
|
48
|
+
"insertSpaces": true,
|
|
49
|
+
"newlineAfterBrace": true
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"adjustToSyntaxNode": true,
|
|
54
|
+
"supportedRangeTypes": ["statement", "block", "directive", "declaration"]
|
|
55
|
+
}
|