vscode-css-languageservice 6.0.1 → 6.1.0

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.
Files changed (87) hide show
  1. package/CHANGELOG.md +3 -1
  2. package/SECURITY.md +41 -0
  3. package/lib/esm/beautify/beautify-css.js +11 -4
  4. package/lib/esm/cssLanguageService.d.ts +38 -37
  5. package/lib/esm/cssLanguageService.js +73 -72
  6. package/lib/esm/cssLanguageTypes.d.ts +238 -238
  7. package/lib/esm/cssLanguageTypes.js +42 -42
  8. package/lib/esm/data/webCustomData.js +22089 -21959
  9. package/lib/esm/languageFacts/builtinData.js +142 -142
  10. package/lib/esm/languageFacts/colors.js +469 -469
  11. package/lib/esm/languageFacts/dataManager.js +88 -88
  12. package/lib/esm/languageFacts/dataProvider.js +73 -73
  13. package/lib/esm/languageFacts/entry.js +137 -137
  14. package/lib/esm/languageFacts/facts.js +8 -8
  15. package/lib/esm/parser/cssErrors.js +48 -48
  16. package/lib/esm/parser/cssNodes.js +1511 -1502
  17. package/lib/esm/parser/cssParser.js +1606 -1534
  18. package/lib/esm/parser/cssScanner.js +592 -592
  19. package/lib/esm/parser/cssSymbolScope.js +311 -311
  20. package/lib/esm/parser/lessParser.js +715 -714
  21. package/lib/esm/parser/lessScanner.js +57 -57
  22. package/lib/esm/parser/scssErrors.js +18 -18
  23. package/lib/esm/parser/scssParser.js +806 -796
  24. package/lib/esm/parser/scssScanner.js +95 -95
  25. package/lib/esm/services/cssCodeActions.js +77 -77
  26. package/lib/esm/services/cssCompletion.js +1054 -1054
  27. package/lib/esm/services/cssFolding.js +190 -190
  28. package/lib/esm/services/cssFormatter.js +136 -136
  29. package/lib/esm/services/cssHover.js +148 -148
  30. package/lib/esm/services/cssNavigation.js +441 -378
  31. package/lib/esm/services/cssSelectionRange.js +47 -47
  32. package/lib/esm/services/cssValidation.js +41 -41
  33. package/lib/esm/services/lessCompletion.js +378 -378
  34. package/lib/esm/services/lint.js +518 -518
  35. package/lib/esm/services/lintRules.js +76 -76
  36. package/lib/esm/services/lintUtil.js +196 -196
  37. package/lib/esm/services/pathCompletion.js +157 -157
  38. package/lib/esm/services/scssCompletion.js +354 -354
  39. package/lib/esm/services/scssNavigation.js +82 -82
  40. package/lib/esm/services/selectorPrinting.js +492 -492
  41. package/lib/esm/utils/arrays.js +40 -40
  42. package/lib/esm/utils/objects.js +11 -11
  43. package/lib/esm/utils/resources.js +11 -11
  44. package/lib/esm/utils/strings.js +102 -102
  45. package/lib/umd/beautify/beautify-css.js +11 -4
  46. package/lib/umd/cssLanguageService.d.ts +38 -37
  47. package/lib/umd/cssLanguageService.js +104 -99
  48. package/lib/umd/cssLanguageTypes.d.ts +238 -238
  49. package/lib/umd/cssLanguageTypes.js +89 -89
  50. package/lib/umd/data/webCustomData.js +22102 -21972
  51. package/lib/umd/languageFacts/builtinData.js +154 -154
  52. package/lib/umd/languageFacts/colors.js +492 -492
  53. package/lib/umd/languageFacts/dataManager.js +101 -101
  54. package/lib/umd/languageFacts/dataProvider.js +86 -86
  55. package/lib/umd/languageFacts/entry.js +152 -152
  56. package/lib/umd/languageFacts/facts.js +33 -29
  57. package/lib/umd/parser/cssErrors.js +61 -61
  58. package/lib/umd/parser/cssNodes.js +1597 -1587
  59. package/lib/umd/parser/cssParser.js +1619 -1547
  60. package/lib/umd/parser/cssScanner.js +606 -606
  61. package/lib/umd/parser/cssSymbolScope.js +328 -328
  62. package/lib/umd/parser/lessParser.js +728 -727
  63. package/lib/umd/parser/lessScanner.js +70 -70
  64. package/lib/umd/parser/scssErrors.js +31 -31
  65. package/lib/umd/parser/scssParser.js +819 -809
  66. package/lib/umd/parser/scssScanner.js +108 -108
  67. package/lib/umd/services/cssCodeActions.js +90 -90
  68. package/lib/umd/services/cssCompletion.js +1067 -1067
  69. package/lib/umd/services/cssFolding.js +203 -203
  70. package/lib/umd/services/cssFormatter.js +150 -150
  71. package/lib/umd/services/cssHover.js +161 -161
  72. package/lib/umd/services/cssNavigation.js +454 -391
  73. package/lib/umd/services/cssSelectionRange.js +60 -60
  74. package/lib/umd/services/cssValidation.js +54 -54
  75. package/lib/umd/services/lessCompletion.js +391 -391
  76. package/lib/umd/services/lint.js +531 -531
  77. package/lib/umd/services/lintRules.js +91 -91
  78. package/lib/umd/services/lintUtil.js +210 -210
  79. package/lib/umd/services/pathCompletion.js +171 -171
  80. package/lib/umd/services/scssCompletion.js +367 -367
  81. package/lib/umd/services/scssNavigation.js +95 -95
  82. package/lib/umd/services/selectorPrinting.js +510 -510
  83. package/lib/umd/utils/arrays.js +55 -55
  84. package/lib/umd/utils/objects.js +25 -25
  85. package/lib/umd/utils/resources.js +26 -26
  86. package/lib/umd/utils/strings.js +120 -120
  87. package/package.json +13 -12
@@ -1,40 +1,40 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the MIT License. See License.txt in the project root for license information.
4
- *--------------------------------------------------------------------------------------------*/
5
- 'use strict';
6
- /**
7
- * Takes a sorted array and a function p. The array is sorted in such a way that all elements where p(x) is false
8
- * are located before all elements where p(x) is true.
9
- * @returns the least x for which p(x) is true or array.length if no element fullfills the given function.
10
- */
11
- export function findFirst(array, p) {
12
- let low = 0, high = array.length;
13
- if (high === 0) {
14
- return 0; // no children
15
- }
16
- while (low < high) {
17
- let mid = Math.floor((low + high) / 2);
18
- if (p(array[mid])) {
19
- high = mid;
20
- }
21
- else {
22
- low = mid + 1;
23
- }
24
- }
25
- return low;
26
- }
27
- export function includes(array, item) {
28
- return array.indexOf(item) !== -1;
29
- }
30
- export function union(...arrays) {
31
- const result = [];
32
- for (const array of arrays) {
33
- for (const item of array) {
34
- if (!includes(result, item)) {
35
- result.push(item);
36
- }
37
- }
38
- }
39
- return result;
40
- }
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ 'use strict';
6
+ /**
7
+ * Takes a sorted array and a function p. The array is sorted in such a way that all elements where p(x) is false
8
+ * are located before all elements where p(x) is true.
9
+ * @returns the least x for which p(x) is true or array.length if no element fullfills the given function.
10
+ */
11
+ export function findFirst(array, p) {
12
+ let low = 0, high = array.length;
13
+ if (high === 0) {
14
+ return 0; // no children
15
+ }
16
+ while (low < high) {
17
+ let mid = Math.floor((low + high) / 2);
18
+ if (p(array[mid])) {
19
+ high = mid;
20
+ }
21
+ else {
22
+ low = mid + 1;
23
+ }
24
+ }
25
+ return low;
26
+ }
27
+ export function includes(array, item) {
28
+ return array.indexOf(item) !== -1;
29
+ }
30
+ export function union(...arrays) {
31
+ const result = [];
32
+ for (const array of arrays) {
33
+ for (const item of array) {
34
+ if (!includes(result, item)) {
35
+ result.push(item);
36
+ }
37
+ }
38
+ }
39
+ return result;
40
+ }
@@ -1,11 +1,11 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the MIT License. See License.txt in the project root for license information.
4
- *--------------------------------------------------------------------------------------------*/
5
- 'use strict';
6
- export function values(obj) {
7
- return Object.keys(obj).map(key => obj[key]);
8
- }
9
- export function isDefined(obj) {
10
- return typeof obj !== 'undefined';
11
- }
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ 'use strict';
6
+ export function values(obj) {
7
+ return Object.keys(obj).map(key => obj[key]);
8
+ }
9
+ export function isDefined(obj) {
10
+ return typeof obj !== 'undefined';
11
+ }
@@ -1,11 +1,11 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the MIT License. See License.txt in the project root for license information.
4
- *--------------------------------------------------------------------------------------------*/
5
- import { URI, Utils } from 'vscode-uri';
6
- export function dirname(uriString) {
7
- return Utils.dirname(URI.parse(uriString)).toString();
8
- }
9
- export function joinPath(uriString, ...paths) {
10
- return Utils.joinPath(URI.parse(uriString), ...paths).toString();
11
- }
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ import { URI, Utils } from 'vscode-uri';
6
+ export function dirname(uriString) {
7
+ return Utils.dirname(URI.parse(uriString)).toString(true);
8
+ }
9
+ export function joinPath(uriString, ...paths) {
10
+ return Utils.joinPath(URI.parse(uriString), ...paths).toString(true);
11
+ }
@@ -1,102 +1,102 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the MIT License. See License.txt in the project root for license information.
4
- *--------------------------------------------------------------------------------------------*/
5
- 'use strict';
6
- export function startsWith(haystack, needle) {
7
- if (haystack.length < needle.length) {
8
- return false;
9
- }
10
- for (let i = 0; i < needle.length; i++) {
11
- if (haystack[i] !== needle[i]) {
12
- return false;
13
- }
14
- }
15
- return true;
16
- }
17
- /**
18
- * Determines if haystack ends with needle.
19
- */
20
- export function endsWith(haystack, needle) {
21
- let diff = haystack.length - needle.length;
22
- if (diff > 0) {
23
- return haystack.lastIndexOf(needle) === diff;
24
- }
25
- else if (diff === 0) {
26
- return haystack === needle;
27
- }
28
- else {
29
- return false;
30
- }
31
- }
32
- /**
33
- * Computes the difference score for two strings. More similar strings have a higher score.
34
- * We use largest common subsequence dynamic programming approach but penalize in the end for length differences.
35
- * Strings that have a large length difference will get a bad default score 0.
36
- * Complexity - both time and space O(first.length * second.length)
37
- * Dynamic programming LCS computation http://en.wikipedia.org/wiki/Longest_common_subsequence_problem
38
- *
39
- * @param first a string
40
- * @param second a string
41
- */
42
- export function difference(first, second, maxLenDelta = 4) {
43
- let lengthDifference = Math.abs(first.length - second.length);
44
- // We only compute score if length of the currentWord and length of entry.name are similar.
45
- if (lengthDifference > maxLenDelta) {
46
- return 0;
47
- }
48
- // Initialize LCS (largest common subsequence) matrix.
49
- let LCS = [];
50
- let zeroArray = [];
51
- let i, j;
52
- for (i = 0; i < second.length + 1; ++i) {
53
- zeroArray.push(0);
54
- }
55
- for (i = 0; i < first.length + 1; ++i) {
56
- LCS.push(zeroArray);
57
- }
58
- for (i = 1; i < first.length + 1; ++i) {
59
- for (j = 1; j < second.length + 1; ++j) {
60
- if (first[i - 1] === second[j - 1]) {
61
- LCS[i][j] = LCS[i - 1][j - 1] + 1;
62
- }
63
- else {
64
- LCS[i][j] = Math.max(LCS[i - 1][j], LCS[i][j - 1]);
65
- }
66
- }
67
- }
68
- return LCS[first.length][second.length] - Math.sqrt(lengthDifference);
69
- }
70
- /**
71
- * Limit of string length.
72
- */
73
- export function getLimitedString(str, ellipsis = true) {
74
- if (!str) {
75
- return '';
76
- }
77
- if (str.length < 140) {
78
- return str;
79
- }
80
- return str.slice(0, 140) + (ellipsis ? '\u2026' : '');
81
- }
82
- /**
83
- * Limit of string length.
84
- */
85
- export function trim(str, regexp) {
86
- const m = regexp.exec(str);
87
- if (m && m[0].length) {
88
- return str.substr(0, str.length - m[0].length);
89
- }
90
- return str;
91
- }
92
- export function repeat(value, count) {
93
- let s = '';
94
- while (count > 0) {
95
- if ((count & 1) === 1) {
96
- s += value;
97
- }
98
- value += value;
99
- count = count >>> 1;
100
- }
101
- return s;
102
- }
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ 'use strict';
6
+ export function startsWith(haystack, needle) {
7
+ if (haystack.length < needle.length) {
8
+ return false;
9
+ }
10
+ for (let i = 0; i < needle.length; i++) {
11
+ if (haystack[i] !== needle[i]) {
12
+ return false;
13
+ }
14
+ }
15
+ return true;
16
+ }
17
+ /**
18
+ * Determines if haystack ends with needle.
19
+ */
20
+ export function endsWith(haystack, needle) {
21
+ let diff = haystack.length - needle.length;
22
+ if (diff > 0) {
23
+ return haystack.lastIndexOf(needle) === diff;
24
+ }
25
+ else if (diff === 0) {
26
+ return haystack === needle;
27
+ }
28
+ else {
29
+ return false;
30
+ }
31
+ }
32
+ /**
33
+ * Computes the difference score for two strings. More similar strings have a higher score.
34
+ * We use largest common subsequence dynamic programming approach but penalize in the end for length differences.
35
+ * Strings that have a large length difference will get a bad default score 0.
36
+ * Complexity - both time and space O(first.length * second.length)
37
+ * Dynamic programming LCS computation http://en.wikipedia.org/wiki/Longest_common_subsequence_problem
38
+ *
39
+ * @param first a string
40
+ * @param second a string
41
+ */
42
+ export function difference(first, second, maxLenDelta = 4) {
43
+ let lengthDifference = Math.abs(first.length - second.length);
44
+ // We only compute score if length of the currentWord and length of entry.name are similar.
45
+ if (lengthDifference > maxLenDelta) {
46
+ return 0;
47
+ }
48
+ // Initialize LCS (largest common subsequence) matrix.
49
+ let LCS = [];
50
+ let zeroArray = [];
51
+ let i, j;
52
+ for (i = 0; i < second.length + 1; ++i) {
53
+ zeroArray.push(0);
54
+ }
55
+ for (i = 0; i < first.length + 1; ++i) {
56
+ LCS.push(zeroArray);
57
+ }
58
+ for (i = 1; i < first.length + 1; ++i) {
59
+ for (j = 1; j < second.length + 1; ++j) {
60
+ if (first[i - 1] === second[j - 1]) {
61
+ LCS[i][j] = LCS[i - 1][j - 1] + 1;
62
+ }
63
+ else {
64
+ LCS[i][j] = Math.max(LCS[i - 1][j], LCS[i][j - 1]);
65
+ }
66
+ }
67
+ }
68
+ return LCS[first.length][second.length] - Math.sqrt(lengthDifference);
69
+ }
70
+ /**
71
+ * Limit of string length.
72
+ */
73
+ export function getLimitedString(str, ellipsis = true) {
74
+ if (!str) {
75
+ return '';
76
+ }
77
+ if (str.length < 140) {
78
+ return str;
79
+ }
80
+ return str.slice(0, 140) + (ellipsis ? '\u2026' : '');
81
+ }
82
+ /**
83
+ * Limit of string length.
84
+ */
85
+ export function trim(str, regexp) {
86
+ const m = regexp.exec(str);
87
+ if (m && m[0].length) {
88
+ return str.substr(0, str.length - m[0].length);
89
+ }
90
+ return str;
91
+ }
92
+ export function repeat(value, count) {
93
+ let s = '';
94
+ while (count > 0) {
95
+ if ((count & 1) === 1) {
96
+ s += value;
97
+ }
98
+ value += value;
99
+ count = count >>> 1;
100
+ }
101
+ return s;
102
+ }
@@ -1,5 +1,5 @@
1
1
  // copied from js-beautify/js/lib/beautify-css.js
2
- // version: 1.14.3
2
+ // version: 1.14.6
3
3
  /* AUTO-GENERATED. DO NOT MODIFY. */
4
4
  /*
5
5
 
@@ -1093,6 +1093,7 @@ function Beautifier(source_text, options) {
1093
1093
  "@document": true
1094
1094
  };
1095
1095
  this.NON_SEMICOLON_NEWLINE_PROPERTY = [
1096
+ "grid-template-areas",
1096
1097
  "grid-template"
1097
1098
  ];
1098
1099
 
@@ -1424,7 +1425,8 @@ Beautifier.prototype.beautify = function() {
1424
1425
  }
1425
1426
  }
1426
1427
  } else if (this._ch === '"' || this._ch === '\'') {
1427
- this.preserveSingleSpace(isAfterSpace);
1428
+ var preserveQuoteSpace = previous_ch === '"' || previous_ch === '\'';
1429
+ this.preserveSingleSpace(preserveQuoteSpace || isAfterSpace);
1428
1430
  this.print_string(this._ch + this.eatString(this._ch));
1429
1431
  this.eatWhitespace(true);
1430
1432
  } else if (this._ch === ';') {
@@ -1468,7 +1470,12 @@ Beautifier.prototype.beautify = function() {
1468
1470
  }
1469
1471
  }
1470
1472
  } else {
1471
- this.preserveSingleSpace(isAfterSpace);
1473
+ var space_needed = false;
1474
+ if (this._input.lookBack("with")) {
1475
+ // look back is not an accurate solution, we need tokens to confirm without whitespaces
1476
+ space_needed = true;
1477
+ }
1478
+ this.preserveSingleSpace(isAfterSpace || space_needed);
1472
1479
  this.print_string(this._ch);
1473
1480
 
1474
1481
  // handle scss/sass map
@@ -1526,7 +1533,7 @@ Beautifier.prototype.beautify = function() {
1526
1533
  this._ch = '';
1527
1534
  }
1528
1535
  } else if (this._ch === '!' && !this._input.lookBack("\\")) { // !important
1529
- this.print_string(' ');
1536
+ this._output.space_before_token = true;
1530
1537
  this.print_string(this._ch);
1531
1538
  } else {
1532
1539
  var preserveAfterSpace = previous_ch === '"' || previous_ch === '\'';
@@ -1,37 +1,38 @@
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 } from './cssLanguageTypes';
2
- export declare 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
- doCodeActions(document: TextDocument, range: Range, context: CodeActionContext, stylesheet: Stylesheet): Command[];
23
- doCodeActions2(document: TextDocument, range: Range, context: CodeActionContext, stylesheet: Stylesheet): CodeAction[];
24
- findDocumentColors(document: TextDocument, stylesheet: Stylesheet): ColorInformation[];
25
- getColorPresentations(document: TextDocument, stylesheet: Stylesheet, color: Color, range: Range): ColorPresentation[];
26
- doRename(document: TextDocument, position: Position, newName: string, stylesheet: Stylesheet): WorkspaceEdit;
27
- getFoldingRanges(document: TextDocument, context?: {
28
- rangeLimit?: number;
29
- }): FoldingRange[];
30
- getSelectionRanges(document: TextDocument, positions: Position[], stylesheet: Stylesheet): SelectionRange[];
31
- format(document: TextDocument, range: Range | undefined, options: CSSFormatConfiguration): TextEdit[];
32
- }
33
- export declare function getDefaultCSSDataProvider(): ICSSDataProvider;
34
- export declare function newCSSDataProvider(data: CSSDataV1): ICSSDataProvider;
35
- export declare function getCSSLanguageService(options?: LanguageServiceOptions): LanguageService;
36
- export declare function getSCSSLanguageService(options?: LanguageServiceOptions): LanguageService;
37
- export declare function getLESSLanguageService(options?: LanguageServiceOptions): LanguageService;
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 declare 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
+ doRename(document: TextDocument, position: Position, newName: string, stylesheet: Stylesheet): WorkspaceEdit;
28
+ getFoldingRanges(document: TextDocument, context?: {
29
+ rangeLimit?: number;
30
+ }): FoldingRange[];
31
+ getSelectionRanges(document: TextDocument, positions: Position[], stylesheet: Stylesheet): SelectionRange[];
32
+ format(document: TextDocument, range: Range | undefined, options: CSSFormatConfiguration): TextEdit[];
33
+ }
34
+ export declare function getDefaultCSSDataProvider(): ICSSDataProvider;
35
+ export declare function newCSSDataProvider(data: CSSDataV1): ICSSDataProvider;
36
+ export declare function getCSSLanguageService(options?: LanguageServiceOptions): LanguageService;
37
+ export declare function getSCSSLanguageService(options?: LanguageServiceOptions): LanguageService;
38
+ export declare function getLESSLanguageService(options?: LanguageServiceOptions): LanguageService;