vscode-css-languageservice-rn
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

vscode-css-languageservice-rn

Language services for CSS in JS template strings for React Native. Forked from vscode-css-languageservice

Vastly slimmed down catalog of language facts for CSS based only on styles available in React Native. Typically used with Styled-Components and Typescript.

npm Package NPM Downloads Build Status

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 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 document
  • doCodeActions evaluats code actions for the given location, typically to fix a problem.
  • findColorSymbols evaluates all color symbols in the given document
  • doRename renames all symbols connected to the given location.
  • getFoldingRanges returns folding ranges in the given document.

Installation

npm install --save vscode-css-languageservice-tn

API

 
export interface LanguageService {
    configure(raw: LanguageSettings): void;
    doValidation(document: TextDocument, stylesheet: Stylesheet, documentSettings?: LanguageSettings): Diagnostic[];
    parseStylesheet(document: TextDocument): Stylesheet;
    doComplete(document: TextDocument, position: Position, stylesheet: Stylesheet): CompletionList;
    doHover(document: TextDocument, position: Position, stylesheet: Stylesheet): Hover;
    findDefinition(document: TextDocument, position: Position, stylesheet: Stylesheet): Location;
    findReferences(document: TextDocument, position: Position, stylesheet: Stylesheet): 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;
}
 
export interface LanguageSettings {
    validate?: boolean;
    lint?: any;
}
 

License

(MIT License)

Copyright 2016, 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.

Readme

Keywords

none

Package Sidebar

Install

npm i vscode-css-languageservice-rn

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

979 kB

Total Files

62

Last publish

Collaborators

  • tinialabs1
  • iopa-admin
  • guycreate