vscode-css-languageservice 6.1.0 → 6.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/README.md +4 -3
- package/lib/esm/beautify/beautify-css.js +1 -1
- package/lib/esm/cssLanguageService.d.ts +2 -1
- package/lib/esm/cssLanguageService.js +1 -0
- package/lib/esm/cssLanguageTypes.d.ts +2 -2
- package/lib/esm/data/webCustomData.js +3502 -310
- package/lib/esm/languageFacts/colors.js +6 -7
- package/lib/esm/parser/cssErrors.js +34 -35
- package/lib/esm/parser/cssNodes.js +25 -4
- package/lib/esm/parser/cssParser.js +31 -16
- package/lib/esm/parser/lessParser.js +1 -0
- package/lib/esm/parser/scssErrors.js +4 -5
- package/lib/esm/parser/scssParser.js +4 -0
- package/lib/esm/services/cssCodeActions.js +2 -3
- package/lib/esm/services/cssCompletion.js +13 -4
- package/lib/esm/services/cssNavigation.js +44 -25
- package/lib/esm/services/lessCompletion.js +58 -59
- package/lib/esm/services/lint.js +64 -18
- package/lib/esm/services/lintRules.js +21 -22
- package/lib/esm/services/scssCompletion.js +107 -107
- package/lib/esm/services/scssNavigation.js +35 -57
- package/lib/esm/services/selectorPrinting.js +2 -3
- package/lib/umd/beautify/beautify-css.js +1 -1
- package/lib/umd/cssLanguageService.d.ts +2 -1
- package/lib/umd/cssLanguageService.js +1 -0
- package/lib/umd/cssLanguageTypes.d.ts +2 -2
- package/lib/umd/data/webCustomData.js +3502 -310
- package/lib/umd/languageFacts/colors.js +7 -8
- package/lib/umd/parser/cssErrors.js +35 -36
- package/lib/umd/parser/cssNodes.js +27 -5
- package/lib/umd/parser/cssParser.js +31 -16
- package/lib/umd/parser/lessParser.js +1 -0
- package/lib/umd/parser/scssErrors.js +5 -6
- package/lib/umd/parser/scssParser.js +4 -0
- package/lib/umd/services/cssCodeActions.js +3 -4
- package/lib/umd/services/cssCompletion.js +14 -5
- package/lib/umd/services/cssNavigation.js +45 -26
- package/lib/umd/services/lessCompletion.js +59 -60
- package/lib/umd/services/lint.js +65 -19
- package/lib/umd/services/lintRules.js +22 -23
- package/lib/umd/services/scssCompletion.js +108 -108
- package/lib/umd/services/scssNavigation.js +34 -56
- package/lib/umd/services/selectorPrinting.js +3 -4
- package/package.json +13 -16
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -3,8 +3,8 @@ Language services for CSS, LESS and SCSS
|
|
|
3
3
|
|
|
4
4
|
[](https://www.npmjs.org/package/vscode-css-languageservice)
|
|
5
5
|
[](https://npmjs.org/package/vscode-css-languageservice)
|
|
6
|
-
[](https://github.com/microsoft/vscode-css-languageservice/actions)
|
|
7
|
+
[](https://opensource.org/licenses/MIT)
|
|
8
8
|
|
|
9
9
|
Why?
|
|
10
10
|
----
|
|
@@ -20,7 +20,8 @@ and the Monaco editor.
|
|
|
20
20
|
- *doCodeActions* evaluates code actions for the given location, typically to fix a problem.
|
|
21
21
|
- *findColorSymbols* evaluates all color symbols in the given document
|
|
22
22
|
- *doRename* renames all symbols connected to the given location.
|
|
23
|
-
|
|
23
|
+
- *prepareRename* the range of the node that can be renamed
|
|
24
|
+
- *getFoldingRanges* returns folding ranges in the given document.
|
|
24
25
|
|
|
25
26
|
Installation
|
|
26
27
|
------------
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LanguageSettings, ICompletionParticipant, DocumentContext, LanguageServiceOptions, Diagnostic, Position, CompletionList, Hover, Location, DocumentHighlight, DocumentLink, SymbolInformation, Range, CodeActionContext, Command, CodeAction, ColorInformation, Color, ColorPresentation, WorkspaceEdit, FoldingRange, SelectionRange, TextDocument, ICSSDataProvider, CSSDataV1, HoverSettings, CompletionSettings, TextEdit, CSSFormatConfiguration, DocumentSymbol } from './cssLanguageTypes';
|
|
2
|
-
export
|
|
2
|
+
export type Stylesheet = {};
|
|
3
3
|
export * from './cssLanguageTypes';
|
|
4
4
|
export interface LanguageService {
|
|
5
5
|
configure(raw?: LanguageSettings): void;
|
|
@@ -24,6 +24,7 @@ export interface LanguageService {
|
|
|
24
24
|
doCodeActions2(document: TextDocument, range: Range, context: CodeActionContext, stylesheet: Stylesheet): CodeAction[];
|
|
25
25
|
findDocumentColors(document: TextDocument, stylesheet: Stylesheet): ColorInformation[];
|
|
26
26
|
getColorPresentations(document: TextDocument, stylesheet: Stylesheet, color: Color, range: Range): ColorPresentation[];
|
|
27
|
+
prepareRename(document: TextDocument, position: Position, stylesheet: Stylesheet): Range | undefined;
|
|
27
28
|
doRename(document: TextDocument, position: Position, newName: string, stylesheet: Stylesheet): WorkspaceEdit;
|
|
28
29
|
getFoldingRanges(document: TextDocument, context?: {
|
|
29
30
|
rangeLimit?: number;
|
|
@@ -53,6 +53,7 @@ function createFacade(parser, completion, hover, navigation, codeActions, valida
|
|
|
53
53
|
doCodeActions2: codeActions.doCodeActions2.bind(codeActions),
|
|
54
54
|
findDocumentColors: navigation.findDocumentColors.bind(navigation),
|
|
55
55
|
getColorPresentations: navigation.getColorPresentations.bind(navigation),
|
|
56
|
+
prepareRename: navigation.prepareRename.bind(navigation),
|
|
56
57
|
doRename: navigation.doRename.bind(navigation),
|
|
57
58
|
getFoldingRanges,
|
|
58
59
|
getSelectionRanges
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Range, Position, DocumentUri, MarkupContent, MarkupKind, Color, ColorInformation, ColorPresentation, FoldingRange, FoldingRangeKind, SelectionRange, Diagnostic, DiagnosticSeverity, CompletionItem, CompletionItemKind, CompletionList, CompletionItemTag, InsertTextFormat, DefinitionLink, SymbolInformation, SymbolKind, DocumentSymbol, Location, Hover, MarkedString, CodeActionContext, Command, CodeAction, DocumentHighlight, DocumentLink, WorkspaceEdit, TextEdit, CodeActionKind, TextDocumentEdit, VersionedTextDocumentIdentifier, DocumentHighlightKind } from 'vscode-languageserver-types';
|
|
2
2
|
import { TextDocument } from 'vscode-languageserver-textdocument';
|
|
3
3
|
export { TextDocument, Range, Position, DocumentUri, MarkupContent, MarkupKind, Color, ColorInformation, ColorPresentation, FoldingRange, FoldingRangeKind, SelectionRange, Diagnostic, DiagnosticSeverity, CompletionItem, CompletionItemKind, CompletionList, CompletionItemTag, InsertTextFormat, DefinitionLink, SymbolInformation, SymbolKind, DocumentSymbol, Location, Hover, MarkedString, CodeActionContext, Command, CodeAction, DocumentHighlight, DocumentLink, WorkspaceEdit, TextEdit, CodeActionKind, TextDocumentEdit, VersionedTextDocumentIdentifier, DocumentHighlightKind };
|
|
4
|
-
export
|
|
4
|
+
export type LintSettings = {
|
|
5
5
|
[key: string]: any;
|
|
6
6
|
};
|
|
7
7
|
export interface CompletionSettings {
|
|
@@ -112,7 +112,7 @@ export interface LanguageServiceOptions {
|
|
|
112
112
|
*/
|
|
113
113
|
clientCapabilities?: ClientCapabilities;
|
|
114
114
|
}
|
|
115
|
-
export
|
|
115
|
+
export type EntryStatus = 'standard' | 'experimental' | 'nonstandard' | 'obsolete';
|
|
116
116
|
export interface IReference {
|
|
117
117
|
name: string;
|
|
118
118
|
url: string;
|