Css extension for coc.nvim
npm install coc-cssCss language server extension for coc.nvim.
Uses vscode-css-languageservice inside.
Note: words are exetracted by iskeyword option of buffer, you may want to
adjust it by command like:
autocmd FileType css setl iskeyword+=-
Note configuration css.enable and wxss support removed from 2.0.0.
In your vim/neovim, run the command:
```
:CocInstall coc-css
For scss files, you may need use:
`vim`
autocmd FileType scss setl iskeyword+=@-@
in your vimrc for add @ to iskeyword option.
All features that vscode-css-languageservice provide should work.
- doValidation analyzes an input string and returns syntax and lint errros.doComplete
- provides completion proposals for a given location.doHover
- provides a hover text for a given location.findDefinition
- finds the definition of the symbol at the given location.findReferences
- finds all references to the symbol at the given location.findDocumentHighlights
- finds all symbols connected to the given location.findDocumentSymbols
- provides all symbols in the given documentdoCodeActions
- evaluates code actions for the given location, typically to fix a problem.findColorSymbols
- evaluates all color symbols in the given documentdoRename
- renames all symbols connected to the given location.getFoldingRanges
- returns folding ranges in the given document.format
- format css/scss/less files.
Checkout :h coc-configuration in your vim for guide of coc.nvim's configuration.
- css.execArgv: Extra arguments for node which start language server. default: []css.customData
- : default: []css.completion.triggerPropertyValueCompletion
- : By default, VS Code triggers property value completion after selecting a CSS property. Use this setting to disable this behavior. default: truecss.completion.completePropertyWithSemicolon
- : Insert semicolon at end of line when completing CSS properties. default: truecss.validate
- : Enables or disables all validations. default: truecss.hover.documentation
- : Show tag and attribute documentation in CSS hovers. default: truecss.hover.references
- : Show references to MDN in CSS hovers. default: truecss.lint.compatibleVendorPrefixes
- : When using a vendor-specific prefix make sure to also include all other vendor-specific properties. default: "ignore"css.lint.vendorPrefix
Valid options: ["ignore","warning","error"]
- : When using a vendor-specific prefix, also include the standard property. default: "warning"css.lint.duplicateProperties
Valid options: ["ignore","warning","error"]
- : Do not use duplicate style definitions. default: "ignore"css.lint.emptyRules
Valid options: ["ignore","warning","error"]
- : Do not use empty rulesets. default: "warning"css.lint.importStatement
Valid options: ["ignore","warning","error"]
- : Import statements do not load in parallel. default: "ignore"css.lint.boxModel
Valid options: ["ignore","warning","error"]
- : default: "ignore"css.lint.universalSelector
Valid options: ["ignore","warning","error"]
- : default: "ignore"css.lint.zeroUnits
Valid options: ["ignore","warning","error"]
- : No unit for zero needed. default: "ignore"css.lint.fontFaceProperties
Valid options: ["ignore","warning","error"]
- : default: "warning"css.lint.hexColorLength
Valid options: ["ignore","warning","error"]
- : Hex colors must consist of three or six hex numbers. default: "error"css.lint.argumentsInColorFunction
Valid options: ["ignore","warning","error"]
- : Invalid number of parameters. default: "error"css.lint.unknownProperties
Valid options: ["ignore","warning","error"]
- : Unknown property. default: "warning"css.lint.validProperties
Valid options: ["ignore","warning","error"]
- : A list of properties that are not validated against the unknownProperties rule. default: []css.lint.ieHack
- : IE hacks are only necessary when supporting IE7 and older. default: "ignore"css.lint.unknownVendorSpecificProperties
Valid options: ["ignore","warning","error"]
- : Unknown vendor specific property. default: "ignore"css.lint.propertyIgnoredDueToDisplay
Valid options: ["ignore","warning","error"]
- : default: "warning"css.lint.important
Valid options: ["ignore","warning","error"]
- : default: "ignore"css.lint.float
Valid options: ["ignore","warning","error"]
- : default: "ignore"css.lint.idSelector
Valid options: ["ignore","warning","error"]
- : Selectors should not contain IDs because these rules are too tightly coupled with the HTML. default: "ignore"css.lint.unknownAtRules
Valid options: ["ignore","warning","error"]
- : Unknown at-rule. default: "warning"css.trace.server
Valid options: ["ignore","warning","error"]
- : Traces the communication between VS Code and the CSS language server. default: "off"css.format.enable
Valid options: ["off","messages","verbose"]
- : Enable/disable default CSS formatter. default: truecss.format.newlineBetweenSelectors
- : default: truecss.format.newlineBetweenRules
- : default: truecss.format.spaceAroundSelectorSeparator
- : default: falsecss.format.braceStyle
- : default: "collapse"css.format.preserveNewLines
Valid options: ["collapse","expand"]
- : default: truecss.format.maxPreserveNewLines
- : default: nullscss.completion.triggerPropertyValueCompletion
- : By default, VS Code triggers property value completion after selecting a CSS property. Use this setting to disable this behavior. default: truescss.completion.completePropertyWithSemicolon
- : Insert semicolon at end of line when completing CSS properties. default: truescss.validate
- : Enables or disables all validations. default: truescss.hover.documentation
- : Show tag and attribute documentation in SCSS hovers. default: truescss.hover.references
- : Show references to MDN in SCSS hovers. default: truescss.lint.compatibleVendorPrefixes
- : When using a vendor-specific prefix make sure to also include all other vendor-specific properties. default: "ignore"scss.lint.vendorPrefix
Valid options: ["ignore","warning","error"]
- : When using a vendor-specific prefix, also include the standard property. default: "warning"scss.lint.duplicateProperties
Valid options: ["ignore","warning","error"]
- : Do not use duplicate style definitions. default: "ignore"scss.lint.emptyRules
Valid options: ["ignore","warning","error"]
- : Do not use empty rulesets. default: "warning"scss.lint.importStatement
Valid options: ["ignore","warning","error"]
- : Import statements do not load in parallel. default: "ignore"scss.lint.boxModel
Valid options: ["ignore","warning","error"]
- : default: "ignore"scss.lint.universalSelector
Valid options: ["ignore","warning","error"]
- : default: "ignore"scss.lint.zeroUnits
Valid options: ["ignore","warning","error"]
- : No unit for zero needed. default: "ignore"scss.lint.fontFaceProperties
Valid options: ["ignore","warning","error"]
- : default: "warning"scss.lint.hexColorLength
Valid options: ["ignore","warning","error"]
- : Hex colors must consist of three or six hex numbers. default: "error"scss.lint.argumentsInColorFunction
Valid options: ["ignore","warning","error"]
- : Invalid number of parameters. default: "error"scss.lint.unknownProperties
Valid options: ["ignore","warning","error"]
- : Unknown property. default: "warning"scss.lint.validProperties
Valid options: ["ignore","warning","error"]
- : A list of properties that are not validated against the unknownProperties rule. default: []scss.lint.ieHack
- : IE hacks are only necessary when supporting IE7 and older. default: "ignore"scss.lint.unknownVendorSpecificProperties
Valid options: ["ignore","warning","error"]
- : Unknown vendor specific property. default: "ignore"scss.lint.propertyIgnoredDueToDisplay
Valid options: ["ignore","warning","error"]
- : default: "warning"scss.lint.important
Valid options: ["ignore","warning","error"]
- : default: "ignore"scss.lint.float
Valid options: ["ignore","warning","error"]
- : default: "ignore"scss.lint.idSelector
Valid options: ["ignore","warning","error"]
- : Selectors should not contain IDs because these rules are too tightly coupled with the HTML. default: "ignore"scss.lint.unknownAtRules
Valid options: ["ignore","warning","error"]
- : Unknown at-rule. default: "warning"scss.format.enable
Valid options: ["ignore","warning","error"]
- : Enable/disable default SCSS formatter. default: truescss.format.newlineBetweenSelectors
- : default: truescss.format.newlineBetweenRules
- : default: truescss.format.spaceAroundSelectorSeparator
- : default: falsescss.format.braceStyle
- : default: "collapse"scss.format.preserveNewLines
Valid options: ["collapse","expand"]
- : default: truescss.format.maxPreserveNewLines
- : default: nullless.completion.triggerPropertyValueCompletion
- : By default, VS Code triggers property value completion after selecting a CSS property. Use this setting to disable this behavior. default: trueless.completion.completePropertyWithSemicolon
- : Insert semicolon at end of line when completing CSS properties. default: trueless.validate
- : Enables or disables all validations. default: trueless.hover.documentation
- : Show tag and attribute documentation in LESS hovers. default: trueless.hover.references
- : Show references to MDN in LESS hovers. default: trueless.lint.compatibleVendorPrefixes
- : When using a vendor-specific prefix make sure to also include all other vendor-specific properties. default: "ignore"less.lint.vendorPrefix
Valid options: ["ignore","warning","error"]
- : When using a vendor-specific prefix, also include the standard property. default: "warning"less.lint.duplicateProperties
Valid options: ["ignore","warning","error"]
- : Do not use duplicate style definitions. default: "ignore"less.lint.emptyRules
Valid options: ["ignore","warning","error"]
- : Do not use empty rulesets. default: "warning"less.lint.importStatement
Valid options: ["ignore","warning","error"]
- : Import statements do not load in parallel. default: "ignore"less.lint.boxModel
Valid options: ["ignore","warning","error"]
- : default: "ignore"less.lint.universalSelector
Valid options: ["ignore","warning","error"]
- : default: "ignore"less.lint.zeroUnits
Valid options: ["ignore","warning","error"]
- : No unit for zero needed. default: "ignore"less.lint.fontFaceProperties
Valid options: ["ignore","warning","error"]
- : default: "warning"less.lint.hexColorLength
Valid options: ["ignore","warning","error"]
- : Hex colors must consist of three or six hex numbers. default: "error"less.lint.argumentsInColorFunction
Valid options: ["ignore","warning","error"]
- : Invalid number of parameters. default: "error"less.lint.unknownProperties
Valid options: ["ignore","warning","error"]
- : Unknown property. default: "warning"less.lint.validProperties
Valid options: ["ignore","warning","error"]
- : A list of properties that are not validated against the unknownProperties rule. default: []less.lint.ieHack
- : IE hacks are only necessary when supporting IE7 and older. default: "ignore"less.lint.unknownVendorSpecificProperties
Valid options: ["ignore","warning","error"]
- : Unknown vendor specific property. default: "ignore"less.lint.propertyIgnoredDueToDisplay
Valid options: ["ignore","warning","error"]
- : default: "warning"less.lint.important
Valid options: ["ignore","warning","error"]
- : default: "ignore"less.lint.float
Valid options: ["ignore","warning","error"]
- : default: "ignore"less.lint.idSelector
Valid options: ["ignore","warning","error"]
- : Selectors should not contain IDs because these rules are too tightly coupled with the HTML. default: "ignore"less.lint.unknownAtRules
Valid options: ["ignore","warning","error"]
- : Unknown at-rule. default: "warning"less.format.enable
Valid options: ["ignore","warning","error"]
- : Enable/disable default LESS formatter. default: trueless.format.newlineBetweenSelectors
- : default: trueless.format.newlineBetweenRules
- : default: trueless.format.spaceAroundSelectorSeparator
- : default: falseless.format.braceStyle
- : default: "collapse"less.format.preserveNewLines
Valid options: ["collapse","expand"]
- : default: trueless.format.maxPreserveNewLines
- : default: null`
MIT