update colorDecorators setting
parent
6aabc3d9a5
commit
e0ef982fd5
|
@ -74,11 +74,7 @@ Enable completions when using [Emmet](https://emmet.io/)-style syntax, for examp
|
|||
|
||||
### `tailwindCSS.colorDecorators`
|
||||
|
||||
Controls whether the editor should render inline color decorators for Tailwind CSS classes and helper functions.
|
||||
|
||||
- `inherit`: Color decorators are rendered if `editor.colorDecorators` is enabled.
|
||||
- `on`: Color decorators are rendered.
|
||||
- `off`: Color decorators are not rendered.
|
||||
Controls whether the editor should render inline color decorators for Tailwind CSS classes and helper functions. **Default: `true`**
|
||||
|
||||
### `tailwindCSS.showPixelEquivalents`
|
||||
|
||||
|
|
14
package.json
14
package.json
|
@ -78,18 +78,8 @@
|
|||
"markdownDescription": "Enable features in languages that are not supported by default. Add a mapping here between the new language and an already supported language.\n E.g.: `{\"plaintext\": \"html\"}`"
|
||||
},
|
||||
"tailwindCSS.colorDecorators": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"inherit",
|
||||
"on",
|
||||
"off"
|
||||
],
|
||||
"markdownEnumDescriptions": [
|
||||
"Color decorators are rendered if `editor.colorDecorators` is enabled.",
|
||||
"Color decorators are rendered.",
|
||||
"Color decorators are not rendered."
|
||||
],
|
||||
"default": "inherit",
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"markdownDescription": "Controls whether the editor should render inline color decorators for Tailwind CSS classes and helper functions.",
|
||||
"scope": "language-overridable"
|
||||
},
|
||||
|
|
|
@ -18,7 +18,7 @@ export async function getDocumentColors(
|
|||
if (!state.enabled) return colors
|
||||
|
||||
let settings = await state.editor.getConfiguration(document.uri)
|
||||
if (settings.colorDecorators === 'off') return colors
|
||||
if (settings.colorDecorators === false) return colors
|
||||
|
||||
let classLists = await findClassListsInDocument(state, document)
|
||||
classLists.forEach((classList) => {
|
||||
|
|
|
@ -37,7 +37,7 @@ export type Settings = {
|
|||
validate: boolean
|
||||
showPixelEquivalents: boolean
|
||||
rootFontSize: number
|
||||
colorDecorators: 'inherit' | 'on' | 'off'
|
||||
colorDecorators: boolean
|
||||
lint: {
|
||||
cssConflict: DiagnosticSeveritySetting
|
||||
invalidApply: DiagnosticSeveritySetting
|
||||
|
|
Loading…
Reference in New Issue