vscode-css-languageservice 6.3.10 → 7.0.0-next.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 +8 -0
- package/lib/esm/beautify/beautify-css.js +1437 -1606
- package/lib/esm/cssLanguageService.d.ts +2 -2
- package/lib/esm/cssLanguageService.js +18 -18
- package/lib/esm/languageFacts/colors.js +1 -1
- package/lib/esm/languageFacts/dataManager.js +3 -3
- package/lib/esm/languageFacts/entry.js +1 -1
- package/lib/esm/languageFacts/facts.js +3 -3
- package/lib/esm/parser/cssNodes.js +1 -1
- package/lib/esm/parser/cssParser.js +5 -5
- package/lib/esm/parser/cssSymbolScope.js +2 -2
- package/lib/esm/parser/lessParser.js +5 -5
- package/lib/esm/parser/lessScanner.js +1 -1
- package/lib/esm/parser/scssParser.js +6 -6
- package/lib/esm/parser/scssScanner.js +1 -1
- package/lib/esm/services/cssCodeActions.js +4 -4
- package/lib/esm/services/cssCompletion.js +7 -7
- package/lib/esm/services/cssFolding.js +3 -3
- package/lib/esm/services/cssFormatter.js +3 -3
- package/lib/esm/services/cssHover.js +6 -6
- package/lib/esm/services/cssNavigation.js +6 -6
- package/lib/esm/services/cssSelectionRange.js +2 -2
- package/lib/esm/services/cssValidation.js +4 -4
- package/lib/esm/services/lessCompletion.js +2 -2
- package/lib/esm/services/lint.js +5 -5
- package/lib/esm/services/lintRules.js +1 -1
- package/lib/esm/services/lintUtil.js +1 -1
- package/lib/esm/services/pathCompletion.js +3 -3
- package/lib/esm/services/scssCompletion.js +3 -3
- package/lib/esm/services/scssNavigation.js +4 -4
- package/lib/esm/services/selectorPrinting.js +3 -3
- package/package.json +15 -15
- package/lib/umd/beautify/beautify-css.js +0 -1695
- package/lib/umd/cssLanguageService.d.ts +0 -39
- package/lib/umd/cssLanguageService.js +0 -105
- package/lib/umd/cssLanguageTypes.d.ts +0 -267
- package/lib/umd/cssLanguageTypes.js +0 -89
- package/lib/umd/data/webCustomData.js +0 -44613
- package/lib/umd/languageFacts/builtinData.js +0 -155
- package/lib/umd/languageFacts/colors.js +0 -949
- package/lib/umd/languageFacts/dataManager.js +0 -101
- package/lib/umd/languageFacts/dataProvider.js +0 -86
- package/lib/umd/languageFacts/entry.js +0 -217
- package/lib/umd/languageFacts/facts.js +0 -33
- package/lib/umd/parser/cssErrors.js +0 -61
- package/lib/umd/parser/cssNodes.js +0 -1676
- package/lib/umd/parser/cssParser.js +0 -2035
- package/lib/umd/parser/cssScanner.js +0 -619
- package/lib/umd/parser/cssSymbolScope.js +0 -328
- package/lib/umd/parser/lessParser.js +0 -732
- package/lib/umd/parser/lessScanner.js +0 -70
- package/lib/umd/parser/scssErrors.js +0 -30
- package/lib/umd/parser/scssParser.js +0 -874
- package/lib/umd/parser/scssScanner.js +0 -108
- package/lib/umd/services/cssCodeActions.js +0 -89
- package/lib/umd/services/cssCompletion.js +0 -1109
- package/lib/umd/services/cssFolding.js +0 -202
- package/lib/umd/services/cssFormatter.js +0 -149
- package/lib/umd/services/cssHover.js +0 -174
- package/lib/umd/services/cssNavigation.js +0 -539
- package/lib/umd/services/cssSelectionRange.js +0 -59
- package/lib/umd/services/cssValidation.js +0 -54
- package/lib/umd/services/lessCompletion.js +0 -390
- package/lib/umd/services/lint.js +0 -577
- package/lib/umd/services/lintRules.js +0 -90
- package/lib/umd/services/lintUtil.js +0 -210
- package/lib/umd/services/pathCompletion.js +0 -171
- package/lib/umd/services/scssCompletion.js +0 -367
- package/lib/umd/services/scssNavigation.js +0 -169
- package/lib/umd/services/selectorPrinting.js +0 -575
- package/lib/umd/utils/arrays.js +0 -54
- package/lib/umd/utils/objects.js +0 -24
- package/lib/umd/utils/resources.js +0 -25
- package/lib/umd/utils/strings.js +0 -123
|
@@ -1,39 +0,0 @@
|
|
|
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 type Stylesheet = {};
|
|
3
|
-
export * from './cssLanguageTypes';
|
|
4
|
-
export interface LanguageService {
|
|
5
|
-
configure(raw?: LanguageSettings): void;
|
|
6
|
-
setDataProviders(useDefaultDataProvider: boolean, customDataProviders: ICSSDataProvider[]): void;
|
|
7
|
-
doValidation(document: TextDocument, stylesheet: Stylesheet, documentSettings?: LanguageSettings): Diagnostic[];
|
|
8
|
-
parseStylesheet(document: TextDocument): Stylesheet;
|
|
9
|
-
doComplete(document: TextDocument, position: Position, stylesheet: Stylesheet, settings?: CompletionSettings): CompletionList;
|
|
10
|
-
doComplete2(document: TextDocument, position: Position, stylesheet: Stylesheet, documentContext: DocumentContext, settings?: CompletionSettings): Promise<CompletionList>;
|
|
11
|
-
setCompletionParticipants(registeredCompletionParticipants: ICompletionParticipant[]): void;
|
|
12
|
-
doHover(document: TextDocument, position: Position, stylesheet: Stylesheet, settings?: HoverSettings): Hover | null;
|
|
13
|
-
findDefinition(document: TextDocument, position: Position, stylesheet: Stylesheet): Location | null;
|
|
14
|
-
findReferences(document: TextDocument, position: Position, stylesheet: Stylesheet): Location[];
|
|
15
|
-
findDocumentHighlights(document: TextDocument, position: Position, stylesheet: Stylesheet): DocumentHighlight[];
|
|
16
|
-
findDocumentLinks(document: TextDocument, stylesheet: Stylesheet, documentContext: DocumentContext): DocumentLink[];
|
|
17
|
-
/**
|
|
18
|
-
* Return statically resolved links, and dynamically resolved links if `fsProvider` is proved.
|
|
19
|
-
*/
|
|
20
|
-
findDocumentLinks2(document: TextDocument, stylesheet: Stylesheet, documentContext: DocumentContext): Promise<DocumentLink[]>;
|
|
21
|
-
findDocumentSymbols(document: TextDocument, stylesheet: Stylesheet): SymbolInformation[];
|
|
22
|
-
findDocumentSymbols2(document: TextDocument, stylesheet: Stylesheet): DocumentSymbol[];
|
|
23
|
-
doCodeActions(document: TextDocument, range: Range, context: CodeActionContext, stylesheet: Stylesheet): Command[];
|
|
24
|
-
doCodeActions2(document: TextDocument, range: Range, context: CodeActionContext, stylesheet: Stylesheet): CodeAction[];
|
|
25
|
-
findDocumentColors(document: TextDocument, stylesheet: Stylesheet): ColorInformation[];
|
|
26
|
-
getColorPresentations(document: TextDocument, stylesheet: Stylesheet, color: Color, range: Range): ColorPresentation[];
|
|
27
|
-
prepareRename(document: TextDocument, position: Position, stylesheet: Stylesheet): Range | undefined;
|
|
28
|
-
doRename(document: TextDocument, position: Position, newName: string, stylesheet: Stylesheet): WorkspaceEdit;
|
|
29
|
-
getFoldingRanges(document: TextDocument, context?: {
|
|
30
|
-
rangeLimit?: number;
|
|
31
|
-
}): FoldingRange[];
|
|
32
|
-
getSelectionRanges(document: TextDocument, positions: Position[], stylesheet: Stylesheet): SelectionRange[];
|
|
33
|
-
format(document: TextDocument, range: Range | undefined, options: CSSFormatConfiguration): TextEdit[];
|
|
34
|
-
}
|
|
35
|
-
export declare function getDefaultCSSDataProvider(): ICSSDataProvider;
|
|
36
|
-
export declare function newCSSDataProvider(data: CSSDataV1): ICSSDataProvider;
|
|
37
|
-
export declare function getCSSLanguageService(options?: LanguageServiceOptions): LanguageService;
|
|
38
|
-
export declare function getSCSSLanguageService(options?: LanguageServiceOptions): LanguageService;
|
|
39
|
-
export declare function getLESSLanguageService(options?: LanguageServiceOptions): LanguageService;
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
|
-
if (k2 === undefined) k2 = k;
|
|
3
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
6
|
-
}
|
|
7
|
-
Object.defineProperty(o, k2, desc);
|
|
8
|
-
}) : (function(o, m, k, k2) {
|
|
9
|
-
if (k2 === undefined) k2 = k;
|
|
10
|
-
o[k2] = m[k];
|
|
11
|
-
}));
|
|
12
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
13
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
14
|
-
};
|
|
15
|
-
(function (factory) {
|
|
16
|
-
if (typeof module === "object" && typeof module.exports === "object") {
|
|
17
|
-
var v = factory(require, exports);
|
|
18
|
-
if (v !== undefined) module.exports = v;
|
|
19
|
-
}
|
|
20
|
-
else if (typeof define === "function" && define.amd) {
|
|
21
|
-
define(["require", "exports", "./parser/cssParser", "./services/cssCompletion", "./services/cssHover", "./services/cssNavigation", "./services/cssCodeActions", "./services/cssValidation", "./parser/scssParser", "./services/scssCompletion", "./parser/lessParser", "./services/lessCompletion", "./services/cssFolding", "./services/cssFormatter", "./languageFacts/dataManager", "./languageFacts/dataProvider", "./services/cssSelectionRange", "./services/scssNavigation", "./data/webCustomData", "./cssLanguageTypes"], factory);
|
|
22
|
-
}
|
|
23
|
-
})(function (require, exports) {
|
|
24
|
-
/*---------------------------------------------------------------------------------------------
|
|
25
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
26
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
27
|
-
*--------------------------------------------------------------------------------------------*/
|
|
28
|
-
'use strict';
|
|
29
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.getDefaultCSSDataProvider = getDefaultCSSDataProvider;
|
|
31
|
-
exports.newCSSDataProvider = newCSSDataProvider;
|
|
32
|
-
exports.getCSSLanguageService = getCSSLanguageService;
|
|
33
|
-
exports.getSCSSLanguageService = getSCSSLanguageService;
|
|
34
|
-
exports.getLESSLanguageService = getLESSLanguageService;
|
|
35
|
-
const cssParser_1 = require("./parser/cssParser");
|
|
36
|
-
const cssCompletion_1 = require("./services/cssCompletion");
|
|
37
|
-
const cssHover_1 = require("./services/cssHover");
|
|
38
|
-
const cssNavigation_1 = require("./services/cssNavigation");
|
|
39
|
-
const cssCodeActions_1 = require("./services/cssCodeActions");
|
|
40
|
-
const cssValidation_1 = require("./services/cssValidation");
|
|
41
|
-
const scssParser_1 = require("./parser/scssParser");
|
|
42
|
-
const scssCompletion_1 = require("./services/scssCompletion");
|
|
43
|
-
const lessParser_1 = require("./parser/lessParser");
|
|
44
|
-
const lessCompletion_1 = require("./services/lessCompletion");
|
|
45
|
-
const cssFolding_1 = require("./services/cssFolding");
|
|
46
|
-
const cssFormatter_1 = require("./services/cssFormatter");
|
|
47
|
-
const dataManager_1 = require("./languageFacts/dataManager");
|
|
48
|
-
const dataProvider_1 = require("./languageFacts/dataProvider");
|
|
49
|
-
const cssSelectionRange_1 = require("./services/cssSelectionRange");
|
|
50
|
-
const scssNavigation_1 = require("./services/scssNavigation");
|
|
51
|
-
const webCustomData_1 = require("./data/webCustomData");
|
|
52
|
-
__exportStar(require("./cssLanguageTypes"), exports);
|
|
53
|
-
function getDefaultCSSDataProvider() {
|
|
54
|
-
return newCSSDataProvider(webCustomData_1.cssData);
|
|
55
|
-
}
|
|
56
|
-
function newCSSDataProvider(data) {
|
|
57
|
-
return new dataProvider_1.CSSDataProvider(data);
|
|
58
|
-
}
|
|
59
|
-
function createFacade(parser, completion, hover, navigation, codeActions, validation, cssDataManager) {
|
|
60
|
-
return {
|
|
61
|
-
configure: (settings) => {
|
|
62
|
-
validation.configure(settings);
|
|
63
|
-
completion.configure(settings?.completion);
|
|
64
|
-
hover.configure(settings?.hover);
|
|
65
|
-
navigation.configure(settings?.importAliases);
|
|
66
|
-
},
|
|
67
|
-
setDataProviders: cssDataManager.setDataProviders.bind(cssDataManager),
|
|
68
|
-
doValidation: validation.doValidation.bind(validation),
|
|
69
|
-
parseStylesheet: parser.parseStylesheet.bind(parser),
|
|
70
|
-
doComplete: completion.doComplete.bind(completion),
|
|
71
|
-
doComplete2: completion.doComplete2.bind(completion),
|
|
72
|
-
setCompletionParticipants: completion.setCompletionParticipants.bind(completion),
|
|
73
|
-
doHover: hover.doHover.bind(hover),
|
|
74
|
-
format: cssFormatter_1.format,
|
|
75
|
-
findDefinition: navigation.findDefinition.bind(navigation),
|
|
76
|
-
findReferences: navigation.findReferences.bind(navigation),
|
|
77
|
-
findDocumentHighlights: navigation.findDocumentHighlights.bind(navigation),
|
|
78
|
-
findDocumentLinks: navigation.findDocumentLinks.bind(navigation),
|
|
79
|
-
findDocumentLinks2: navigation.findDocumentLinks2.bind(navigation),
|
|
80
|
-
findDocumentSymbols: navigation.findSymbolInformations.bind(navigation),
|
|
81
|
-
findDocumentSymbols2: navigation.findDocumentSymbols.bind(navigation),
|
|
82
|
-
doCodeActions: codeActions.doCodeActions.bind(codeActions),
|
|
83
|
-
doCodeActions2: codeActions.doCodeActions2.bind(codeActions),
|
|
84
|
-
findDocumentColors: navigation.findDocumentColors.bind(navigation),
|
|
85
|
-
getColorPresentations: navigation.getColorPresentations.bind(navigation),
|
|
86
|
-
prepareRename: navigation.prepareRename.bind(navigation),
|
|
87
|
-
doRename: navigation.doRename.bind(navigation),
|
|
88
|
-
getFoldingRanges: cssFolding_1.getFoldingRanges,
|
|
89
|
-
getSelectionRanges: cssSelectionRange_1.getSelectionRanges
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
const defaultLanguageServiceOptions = {};
|
|
93
|
-
function getCSSLanguageService(options = defaultLanguageServiceOptions) {
|
|
94
|
-
const cssDataManager = new dataManager_1.CSSDataManager(options);
|
|
95
|
-
return createFacade(new cssParser_1.Parser(), new cssCompletion_1.CSSCompletion(null, options, cssDataManager), new cssHover_1.CSSHover(options && options.clientCapabilities, cssDataManager), new cssNavigation_1.CSSNavigation(options && options.fileSystemProvider, false), new cssCodeActions_1.CSSCodeActions(cssDataManager), new cssValidation_1.CSSValidation(cssDataManager), cssDataManager);
|
|
96
|
-
}
|
|
97
|
-
function getSCSSLanguageService(options = defaultLanguageServiceOptions) {
|
|
98
|
-
const cssDataManager = new dataManager_1.CSSDataManager(options);
|
|
99
|
-
return createFacade(new scssParser_1.SCSSParser(), new scssCompletion_1.SCSSCompletion(options, cssDataManager), new cssHover_1.CSSHover(options && options.clientCapabilities, cssDataManager), new scssNavigation_1.SCSSNavigation(options && options.fileSystemProvider), new cssCodeActions_1.CSSCodeActions(cssDataManager), new cssValidation_1.CSSValidation(cssDataManager), cssDataManager);
|
|
100
|
-
}
|
|
101
|
-
function getLESSLanguageService(options = defaultLanguageServiceOptions) {
|
|
102
|
-
const cssDataManager = new dataManager_1.CSSDataManager(options);
|
|
103
|
-
return createFacade(new lessParser_1.LESSParser(), new lessCompletion_1.LESSCompletion(options, cssDataManager), new cssHover_1.CSSHover(options && options.clientCapabilities, cssDataManager), new cssNavigation_1.CSSNavigation(options && options.fileSystemProvider, true), new cssCodeActions_1.CSSCodeActions(cssDataManager), new cssValidation_1.CSSValidation(cssDataManager), cssDataManager);
|
|
104
|
-
}
|
|
105
|
-
});
|
|
@@ -1,267 +0,0 @@
|
|
|
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
|
-
import { TextDocument } from 'vscode-languageserver-textdocument';
|
|
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 type LintSettings = {
|
|
5
|
-
[key: string]: any;
|
|
6
|
-
};
|
|
7
|
-
export interface CompletionSettings {
|
|
8
|
-
triggerPropertyValueCompletion: boolean;
|
|
9
|
-
completePropertyWithSemicolon?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export interface LanguageSettings {
|
|
12
|
-
validate?: boolean;
|
|
13
|
-
lint?: LintSettings;
|
|
14
|
-
completion?: CompletionSettings;
|
|
15
|
-
hover?: HoverSettings;
|
|
16
|
-
importAliases?: AliasSettings;
|
|
17
|
-
}
|
|
18
|
-
export interface AliasSettings {
|
|
19
|
-
[key: string]: string;
|
|
20
|
-
}
|
|
21
|
-
export interface HoverSettings {
|
|
22
|
-
documentation?: boolean;
|
|
23
|
-
references?: boolean;
|
|
24
|
-
}
|
|
25
|
-
export interface PropertyCompletionContext {
|
|
26
|
-
propertyName: string;
|
|
27
|
-
range: Range;
|
|
28
|
-
}
|
|
29
|
-
export interface PropertyValueCompletionContext {
|
|
30
|
-
propertyName: string;
|
|
31
|
-
propertyValue?: string;
|
|
32
|
-
range: Range;
|
|
33
|
-
}
|
|
34
|
-
export interface URILiteralCompletionContext {
|
|
35
|
-
uriValue: string;
|
|
36
|
-
position: Position;
|
|
37
|
-
range: Range;
|
|
38
|
-
}
|
|
39
|
-
export interface ImportPathCompletionContext {
|
|
40
|
-
pathValue: string;
|
|
41
|
-
position: Position;
|
|
42
|
-
range: Range;
|
|
43
|
-
}
|
|
44
|
-
export interface MixinReferenceCompletionContext {
|
|
45
|
-
mixinName: string;
|
|
46
|
-
range: Range;
|
|
47
|
-
}
|
|
48
|
-
export interface ICompletionParticipant {
|
|
49
|
-
onCssProperty?: (context: PropertyCompletionContext) => void;
|
|
50
|
-
onCssPropertyValue?: (context: PropertyValueCompletionContext) => void;
|
|
51
|
-
onCssURILiteralValue?: (context: URILiteralCompletionContext) => void;
|
|
52
|
-
onCssImportPath?: (context: ImportPathCompletionContext) => void;
|
|
53
|
-
onCssMixinReference?: (context: MixinReferenceCompletionContext) => void;
|
|
54
|
-
}
|
|
55
|
-
export interface DocumentContext {
|
|
56
|
-
resolveReference(ref: string, baseUrl: string): string | undefined;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Describes what LSP capabilities the client supports
|
|
60
|
-
*/
|
|
61
|
-
export interface ClientCapabilities {
|
|
62
|
-
/**
|
|
63
|
-
* The text document client capabilities
|
|
64
|
-
*/
|
|
65
|
-
textDocument?: {
|
|
66
|
-
/**
|
|
67
|
-
* Capabilities specific to completions.
|
|
68
|
-
*/
|
|
69
|
-
completion?: {
|
|
70
|
-
/**
|
|
71
|
-
* The client supports the following `CompletionItem` specific
|
|
72
|
-
* capabilities.
|
|
73
|
-
*/
|
|
74
|
-
completionItem?: {
|
|
75
|
-
/**
|
|
76
|
-
* Client supports the follow content formats for the documentation
|
|
77
|
-
* property. The order describes the preferred format of the client.
|
|
78
|
-
*/
|
|
79
|
-
documentationFormat?: MarkupKind[];
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
/**
|
|
83
|
-
* Capabilities specific to hovers.
|
|
84
|
-
*/
|
|
85
|
-
hover?: {
|
|
86
|
-
/**
|
|
87
|
-
* Client supports the follow content formats for the content
|
|
88
|
-
* property. The order describes the preferred format of the client.
|
|
89
|
-
*/
|
|
90
|
-
contentFormat?: MarkupKind[];
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
export declare namespace ClientCapabilities {
|
|
95
|
-
const LATEST: ClientCapabilities;
|
|
96
|
-
}
|
|
97
|
-
export interface LanguageServiceOptions {
|
|
98
|
-
/**
|
|
99
|
-
* Unless set to false, the default CSS data provider will be used
|
|
100
|
-
* along with the providers from customDataProviders.
|
|
101
|
-
* Defaults to true.
|
|
102
|
-
*/
|
|
103
|
-
useDefaultDataProvider?: boolean;
|
|
104
|
-
/**
|
|
105
|
-
* Provide data that could enhance the service's understanding of
|
|
106
|
-
* CSS property / at-rule / pseudo-class / pseudo-element
|
|
107
|
-
*/
|
|
108
|
-
customDataProviders?: ICSSDataProvider[];
|
|
109
|
-
/**
|
|
110
|
-
* Abstract file system access away from the service.
|
|
111
|
-
* Used for dynamic link resolving, path completion, etc.
|
|
112
|
-
*/
|
|
113
|
-
fileSystemProvider?: FileSystemProvider;
|
|
114
|
-
/**
|
|
115
|
-
* Describes the LSP capabilities the client supports.
|
|
116
|
-
*/
|
|
117
|
-
clientCapabilities?: ClientCapabilities;
|
|
118
|
-
}
|
|
119
|
-
export type EntryStatus = 'standard' | 'experimental' | 'nonstandard' | 'obsolete';
|
|
120
|
-
export interface IReference {
|
|
121
|
-
name: string;
|
|
122
|
-
url: string;
|
|
123
|
-
}
|
|
124
|
-
export interface IPropertyData {
|
|
125
|
-
name: string;
|
|
126
|
-
description?: string | MarkupContent;
|
|
127
|
-
browsers?: string[];
|
|
128
|
-
baseline?: BaselineStatus;
|
|
129
|
-
restrictions?: string[];
|
|
130
|
-
status?: EntryStatus;
|
|
131
|
-
syntax?: string;
|
|
132
|
-
values?: IValueData[];
|
|
133
|
-
references?: IReference[];
|
|
134
|
-
relevance?: number;
|
|
135
|
-
atRule?: string;
|
|
136
|
-
}
|
|
137
|
-
export interface IDescriptorData {
|
|
138
|
-
name: string;
|
|
139
|
-
description?: string;
|
|
140
|
-
references?: IReference[];
|
|
141
|
-
syntax?: string;
|
|
142
|
-
type?: string;
|
|
143
|
-
values?: IValueData[];
|
|
144
|
-
browsers?: string[];
|
|
145
|
-
baseline?: BaselineStatus;
|
|
146
|
-
status?: EntryStatus;
|
|
147
|
-
}
|
|
148
|
-
export interface IAtDirectiveData {
|
|
149
|
-
name: string;
|
|
150
|
-
description?: string | MarkupContent;
|
|
151
|
-
browsers?: string[];
|
|
152
|
-
baseline?: BaselineStatus;
|
|
153
|
-
status?: EntryStatus;
|
|
154
|
-
references?: IReference[];
|
|
155
|
-
descriptors?: IDescriptorData[];
|
|
156
|
-
}
|
|
157
|
-
export interface IPseudoClassData {
|
|
158
|
-
name: string;
|
|
159
|
-
description?: string | MarkupContent;
|
|
160
|
-
browsers?: string[];
|
|
161
|
-
baseline?: BaselineStatus;
|
|
162
|
-
status?: EntryStatus;
|
|
163
|
-
references?: IReference[];
|
|
164
|
-
}
|
|
165
|
-
export interface IPseudoElementData {
|
|
166
|
-
name: string;
|
|
167
|
-
description?: string | MarkupContent;
|
|
168
|
-
browsers?: string[];
|
|
169
|
-
baseline?: BaselineStatus;
|
|
170
|
-
status?: EntryStatus;
|
|
171
|
-
references?: IReference[];
|
|
172
|
-
}
|
|
173
|
-
export interface IValueData {
|
|
174
|
-
name: string;
|
|
175
|
-
description?: string | MarkupContent;
|
|
176
|
-
browsers?: string[];
|
|
177
|
-
baseline?: BaselineStatus;
|
|
178
|
-
status?: EntryStatus;
|
|
179
|
-
references?: IReference[];
|
|
180
|
-
}
|
|
181
|
-
export interface CSSDataV1 {
|
|
182
|
-
version: 1 | 1.1;
|
|
183
|
-
properties?: IPropertyData[];
|
|
184
|
-
atDirectives?: IAtDirectiveData[];
|
|
185
|
-
pseudoClasses?: IPseudoClassData[];
|
|
186
|
-
pseudoElements?: IPseudoElementData[];
|
|
187
|
-
}
|
|
188
|
-
export interface BaselineStatus {
|
|
189
|
-
status: Baseline;
|
|
190
|
-
baseline_low_date?: string;
|
|
191
|
-
baseline_high_date?: string;
|
|
192
|
-
}
|
|
193
|
-
export type Baseline = 'false' | 'low' | 'high';
|
|
194
|
-
export interface ICSSDataProvider {
|
|
195
|
-
provideProperties(): IPropertyData[];
|
|
196
|
-
provideAtDirectives(): IAtDirectiveData[];
|
|
197
|
-
providePseudoClasses(): IPseudoClassData[];
|
|
198
|
-
providePseudoElements(): IPseudoElementData[];
|
|
199
|
-
}
|
|
200
|
-
export declare enum FileType {
|
|
201
|
-
/**
|
|
202
|
-
* The file type is unknown.
|
|
203
|
-
*/
|
|
204
|
-
Unknown = 0,
|
|
205
|
-
/**
|
|
206
|
-
* A regular file.
|
|
207
|
-
*/
|
|
208
|
-
File = 1,
|
|
209
|
-
/**
|
|
210
|
-
* A directory.
|
|
211
|
-
*/
|
|
212
|
-
Directory = 2,
|
|
213
|
-
/**
|
|
214
|
-
* A symbolic link to a file.
|
|
215
|
-
*/
|
|
216
|
-
SymbolicLink = 64
|
|
217
|
-
}
|
|
218
|
-
export interface FileStat {
|
|
219
|
-
/**
|
|
220
|
-
* The type of the file, e.g. is a regular file, a directory, or symbolic link
|
|
221
|
-
* to a file.
|
|
222
|
-
*/
|
|
223
|
-
type: FileType;
|
|
224
|
-
/**
|
|
225
|
-
* The creation timestamp in milliseconds elapsed since January 1, 1970 00:00:00 UTC.
|
|
226
|
-
*/
|
|
227
|
-
ctime: number;
|
|
228
|
-
/**
|
|
229
|
-
* The modification timestamp in milliseconds elapsed since January 1, 1970 00:00:00 UTC.
|
|
230
|
-
*/
|
|
231
|
-
mtime: number;
|
|
232
|
-
/**
|
|
233
|
-
* The size in bytes.
|
|
234
|
-
*/
|
|
235
|
-
size: number;
|
|
236
|
-
}
|
|
237
|
-
export interface FileSystemProvider {
|
|
238
|
-
stat(uri: DocumentUri): Promise<FileStat>;
|
|
239
|
-
readDirectory?(uri: DocumentUri): Promise<[string, FileType][]>;
|
|
240
|
-
getContent?(uri: DocumentUri, encoding?: string): Promise<string>;
|
|
241
|
-
}
|
|
242
|
-
export interface CSSFormatConfiguration {
|
|
243
|
-
/** indentation size. Default: 4 */
|
|
244
|
-
tabSize?: number;
|
|
245
|
-
/** Whether to use spaces or tabs */
|
|
246
|
-
insertSpaces?: boolean;
|
|
247
|
-
/** end with a newline: Default: false */
|
|
248
|
-
insertFinalNewline?: boolean;
|
|
249
|
-
/** separate selectors with newline (e.g. "a,\nbr" or "a, br"): Default: true */
|
|
250
|
-
newlineBetweenSelectors?: boolean;
|
|
251
|
-
/** add a new line after every css rule: Default: true */
|
|
252
|
-
newlineBetweenRules?: boolean;
|
|
253
|
-
/** ensure space around selector separators: '>', '+', '~' (e.g. "a>b" -> "a > b"): Default: false */
|
|
254
|
-
spaceAroundSelectorSeparator?: boolean;
|
|
255
|
-
/** put braces on the same line as rules (`collapse`), or put braces on own line, Allman / ANSI style (`expand`). Default `collapse` */
|
|
256
|
-
braceStyle?: 'collapse' | 'expand';
|
|
257
|
-
/** whether existing line breaks before elements should be preserved. Default: true */
|
|
258
|
-
preserveNewLines?: boolean;
|
|
259
|
-
/** maximum number of line breaks to be preserved in one chunk. Default: unlimited */
|
|
260
|
-
maxPreserveNewLines?: number;
|
|
261
|
-
/** maximum amount of characters per line (0/undefined = disabled). Default: disabled. */
|
|
262
|
-
wrapLineLength?: number;
|
|
263
|
-
/** add indenting whitespace to empty lines. Default: false */
|
|
264
|
-
indentEmptyLines?: boolean;
|
|
265
|
-
/** @deprecated Use newlineBetweenSelectors instead*/
|
|
266
|
-
selectorSeparatorNewline?: boolean;
|
|
267
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
(function (factory) {
|
|
2
|
-
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
-
var v = factory(require, exports);
|
|
4
|
-
if (v !== undefined) module.exports = v;
|
|
5
|
-
}
|
|
6
|
-
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "vscode-languageserver-types", "vscode-languageserver-textdocument"], factory);
|
|
8
|
-
}
|
|
9
|
-
})(function (require, exports) {
|
|
10
|
-
/*---------------------------------------------------------------------------------------------
|
|
11
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
12
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
13
|
-
*--------------------------------------------------------------------------------------------*/
|
|
14
|
-
'use strict';
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.FileType = exports.ClientCapabilities = exports.DocumentHighlightKind = exports.VersionedTextDocumentIdentifier = exports.TextDocumentEdit = exports.CodeActionKind = exports.TextEdit = exports.WorkspaceEdit = exports.DocumentLink = exports.DocumentHighlight = exports.CodeAction = exports.Command = exports.CodeActionContext = exports.MarkedString = exports.Hover = exports.Location = exports.DocumentSymbol = exports.SymbolKind = exports.SymbolInformation = exports.InsertTextFormat = exports.CompletionItemTag = exports.CompletionList = exports.CompletionItemKind = exports.CompletionItem = exports.DiagnosticSeverity = exports.Diagnostic = exports.SelectionRange = exports.FoldingRangeKind = exports.FoldingRange = exports.ColorPresentation = exports.ColorInformation = exports.Color = exports.MarkupKind = exports.MarkupContent = exports.DocumentUri = exports.Position = exports.Range = exports.TextDocument = void 0;
|
|
17
|
-
const vscode_languageserver_types_1 = require("vscode-languageserver-types");
|
|
18
|
-
Object.defineProperty(exports, "Range", { enumerable: true, get: function () { return vscode_languageserver_types_1.Range; } });
|
|
19
|
-
Object.defineProperty(exports, "Position", { enumerable: true, get: function () { return vscode_languageserver_types_1.Position; } });
|
|
20
|
-
Object.defineProperty(exports, "DocumentUri", { enumerable: true, get: function () { return vscode_languageserver_types_1.DocumentUri; } });
|
|
21
|
-
Object.defineProperty(exports, "MarkupContent", { enumerable: true, get: function () { return vscode_languageserver_types_1.MarkupContent; } });
|
|
22
|
-
Object.defineProperty(exports, "MarkupKind", { enumerable: true, get: function () { return vscode_languageserver_types_1.MarkupKind; } });
|
|
23
|
-
Object.defineProperty(exports, "Color", { enumerable: true, get: function () { return vscode_languageserver_types_1.Color; } });
|
|
24
|
-
Object.defineProperty(exports, "ColorInformation", { enumerable: true, get: function () { return vscode_languageserver_types_1.ColorInformation; } });
|
|
25
|
-
Object.defineProperty(exports, "ColorPresentation", { enumerable: true, get: function () { return vscode_languageserver_types_1.ColorPresentation; } });
|
|
26
|
-
Object.defineProperty(exports, "FoldingRange", { enumerable: true, get: function () { return vscode_languageserver_types_1.FoldingRange; } });
|
|
27
|
-
Object.defineProperty(exports, "FoldingRangeKind", { enumerable: true, get: function () { return vscode_languageserver_types_1.FoldingRangeKind; } });
|
|
28
|
-
Object.defineProperty(exports, "SelectionRange", { enumerable: true, get: function () { return vscode_languageserver_types_1.SelectionRange; } });
|
|
29
|
-
Object.defineProperty(exports, "Diagnostic", { enumerable: true, get: function () { return vscode_languageserver_types_1.Diagnostic; } });
|
|
30
|
-
Object.defineProperty(exports, "DiagnosticSeverity", { enumerable: true, get: function () { return vscode_languageserver_types_1.DiagnosticSeverity; } });
|
|
31
|
-
Object.defineProperty(exports, "CompletionItem", { enumerable: true, get: function () { return vscode_languageserver_types_1.CompletionItem; } });
|
|
32
|
-
Object.defineProperty(exports, "CompletionItemKind", { enumerable: true, get: function () { return vscode_languageserver_types_1.CompletionItemKind; } });
|
|
33
|
-
Object.defineProperty(exports, "CompletionList", { enumerable: true, get: function () { return vscode_languageserver_types_1.CompletionList; } });
|
|
34
|
-
Object.defineProperty(exports, "CompletionItemTag", { enumerable: true, get: function () { return vscode_languageserver_types_1.CompletionItemTag; } });
|
|
35
|
-
Object.defineProperty(exports, "InsertTextFormat", { enumerable: true, get: function () { return vscode_languageserver_types_1.InsertTextFormat; } });
|
|
36
|
-
Object.defineProperty(exports, "SymbolInformation", { enumerable: true, get: function () { return vscode_languageserver_types_1.SymbolInformation; } });
|
|
37
|
-
Object.defineProperty(exports, "SymbolKind", { enumerable: true, get: function () { return vscode_languageserver_types_1.SymbolKind; } });
|
|
38
|
-
Object.defineProperty(exports, "DocumentSymbol", { enumerable: true, get: function () { return vscode_languageserver_types_1.DocumentSymbol; } });
|
|
39
|
-
Object.defineProperty(exports, "Location", { enumerable: true, get: function () { return vscode_languageserver_types_1.Location; } });
|
|
40
|
-
Object.defineProperty(exports, "Hover", { enumerable: true, get: function () { return vscode_languageserver_types_1.Hover; } });
|
|
41
|
-
Object.defineProperty(exports, "MarkedString", { enumerable: true, get: function () { return vscode_languageserver_types_1.MarkedString; } });
|
|
42
|
-
Object.defineProperty(exports, "CodeActionContext", { enumerable: true, get: function () { return vscode_languageserver_types_1.CodeActionContext; } });
|
|
43
|
-
Object.defineProperty(exports, "Command", { enumerable: true, get: function () { return vscode_languageserver_types_1.Command; } });
|
|
44
|
-
Object.defineProperty(exports, "CodeAction", { enumerable: true, get: function () { return vscode_languageserver_types_1.CodeAction; } });
|
|
45
|
-
Object.defineProperty(exports, "DocumentHighlight", { enumerable: true, get: function () { return vscode_languageserver_types_1.DocumentHighlight; } });
|
|
46
|
-
Object.defineProperty(exports, "DocumentLink", { enumerable: true, get: function () { return vscode_languageserver_types_1.DocumentLink; } });
|
|
47
|
-
Object.defineProperty(exports, "WorkspaceEdit", { enumerable: true, get: function () { return vscode_languageserver_types_1.WorkspaceEdit; } });
|
|
48
|
-
Object.defineProperty(exports, "TextEdit", { enumerable: true, get: function () { return vscode_languageserver_types_1.TextEdit; } });
|
|
49
|
-
Object.defineProperty(exports, "CodeActionKind", { enumerable: true, get: function () { return vscode_languageserver_types_1.CodeActionKind; } });
|
|
50
|
-
Object.defineProperty(exports, "TextDocumentEdit", { enumerable: true, get: function () { return vscode_languageserver_types_1.TextDocumentEdit; } });
|
|
51
|
-
Object.defineProperty(exports, "VersionedTextDocumentIdentifier", { enumerable: true, get: function () { return vscode_languageserver_types_1.VersionedTextDocumentIdentifier; } });
|
|
52
|
-
Object.defineProperty(exports, "DocumentHighlightKind", { enumerable: true, get: function () { return vscode_languageserver_types_1.DocumentHighlightKind; } });
|
|
53
|
-
const vscode_languageserver_textdocument_1 = require("vscode-languageserver-textdocument");
|
|
54
|
-
Object.defineProperty(exports, "TextDocument", { enumerable: true, get: function () { return vscode_languageserver_textdocument_1.TextDocument; } });
|
|
55
|
-
var ClientCapabilities;
|
|
56
|
-
(function (ClientCapabilities) {
|
|
57
|
-
ClientCapabilities.LATEST = {
|
|
58
|
-
textDocument: {
|
|
59
|
-
completion: {
|
|
60
|
-
completionItem: {
|
|
61
|
-
documentationFormat: [vscode_languageserver_types_1.MarkupKind.Markdown, vscode_languageserver_types_1.MarkupKind.PlainText]
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
hover: {
|
|
65
|
-
contentFormat: [vscode_languageserver_types_1.MarkupKind.Markdown, vscode_languageserver_types_1.MarkupKind.PlainText]
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
})(ClientCapabilities || (exports.ClientCapabilities = ClientCapabilities = {}));
|
|
70
|
-
var FileType;
|
|
71
|
-
(function (FileType) {
|
|
72
|
-
/**
|
|
73
|
-
* The file type is unknown.
|
|
74
|
-
*/
|
|
75
|
-
FileType[FileType["Unknown"] = 0] = "Unknown";
|
|
76
|
-
/**
|
|
77
|
-
* A regular file.
|
|
78
|
-
*/
|
|
79
|
-
FileType[FileType["File"] = 1] = "File";
|
|
80
|
-
/**
|
|
81
|
-
* A directory.
|
|
82
|
-
*/
|
|
83
|
-
FileType[FileType["Directory"] = 2] = "Directory";
|
|
84
|
-
/**
|
|
85
|
-
* A symbolic link to a file.
|
|
86
|
-
*/
|
|
87
|
-
FileType[FileType["SymbolicLink"] = 64] = "SymbolicLink";
|
|
88
|
-
})(FileType || (exports.FileType = FileType = {}));
|
|
89
|
-
});
|