UNPKG

coc-css

Version:

Css extension for coc.nvim

978 lines (977 loc) 31.3 kB
{ "name": "coc-css", "version": "2.1.0", "description": "Css extension for coc.nvim", "main": "lib/index.js", "publisher": "chemzqm", "engines": { "coc": "^0.0.82" }, "keywords": [ "coc.nvim", "css", "languageserver" ], "scripts": { "build": "node esbuild.js", "prepare": "node esbuild.js" }, "activationEvents": [ "onLanguage:css", "onLanguage:less", "onLanguage:scss" ], "contributes": { "configuration": { "type": "object", "title": "Css", "properties": { "css.execArgv": { "type": "array", "default": [], "description": "Extra arguments for node which start language server.", "items": { "type": "string" } }, "css.customData": { "type": "array", "markdownDescription": "A list of relative file paths pointing to JSON files following the [custom data format](https://github.com/microsoft/vscode-css-languageservice/blob/master/docs/customData.md).\n\nVS Code loads custom data on startup to enhance its CSS support for the custom CSS properties, at directives, pseudo classes and pseudo elements you specify in the JSON files.\n\nThe file paths are relative to workspace and only workspace folder settings are considered.", "default": [], "items": { "type": "string" }, "scope": "resource" }, "css.completion.triggerPropertyValueCompletion": { "type": "boolean", "scope": "resource", "default": true, "description": "By default, VS Code triggers property value completion after selecting a CSS property. Use this setting to disable this behavior." }, "css.completion.completePropertyWithSemicolon": { "type": "boolean", "scope": "resource", "default": true, "description": "Insert semicolon at end of line when completing CSS properties." }, "css.validate": { "type": "boolean", "scope": "resource", "default": true, "description": "Enables or disables all validations." }, "css.hover.documentation": { "type": "boolean", "scope": "resource", "default": true, "description": "Show tag and attribute documentation in CSS hovers." }, "css.hover.references": { "type": "boolean", "scope": "resource", "default": true, "description": "Show references to MDN in CSS hovers." }, "css.lint.compatibleVendorPrefixes": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "ignore", "description": "When using a vendor-specific prefix make sure to also include all other vendor-specific properties." }, "css.lint.vendorPrefix": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "warning", "description": "When using a vendor-specific prefix, also include the standard property." }, "css.lint.duplicateProperties": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "ignore", "description": "Do not use duplicate style definitions." }, "css.lint.emptyRules": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "warning", "description": "Do not use empty rulesets." }, "css.lint.importStatement": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "ignore", "description": "Import statements do not load in parallel." }, "css.lint.boxModel": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "ignore", "markdownDescription": "Do not use `width` or `height` when using `padding` or `border`." }, "css.lint.universalSelector": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "ignore", "markdownDescription": "The universal selector (`*`) is known to be slow." }, "css.lint.zeroUnits": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "ignore", "description": "No unit for zero needed." }, "css.lint.fontFaceProperties": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "warning", "markdownDescription": "`@font-face` rule must define `src` and `font-family` properties." }, "css.lint.hexColorLength": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "error", "description": "Hex colors must consist of three or six hex numbers." }, "css.lint.argumentsInColorFunction": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "error", "description": "Invalid number of parameters." }, "css.lint.unknownProperties": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "warning", "description": "Unknown property." }, "css.lint.validProperties": { "type": "array", "uniqueItems": true, "items": { "type": "string" }, "scope": "resource", "default": [], "description": "A list of properties that are not validated against the `unknownProperties` rule." }, "css.lint.ieHack": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "ignore", "description": "IE hacks are only necessary when supporting IE7 and older." }, "css.lint.unknownVendorSpecificProperties": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "ignore", "description": "Unknown vendor specific property." }, "css.lint.propertyIgnoredDueToDisplay": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "warning", "markdownDescription": "Property is ignored due to the display. E.g. with `display: inline`, the `width`, `height`, `margin-top`, `margin-bottom`, and `float` properties have no effect." }, "css.lint.important": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "ignore", "markdownDescription": "Avoid using `!important`. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored." }, "css.lint.float": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "ignore", "markdownDescription": "Avoid using `float`. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes." }, "css.lint.idSelector": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "ignore", "description": "Selectors should not contain IDs because these rules are too tightly coupled with the HTML." }, "css.lint.unknownAtRules": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "warning", "description": "Unknown at-rule." }, "css.trace.server": { "type": "string", "scope": "window", "enum": [ "off", "messages", "verbose" ], "default": "off", "description": "Traces the communication between VS Code and the CSS language server." }, "css.format.enable": { "type": "boolean", "scope": "window", "default": true, "description": "Enable/disable default CSS formatter." }, "css.format.newlineBetweenSelectors": { "type": "boolean", "scope": "resource", "default": true, "markdownDescription": "Separate selectors with a new line." }, "css.format.newlineBetweenRules": { "type": "boolean", "scope": "resource", "default": true, "markdownDescription": "Separate rulesets by a blank line." }, "css.format.spaceAroundSelectorSeparator": { "type": "boolean", "scope": "resource", "default": false, "markdownDescription": "Ensure a space character around selector separators '>', '+', '~' (e.g. `a > b`)." }, "css.format.braceStyle": { "type": "string", "scope": "resource", "default": "collapse", "enum": [ "collapse", "expand" ], "markdownDescription": "Put braces on the same line as rules (`collapse`) or put braces on own line (`expand`)." }, "css.format.preserveNewLines": { "type": "boolean", "scope": "resource", "default": true, "markdownDescription": "Whether existing line breaks before elements should be preserved." }, "css.format.maxPreserveNewLines": { "type": [ "number", "null" ], "scope": "resource", "default": null, "markdownDescription": "Maximum number of line breaks to be preserved in one chunk, when `#css.format.preserveNewLines#` is enabled." }, "scss.completion.triggerPropertyValueCompletion": { "type": "boolean", "scope": "resource", "default": true, "description": "By default, VS Code triggers property value completion after selecting a CSS property. Use this setting to disable this behavior." }, "scss.completion.completePropertyWithSemicolon": { "type": "boolean", "scope": "resource", "default": true, "description": "Insert semicolon at end of line when completing CSS properties." }, "scss.validate": { "type": "boolean", "scope": "resource", "default": true, "description": "Enables or disables all validations." }, "scss.hover.documentation": { "type": "boolean", "scope": "resource", "default": true, "description": "Show tag and attribute documentation in SCSS hovers." }, "scss.hover.references": { "type": "boolean", "scope": "resource", "default": true, "description": "Show references to MDN in SCSS hovers." }, "scss.lint.compatibleVendorPrefixes": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "ignore", "description": "When using a vendor-specific prefix make sure to also include all other vendor-specific properties." }, "scss.lint.vendorPrefix": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "warning", "description": "When using a vendor-specific prefix, also include the standard property." }, "scss.lint.duplicateProperties": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "ignore", "description": "Do not use duplicate style definitions." }, "scss.lint.emptyRules": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "warning", "description": "Do not use empty rulesets." }, "scss.lint.importStatement": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "ignore", "description": "Import statements do not load in parallel." }, "scss.lint.boxModel": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "ignore", "markdownDescription": "Do not use `width` or `height` when using `padding` or `border`." }, "scss.lint.universalSelector": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "ignore", "markdownDescription": "The universal selector (`*`) is known to be slow." }, "scss.lint.zeroUnits": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "ignore", "description": "No unit for zero needed." }, "scss.lint.fontFaceProperties": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "warning", "markdownDescription": "`@font-face` rule must define `src` and `font-family` properties." }, "scss.lint.hexColorLength": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "error", "description": "Hex colors must consist of three or six hex numbers." }, "scss.lint.argumentsInColorFunction": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "error", "description": "Invalid number of parameters." }, "scss.lint.unknownProperties": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "warning", "description": "Unknown property." }, "scss.lint.validProperties": { "type": "array", "uniqueItems": true, "items": { "type": "string" }, "scope": "resource", "default": [], "description": "A list of properties that are not validated against the `unknownProperties` rule." }, "scss.lint.ieHack": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "ignore", "description": "IE hacks are only necessary when supporting IE7 and older." }, "scss.lint.unknownVendorSpecificProperties": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "ignore", "description": "Unknown vendor specific property." }, "scss.lint.propertyIgnoredDueToDisplay": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "warning", "markdownDescription": "Property is ignored due to the display. E.g. with `display: inline`, the `width`, `height`, `margin-top`, `margin-bottom`, and `float` properties have no effect." }, "scss.lint.important": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "ignore", "markdownDescription": "Avoid using `!important`. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored." }, "scss.lint.float": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "ignore", "markdownDescription": "Avoid using `float`. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes." }, "scss.lint.idSelector": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "ignore", "description": "Selectors should not contain IDs because these rules are too tightly coupled with the HTML." }, "scss.lint.unknownAtRules": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "warning", "description": "Unknown at-rule." }, "scss.format.enable": { "type": "boolean", "scope": "window", "default": true, "description": "Enable/disable default SCSS formatter." }, "scss.format.newlineBetweenSelectors": { "type": "boolean", "scope": "resource", "default": true, "markdownDescription": "Separate selectors with a new line." }, "scss.format.newlineBetweenRules": { "type": "boolean", "scope": "resource", "default": true, "markdownDescription": "Separate rulesets by a blank line." }, "scss.format.spaceAroundSelectorSeparator": { "type": "boolean", "scope": "resource", "default": false, "markdownDescription": "Ensure a space character around selector separators '>', '+', '~' (e.g. `a > b`)." }, "scss.format.braceStyle": { "type": "string", "scope": "resource", "default": "collapse", "enum": [ "collapse", "expand" ], "markdownDescription": "Put braces on the same line as rules (`collapse`) or put braces on own line (`expand`)." }, "scss.format.preserveNewLines": { "type": "boolean", "scope": "resource", "default": true, "markdownDescription": "Whether existing line breaks before elements should be preserved." }, "scss.format.maxPreserveNewLines": { "type": [ "number", "null" ], "scope": "resource", "default": null, "markdownDescription": "Maximum number of line breaks to be preserved in one chunk, when `#scss.format.preserveNewLines#` is enabled." }, "less.completion.triggerPropertyValueCompletion": { "type": "boolean", "scope": "resource", "default": true, "description": "By default, VS Code triggers property value completion after selecting a CSS property. Use this setting to disable this behavior." }, "less.completion.completePropertyWithSemicolon": { "type": "boolean", "scope": "resource", "default": true, "description": "Insert semicolon at end of line when completing CSS properties." }, "less.validate": { "type": "boolean", "scope": "resource", "default": true, "description": "Enables or disables all validations." }, "less.hover.documentation": { "type": "boolean", "scope": "resource", "default": true, "description": "Show tag and attribute documentation in LESS hovers." }, "less.hover.references": { "type": "boolean", "scope": "resource", "default": true, "description": "Show references to MDN in LESS hovers." }, "less.lint.compatibleVendorPrefixes": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "ignore", "description": "When using a vendor-specific prefix make sure to also include all other vendor-specific properties." }, "less.lint.vendorPrefix": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "warning", "description": "When using a vendor-specific prefix, also include the standard property." }, "less.lint.duplicateProperties": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "ignore", "description": "Do not use duplicate style definitions." }, "less.lint.emptyRules": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "warning", "description": "Do not use empty rulesets." }, "less.lint.importStatement": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "ignore", "description": "Import statements do not load in parallel." }, "less.lint.boxModel": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "ignore", "markdownDescription": "Do not use `width` or `height` when using `padding` or `border`." }, "less.lint.universalSelector": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "ignore", "markdownDescription": "The universal selector (`*`) is known to be slow." }, "less.lint.zeroUnits": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "ignore", "description": "No unit for zero needed." }, "less.lint.fontFaceProperties": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "warning", "markdownDescription": "`@font-face` rule must define `src` and `font-family` properties." }, "less.lint.hexColorLength": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "error", "description": "Hex colors must consist of three or six hex numbers." }, "less.lint.argumentsInColorFunction": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "error", "description": "Invalid number of parameters." }, "less.lint.unknownProperties": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "warning", "description": "Unknown property." }, "less.lint.validProperties": { "type": "array", "uniqueItems": true, "items": { "type": "string" }, "scope": "resource", "default": [], "description": "A list of properties that are not validated against the `unknownProperties` rule." }, "less.lint.ieHack": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "ignore", "description": "IE hacks are only necessary when supporting IE7 and older." }, "less.lint.unknownVendorSpecificProperties": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "ignore", "description": "Unknown vendor specific property." }, "less.lint.propertyIgnoredDueToDisplay": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "warning", "markdownDescription": "Property is ignored due to the display. E.g. with `display: inline`, the `width`, `height`, `margin-top`, `margin-bottom`, and `float` properties have no effect." }, "less.lint.important": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "ignore", "markdownDescription": "Avoid using `!important`. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored." }, "less.lint.float": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "ignore", "markdownDescription": "Avoid using `float`. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes." }, "less.lint.idSelector": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "ignore", "description": "Selectors should not contain IDs because these rules are too tightly coupled with the HTML." }, "less.lint.unknownAtRules": { "type": "string", "scope": "resource", "enum": [ "ignore", "warning", "error" ], "default": "warning", "description": "Unknown at-rule." }, "less.format.enable": { "type": "boolean", "scope": "window", "default": true, "description": "Enable/disable default LESS formatter." }, "less.format.newlineBetweenSelectors": { "type": "boolean", "scope": "resource", "default": true, "markdownDescription": "Separate selectors with a new line." }, "less.format.newlineBetweenRules": { "type": "boolean", "scope": "resource", "default": true, "markdownDescription": "Separate rulesets by a blank line." }, "less.format.spaceAroundSelectorSeparator": { "type": "boolean", "scope": "resource", "default": false, "markdownDescription": "Ensure a space character around selector separators '>', '+', '~' (e.g. `a > b`)." }, "less.format.braceStyle": { "type": "string", "scope": "resource", "default": "collapse", "enum": [ "collapse", "expand" ], "markdownDescription": "Put braces on the same line as rules (`collapse`) or put braces on own line (`expand`)." }, "less.format.preserveNewLines": { "type": "boolean", "scope": "resource", "default": true, "markdownDescription": "Whether existing line breaks before elements should be preserved." }, "less.format.maxPreserveNewLines": { "type": [ "number", "null" ], "scope": "resource", "default": null, "markdownDescription": "Maximum number of line breaks to be preserved in one chunk, when `#less.format.preserveNewLines#` is enabled." } } }, "jsonValidation": [ { "fileMatch": "*.css-data.json", "url": "https://raw.githubusercontent.com/microsoft/vscode-css-languageservice/master/docs/customData.schema.json" }, { "fileMatch": "package.json", "url": "./schemas/package.schema.json" } ] }, "author": "chemzqm@gmail.com", "license": "MIT", "devDependencies": { "@types/node": "^14.14", "coc.nvim": "0.0.83-next.8", "esbuild": "^0.14.7", "typescript": "^4", "vscode-css-languageservice": "^6.2.7", "vscode-languageserver": "^8.2.0-next.3", "vscode-languageserver-protocol": "^3.17.2", "vscode-uri": "^3.0.7" }, "dependencies": {} }