vscode-css-languageservice

Language service for CSS, LESS and SCSS
- Static
- Latest Patch
- Latest Minor
- Latest Major
- 6.3.7
- 6.3.6
- 6.3.5
- 6.3.4
- 6.3.3
- 6.3.2
- 6.3.1
- 6.3.0
- 6.2.14
- 6.2.13
- 6.2.12
- 6.2.11
- 6.2.10
- 6.2.9
- 6.2.8
- 6.2.7
- 6.2.6
- 6.2.5
- 6.2.4
- 6.2.3
- 6.2.2
- 6.2.1
- 6.1.1
- 6.1.0
- 6.0.1
- 6.0.0
- 5.4.2
- 5.4.1
- 5.3.0
- 5.2.0
- 5.1.13
- 5.1.12
- 5.1.11
- 5.1.10
- 5.1.9
- 5.1.8
- 5.1.7
- 5.1.6
- 5.1.5
- 5.1.4
- 5.1.3
- 5.1.2
- 5.1.1
- 5.1.0
- 5.0.3
- 5.0.2
- 5.0.1
- 5.0.0
- 4.4.0
- 4.3.6
- 4.3.5
- 4.3.4
- 4.3.3
- 4.3.2
- 4.3.1
- 4.3.0
- 4.2.0
- 4.1.2
- 4.1.1
- 4.1.0
- 4.0.2
- 4.0.1
- 3.0.13
- 3.0.12
- 3.0.11
- 3.0.10
- 3.0.9
- 3.0.8
- 3.0.7
- 3.0.6
- 3.0.5
- 3.0.4
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
- 2.1.11
- 2.1.10
- 2.1.9
- 2.1.8
- 2.1.7
- 2.1.6
- 2.1.5
- 2.1.4
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.1.0
- 1.0.8
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 6.3.6-next.0
- 6.3.4-next.0
- 6.3.3-3
- 6.3.3-2
- 6.3.3-1
- 6.3.3-0
- 4.3.0-next.3
- 4.3.0-next.2
- 4.3.0-next.1
- 4.3.0-next.0
- 4.0.3-next.27
- 4.0.3-next.26
- 4.0.3-next.25
- 4.0.3-next.24
- 4.0.3-next.23
- 4.0.3-next.22
- 4.0.3-next.21
- 4.0.3-next.20
- 4.0.3-next.19
- 4.0.3-next.18
- 4.0.3-next.17
- 4.0.3-next.15
- 4.0.3-next.14
- 4.0.3-next.13
- 4.0.3-next.12
- 4.0.3-next.11
- 4.0.3-next.10
- 4.0.3-next.9
- 4.0.3-next.8
- 4.0.3-next.6
- 4.0.3-next.5
- 4.0.3-next.4
- 4.0.3-next.3
- 4.0.3-next.1
- 4.0.3-next.0
- 4.0.2-next.4
- 4.0.2-next.3
- 4.0.2-next.2
- 4.0.2-next.1
- 4.0.0-next.5
- 4.0.0-next.3
- 4.0.0-next.2
- 4.0.0-next.1
- 4.0.0-next.0
- 3.0.13-next.12
- 3.0.13-next.11
- 3.0.13-next.10
- 3.0.13-next.9
- 3.0.13-next.8
- 3.0.13-next.7
- 3.0.13-next.6
- 3.0.13-next.4
- 3.0.13-next.3
- 3.0.13-next.2
- 3.0.13-next.1
- 3.0.12-next.2
- 3.0.12-next.1
- 3.0.11-next.2
- 3.0.11-next.1
- 3.0.10-next.3
- 3.0.10-next.2
- 3.0.10-next.1
- 3.0.9-next.20
- 3.0.9-next.19
- 3.0.9-next.18
- 3.0.9-next.17
- 3.0.9-next.16
- 3.0.9-next.15
- 3.0.9-next.14
- 3.0.9-next.13
- 3.0.9-next.12
- 3.0.9-next.11
- 3.0.9-next.10
- 3.0.9-next.9
- 3.0.9-next.7
- 3.0.9-next.6
- 3.0.9-next.5
- 3.0.9-next.4
- 3.0.9-next.3
- 3.0.9-next.2
- 3.0.9-next.1
- 2.0.0-next.9
- 2.0.0-next.8
- 2.0.0-next.7
- 2.0.0-next.6
- 2.0.0-next.5
- 2.0.0-next.4
- 2.0.0-next.3
- 2.0.0-next.2
- 2.0.0-next.1
- 1.0.9-next.1
- 1.0.7-next.3
- 1.0.7-next.2
- 1.0.7-next.1
- 1.0.5-next.2
- 1.0.5-next.1
vscode-css-languageservice
Language services for CSS, LESS and SCSS
Why?
The vscode-css-languageservice contains the language smarts behind the CSS, LESS and SCSS editing experience of Visual Studio Code and the Monaco editor.
- doValidation analyses an input string and returns syntax and lint errors.
- 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 document
- doCodeActions evaluates code actions for the given location, typically to fix a problem.
- findDocumentColors evaluates all color symbols in the given document
- doRename renames all symbols connected to the given location.
- prepareRename the range of the node that can be renamed
- getFoldingRanges returns folding ranges in the given document.
Installation
npm install --save vscode-css-languageservice
API
For the complete API see cssLanguageService.ts and cssLanguageTypes.ts
Development
- clone this repo, run
npm install
npm test
to compile and run tests
How can I run and debug the service?
- open the folder in VSCode.
- set breakpoints, e.g. in
cssCompletion.ts
- run the Unit tests from the run viewlet and wait until a breakpoint is hit:
How can I run and debug the service inside an instance of VSCode?
- run VSCode out of sources setup as described here: https://github.com/Microsoft/vscode/wiki/How-to-Contribute
- run
npm link
in the folder ofvscode-css-languageservice
- use
npm link vscode-css-languageservice
invscode/extensions/css-language-features/server
to run VSCode with the latest changes fromvscode-css-languageservice
- run VSCode out of source (
vscode/scripts/code.sh|bat
) and open a.css
file - in VSCode window that is open on the
vscode-css-languageservice
sources, run commandDebug: Attach to Node process
and pick thecode-oss
process with thecss-language-features
path - set breakpoints, e.g. in
cssCompletion.ts
- in the instance run from sources, invoke code completion in the
.css
file
Note: All CSS entities (properties, at-rules, etc) are sourced from https://github.com/microsoft/vscode-custom-data/tree/master/web-data and transpiled here. For adding new property or fixing existing properties' completion/hover description, please open PR there).
License
(MIT License)
Copyright 2016, 20 Microsoft
With the exceptions of build/mdn-documentation.js
, which is built upon content from Mozilla Developer Network
and distributed under CC BY-SA 2.5.