Css language server extension for coc.nvim
Last updated Jun 8, 2026
198
Stars
11
Forks
2
Issues
0
Stars/day
Attention Score
27
Language breakdown
No language data available.
โธ Files
click to expand
README
coc-css
Css 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.
Install
In your vim/neovim, run the command:
:CocInstall coc-css
For scss files, you may need use:
autocmd FileType scss setl iskeyword+=@-@
in your vimrc for add @ to iskeyword option.
Features
All features that vscode-css-languageservice provide should work.
doValidationanalyzes an input string and returns syntax and lint errros.doCompleteprovides completion proposals for a given location.doHoverprovides a hover text for a given location.findDefinitionfinds the definition of the symbol at the given location.findReferencesfinds all references to the symbol at the given location.findDocumentHighlightsfinds all symbols connected to the given location.findDocumentSymbolsprovides all symbols in the given documentdoCodeActionsevaluates code actions for the given location, typically to fix a problem.findColorSymbolsevaluates all color symbols in the given documentdoRenamerenames all symbols connected to the given location.getFoldingRangesreturns folding ranges in the given document.formatformat css/scss/less files.
Configuration options
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: When using a vendor-specific prefix, also include the standard property. default:"warning"
css.lint.duplicateProperties: Do not use duplicate style definitions. default:"ignore"
css.lint.emptyRules: Do not use empty rulesets. default:"warning"
css.lint.importStatement: Import statements do not load in parallel. default:"ignore"
css.lint.boxModel: default:"ignore"
css.lint.universalSelector: default:"ignore"
css.lint.zeroUnits: No unit for zero needed. default:"ignore"
css.lint.fontFaceProperties: default:"warning"
css.lint.hexColorLength: Hex colors must consist of three or six hex numbers. default:"error"
css.lint.argumentsInColorFunction: Invalid number of parameters. default:"error"
css.lint.unknownProperties: Unknown property. default:"warning"
css.lint.validProperties: A list of properties that are not validated against theunknownPropertiesrule. default:[]css.lint.ieHack: IE hacks are only necessary when supporting IE7 and older. default:"ignore"
css.lint.unknownVendorSpecificProperties: Unknown vendor specific property. default:"ignore"
css.lint.propertyIgnoredDueToDisplay: default:"warning"
css.lint.important: default:"ignore"
css.lint.float: default:"ignore"
css.lint.idSelector: Selectors should not contain IDs because these rules are too tightly coupled with the HTML. default:"ignore"
css.lint.unknownAtRules: Unknown at-rule. default:"warning"
css.trace.server: Traces the communication between VS Code and the CSS language server. default:"off"
css.format.enable: 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: 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: When using a vendor-specific prefix, also include the standard property. default:"warning"
scss.lint.duplicateProperties: Do not use duplicate style definitions. default:"ignore"
scss.lint.emptyRules: Do not use empty rulesets. default:"warning"
scss.lint.importStatement: Import statements do not load in parallel. default:"ignore"
scss.lint.boxModel: default:"ignore"
scss.lint.universalSelector: default:"ignore"
scss.lint.zeroUnits: No unit for zero needed. default:"ignore"
scss.lint.fontFaceProperties: default:"warning"
scss.lint.hexColorLength: Hex colors must consist of three or six hex numbers. default:"error"
scss.lint.argumentsInColorFunction: Invalid number of parameters. default:"error"
scss.lint.unknownProperties: Unknown property. default:"warning"
scss.lint.validProperties: A list of properties that are not validated against theunknownPropertiesrule. default:[]scss.lint.ieHack: IE hacks are only necessary when supporting IE7 and older. default:"ignore"
scss.lint.unknownVendorSpecificProperties: Unknown vendor specific property. default:"ignore"
scss.lint.propertyIgnoredDueToDisplay: default:"warning"
scss.lint.important: default:"ignore"
scss.lint.float: default:"ignore"
scss.lint.idSelector: Selectors should not contain IDs because these rules are too tightly coupled with the HTML. default:"ignore"
scss.lint.unknownAtRules: Unknown at-rule. default:"warning"
scss.format.enable: 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: 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: When using a vendor-specific prefix, also include the standard property. default:"warning"
less.lint.duplicateProperties: Do not use duplicate style definitions. default:"ignore"
less.lint.emptyRules: Do not use empty rulesets. default:"warning"
less.lint.importStatement: Import statements do not load in parallel. default:"ignore"
less.lint.boxModel: default:"ignore"
less.lint.universalSelector: default:"ignore"
less.lint.zeroUnits: No unit for zero needed. default:"ignore"
less.lint.fontFaceProperties: default:"warning"
less.lint.hexColorLength: Hex colors must consist of three or six hex numbers. default:"error"
less.lint.argumentsInColorFunction: Invalid number of parameters. default:"error"
less.lint.unknownProperties: Unknown property. default:"warning"
less.lint.validProperties: A list of properties that are not validated against theunknownPropertiesrule. default:[]less.lint.ieHack: IE hacks are only necessary when supporting IE7 and older. default:"ignore"
less.lint.unknownVendorSpecificProperties: Unknown vendor specific property. default:"ignore"
less.lint.propertyIgnoredDueToDisplay: default:"warning"
less.lint.important: default:"ignore"
less.lint.float: default:"ignore"
less.lint.idSelector: Selectors should not contain IDs because these rules are too tightly coupled with the HTML. default:"ignore"
less.lint.unknownAtRules: Unknown at-rule. default:"warning"
less.format.enable: 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: default:trueless.format.maxPreserveNewLines: default:null
License
MIT
๐ More in this category