vscode-css-languageservice 6.2.10 → 6.2.12
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/README.md +4 -4
- package/lib/esm/beautify/beautify-css.js +3 -7
- package/lib/esm/cssLanguageService.js +1 -0
- package/lib/esm/cssLanguageTypes.d.ts +4 -0
- package/lib/esm/data/webCustomData.js +576 -375
- package/lib/esm/parser/cssParser.js +5 -3
- package/lib/esm/parser/cssScanner.js +2 -2
- package/lib/esm/parser/lessParser.js +7 -5
- package/lib/esm/parser/scssParser.js +4 -4
- package/lib/esm/services/cssNavigation.js +22 -1
- package/lib/esm/services/scssNavigation.js +3 -3
- package/lib/esm/services/selectorPrinting.js +38 -2
- package/lib/umd/beautify/beautify-css.js +3 -7
- package/lib/umd/cssLanguageService.js +1 -0
- package/lib/umd/cssLanguageTypes.d.ts +4 -0
- package/lib/umd/data/webCustomData.js +576 -375
- package/lib/umd/parser/cssParser.js +5 -3
- package/lib/umd/parser/cssScanner.js +2 -2
- package/lib/umd/parser/lessParser.js +7 -5
- package/lib/umd/parser/scssParser.js +4 -4
- package/lib/umd/services/cssNavigation.js +22 -1
- package/lib/umd/services/scssNavigation.js +3 -3
- package/lib/umd/services/selectorPrinting.js +39 -3
- package/package.json +13 -13
- package/thirdpartynotices.txt +0 -29
package/README.md
CHANGED
|
@@ -39,8 +39,8 @@ Development
|
|
|
39
39
|
-----------
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
- clone this repo, run
|
|
43
|
-
- `
|
|
42
|
+
- clone this repo, run `npm install``
|
|
43
|
+
- `npm test` to compile and run tests
|
|
44
44
|
|
|
45
45
|
How can I run and debug the service?
|
|
46
46
|
|
|
@@ -53,8 +53,8 @@ How can I run and debug the service?
|
|
|
53
53
|
How can I run and debug the service inside an instance of VSCode?
|
|
54
54
|
|
|
55
55
|
- run VSCode out of sources setup as described here: https://github.com/Microsoft/vscode/wiki/How-to-Contribute
|
|
56
|
-
- run `
|
|
57
|
-
- use `
|
|
56
|
+
- run `npm link` in the folder of `vscode-css-languageservice`
|
|
57
|
+
- use `npm link vscode-css-languageservice` in `vscode/extensions/css-language-features/server` to run VSCode with the latest changes from `vscode-css-languageservice`
|
|
58
58
|
- run VSCode out of source (`vscode/scripts/code.sh|bat`) and open a `.css` file
|
|
59
59
|
- in VSCode window that is open on the `vscode-css-languageservice` sources, run command `Debug: Attach to Node process` and pick the `code-oss` process with the `css-language-features` path
|
|
60
60
|

|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// copied from js-beautify/js/lib/beautify-css.js
|
|
2
|
-
// version: 1.14.
|
|
2
|
+
// version: 1.14.11
|
|
3
3
|
/* AUTO-GENERATED. DO NOT MODIFY. */
|
|
4
4
|
/*
|
|
5
5
|
|
|
@@ -1280,13 +1280,11 @@ Beautifier.prototype.beautify = function() {
|
|
|
1280
1280
|
|
|
1281
1281
|
if (variable.match(/[ :]$/)) {
|
|
1282
1282
|
// we have a variable or pseudo-class, add it and insert one space before continuing
|
|
1283
|
-
variable = this.eatString(": ").replace(/\s
|
|
1283
|
+
variable = this.eatString(": ").replace(/\s+$/, '');
|
|
1284
1284
|
this.print_string(variable);
|
|
1285
1285
|
this._output.space_before_token = true;
|
|
1286
1286
|
}
|
|
1287
1287
|
|
|
1288
|
-
variable = variable.replace(/\s$/, '');
|
|
1289
|
-
|
|
1290
1288
|
// might be sass variable
|
|
1291
1289
|
if (parenLevel === 0 && variable.indexOf(':') !== -1) {
|
|
1292
1290
|
insidePropertyValue = true;
|
|
@@ -1306,13 +1304,11 @@ Beautifier.prototype.beautify = function() {
|
|
|
1306
1304
|
|
|
1307
1305
|
if (variableOrRule.match(/[ :]$/)) {
|
|
1308
1306
|
// we have a variable or pseudo-class, add it and insert one space before continuing
|
|
1309
|
-
variableOrRule = this.eatString(": ").replace(/\s
|
|
1307
|
+
variableOrRule = this.eatString(": ").replace(/\s+$/, '');
|
|
1310
1308
|
this.print_string(variableOrRule);
|
|
1311
1309
|
this._output.space_before_token = true;
|
|
1312
1310
|
}
|
|
1313
1311
|
|
|
1314
|
-
variableOrRule = variableOrRule.replace(/\s$/, '');
|
|
1315
|
-
|
|
1316
1312
|
// might be less variable
|
|
1317
1313
|
if (parenLevel === 0 && variableOrRule.indexOf(':') !== -1) {
|
|
1318
1314
|
insidePropertyValue = true;
|
|
@@ -33,6 +33,7 @@ function createFacade(parser, completion, hover, navigation, codeActions, valida
|
|
|
33
33
|
validation.configure(settings);
|
|
34
34
|
completion.configure(settings?.completion);
|
|
35
35
|
hover.configure(settings?.hover);
|
|
36
|
+
navigation.configure(settings?.importAliases);
|
|
36
37
|
},
|
|
37
38
|
setDataProviders: cssDataManager.setDataProviders.bind(cssDataManager),
|
|
38
39
|
doValidation: validation.doValidation.bind(validation),
|
|
@@ -13,6 +13,10 @@ export interface LanguageSettings {
|
|
|
13
13
|
lint?: LintSettings;
|
|
14
14
|
completion?: CompletionSettings;
|
|
15
15
|
hover?: HoverSettings;
|
|
16
|
+
importAliases?: AliasSettings;
|
|
17
|
+
}
|
|
18
|
+
export interface AliasSettings {
|
|
19
|
+
[key: string]: string;
|
|
16
20
|
}
|
|
17
21
|
export interface HoverSettings {
|
|
18
22
|
documentation?: boolean;
|