Name: vscode-css-languageservice
Owner: Sourcegraph
Description: CSS, LESS & SCSS language service extracted from VSCode to be reused, e.g in the Monaco editor.
Forked from: Microsoft/vscode-css-languageservice
Created: 2016-11-21 19:29:40.0
Updated: 2016-12-20 16:29:38.0
Pushed: 2017-01-05 14:57:22.0
Homepage: null
Size: 3789
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Language services for CSS, LESS and SCSS forked from Microsoft/vscode-css-languageservice
The vscode-css-languageservice contains the language smarts behind the CSS, LESS and SCSS editing experience of Visual Studio Code and the Monaco editor.
rt interface LanguageService {
configure(raw: LanguageSettings): void;
doValidation(document: TextDocument, stylesheet: Stylesheet): Diagnostic[];
parseStylesheet(document: TextDocument): Stylesheet;
doComplete(document: TextDocument, position: Position, stylesheet: Stylesheet): CompletionList;
findDependencies(stylesheet: Stylesheet): string[];
doHover(thisURI: string, documents: {[uri: string]: {textDoc: TextDocument, styleSheet: Stylesheet}}, position: Position): Hover;
findDefinition(thisURI: string, documents: {[uri: string]: {textDoc: TextDocument, styleSheet: Stylesheet}}, position: Position): Location;
findReferences(thisURI: string, documents: {[uri: string]: {textDoc: TextDocument, styleSheet: Stylesheet}}, position: Position): Location[];
findDocumentHighlights(document: TextDocument, position: Position, stylesheet: Stylesheet): DocumentHighlight[];
findDocumentSymbols(document: TextDocument, stylesheet: Stylesheet): SymbolInformation[];
doCodeActions(document: TextDocument, range: Range, context: CodeActionContext, stylesheet: Stylesheet): Command[];
findColorSymbols(document: TextDocument, stylesheet: Stylesheet): Range[];
doRename(document: TextDocument, position: Position, newName: string, stylesheet: Stylesheet): WorkspaceEdit;
rt interface LanguageSettings {
validate?: boolean;
lint?: any;
git clone https://github.com/sourcegraph/vscode-css-languageservice
npm run update-data
npm run compile
npm run test
(NOTE: Test coverage is not 100% yet; Most of the tests are focused on the parsers and very little on the “services” ie. doHover/findRef/findDef/findDep etc..)npm run compile
before pushing any changes. Due to a bug in npm; when we include dependencies by git url - it does not run npm compile after cloning the repo so as a workaround we run compile before publishing and include the /lib folder in the git repo which is then imported as a tarball in css-langserver. A potential fix could be to publish this to npm ie. sourcegraph-css-languageservice.(MIT License)
Copyright 2016, Microsoft Copyright 2016, Sourcegraph