Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions packages/language-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,18 @@
"estree-walker": "^2.0.1",
"fast-glob": "^3.2.7",
"lodash": "^4.17.21",
"prettier": "2.3.2",
"prettier-plugin-svelte": "~2.4.0",
"prettier": "2.4.1",
"prettier-plugin-svelte": "~2.5.0",
"source-map": "^0.7.3",
"svelte": "~3.38.2",
"svelte-preprocess": "~4.7.3",
"svelte2tsx": "~0.4.0",
"typescript": "*",
"vscode-css-languageservice": "5.0.0",
"vscode-emmet-helper": "2.1.2",
"vscode-html-languageservice": "4.0.0",
"vscode-css-languageservice": "~5.1.0",
"vscode-emmet-helper": "~2.6.0",
"vscode-html-languageservice": "~4.1.0",
"vscode-languageserver": "7.1.0-next.4",
"vscode-languageserver-types": "3.16.0",
"vscode-uri": "2.1.2"
"vscode-uri": "~3.0.0"
}
}
29 changes: 14 additions & 15 deletions packages/language-server/src/plugins/css/CSSPlugin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getEmmetCompletionParticipants, doComplete as doEmmetComplete } from 'vscode-emmet-helper';
import { doComplete as doEmmetComplete } from 'vscode-emmet-helper';
import {
Color,
ColorInformation,
Expand Down Expand Up @@ -207,7 +207,10 @@ export class CSSPlugin
if (isSASS(cssDocument)) {
// the css language service does not support sass, still we can use
// the emmet helper directly to at least get emmet completions
return doEmmetComplete(document, position, 'sass', this.configManager.getEmmetConfig());
return (
doEmmetComplete(document, position, 'sass', this.configManager.getEmmetConfig()) ||
null
);
}

const type = extractLanguage(cssDocument);
Expand All @@ -216,21 +219,17 @@ export class CSSPlugin
}

const lang = getLanguageService(type);
const emmetResults: CompletionList = {
isIncomplete: true,
const emmetResults: CompletionList = (this.configManager.getConfig().css.completions
.emmet &&
doEmmetComplete(
cssDocument,
cssDocument.getGeneratedPosition(position),
getLanguage(type),
this.configManager.getEmmetConfig()
)) || {
isIncomplete: false,
items: []
};
if (this.configManager.getConfig().css.completions.emmet) {
lang.setCompletionParticipants([
getEmmetCompletionParticipants(
cssDocument,
cssDocument.getGeneratedPosition(position),
getLanguage(type),
this.configManager.getEmmetConfig(),
emmetResults
)
]);
}
const results = lang.doComplete(
cssDocument,
cssDocument.getGeneratedPosition(position),
Expand Down
19 changes: 5 additions & 14 deletions packages/language-server/src/plugins/html/HTMLPlugin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getEmmetCompletionParticipants } from 'vscode-emmet-helper';
import { doComplete as doEmmetComplete } from 'vscode-emmet-helper';
import {
getLanguageService,
HTMLDocument,
Expand Down Expand Up @@ -88,21 +88,12 @@ export class HTMLPlugin
return null;
}

const emmetResults: CompletionList = {
isIncomplete: true,
const emmetResults: CompletionList = (this.configManager.getConfig().html.completions
.emmet &&
doEmmetComplete(document, position, 'html', this.configManager.getEmmetConfig())) || {
isIncomplete: false,
items: []
};
if (this.configManager.getConfig().html.completions.emmet) {
this.lang.setCompletionParticipants([
getEmmetCompletionParticipants(
document,
position,
'html',
this.configManager.getEmmetConfig(),
emmetResults
)
]);
}

const results = this.isInComponentTag(html, document, position)
? // Only allow emmet inside component element tags.
Expand Down
2 changes: 1 addition & 1 deletion packages/svelte-check/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@
"vscode-languageserver": "7.1.0-next.4",
"vscode-languageserver-protocol": "3.16.0",
"vscode-languageserver-types": "3.16.0",
"vscode-uri": "2.1.2"
"vscode-uri": "~3.0.0"
}
}
80 changes: 45 additions & 35 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@
esutils "^2.0.2"
js-tokens "^4.0.0"

"@emmetio/abbreviation@^2.1.1":
version "2.1.1"
resolved "https://registry.yarnpkg.com/@emmetio/abbreviation/-/abbreviation-2.1.1.tgz#7f4c69c69f3ace6dc9cf9eac7e53286e43d752ec"
integrity sha512-2U9lDODdlaqZn6J84gG/czuJ5u7mHx3NfTEt0ZKeKBFnNdcM60ryWM7SEexh/UbdQmCNQIJE4m/wTNulilApOA==
"@emmetio/abbreviation@^2.2.2":
version "2.2.2"
resolved "https://registry.yarnpkg.com/@emmetio/abbreviation/-/abbreviation-2.2.2.tgz#746762fd9e7a8c2ea604f580c62e3cfe250e6989"
integrity sha512-TtE/dBnkTCct8+LntkqVrwqQao6EnPAs1YN3cUgxOxTaBlesBCY37ROUAVZrRlG64GNnVShdl/b70RfAI3w5lw==
dependencies:
"@emmetio/scanner" "^1.0.0"

"@emmetio/css-abbreviation@^2.1.2":
version "2.1.2"
resolved "https://registry.yarnpkg.com/@emmetio/css-abbreviation/-/css-abbreviation-2.1.2.tgz#4a5d96f2576dd827a2c1a060374ffa8a5408cc1c"
integrity sha512-CvYTzJltVpLqJaCZ1Qn97LVAKsl2Uwl2fzir1EX/WuMY3xWxgc3BWRCheL6k65km6GyDrLVl6RhrrNb/pxOiAQ==
"@emmetio/css-abbreviation@^2.1.4":
version "2.1.4"
resolved "https://registry.yarnpkg.com/@emmetio/css-abbreviation/-/css-abbreviation-2.1.4.tgz#90362e8a1122ce3b76f6c3157907d30182f53f54"
integrity sha512-qk9L60Y+uRtM5CPbB0y+QNl/1XKE09mSO+AhhSauIfr2YOx/ta3NJw2d8RtCFxgzHeRqFRr8jgyzThbu+MZ4Uw==
dependencies:
"@emmetio/scanner" "^1.0.0"

Expand Down Expand Up @@ -841,13 +841,13 @@ doctrine@^3.0.0:
dependencies:
esutils "^2.0.2"

emmet@^2.1.5:
version "2.2.1"
resolved "https://registry.yarnpkg.com/emmet/-/emmet-2.2.1.tgz#5d44d5361e2029def9f6a09f0451ee70b9fa488c"
integrity sha512-sX/Vyu7V84uwvJeuF+lQUeNa5njMPjF9DGoYEXBqueO+OFQVptMyG44RuBLiD+PSPNWk2hmaewWLeP3R+2/5jg==
emmet@^2.3.0:
version "2.3.4"
resolved "https://registry.yarnpkg.com/emmet/-/emmet-2.3.4.tgz#5ba0d7a5569a68c7697dfa890c772e4f3179d123"
integrity sha512-3IqSwmO+N2ZGeuhDyhV/TIOJFUbkChi53bcasSNRE7Yd+4eorbbYz4e53TpMECt38NtYkZNupQCZRlwdAYA42A==
dependencies:
"@emmetio/abbreviation" "^2.1.1"
"@emmetio/css-abbreviation" "^2.1.2"
"@emmetio/abbreviation" "^2.2.2"
"@emmetio/css-abbreviation" "^2.1.4"

emoji-regex@^7.0.1:
version "7.0.3"
Expand Down Expand Up @@ -2077,16 +2077,21 @@ prelude-ls@^1.2.1:
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==

prettier-plugin-svelte@~2.4.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/prettier-plugin-svelte/-/prettier-plugin-svelte-2.4.0.tgz#482bb6003bf1d5bd7ff002261a42a32b87d42d00"
integrity sha512-JwJ9bOz4XHLQtiLnX4mTSSDUdhu12WH8sTwy/XTDCSyPlah6IcV7NWeYBZscPEcceu2YnW8Y9sJCP40Z2UH9GA==
prettier-plugin-svelte@~2.5.0:
version "2.5.0"
resolved "https://registry.yarnpkg.com/prettier-plugin-svelte/-/prettier-plugin-svelte-2.5.0.tgz#7922534729f7febe59b4c56c3f5360539f0d8ab1"
integrity sha512-+iHY2uGChOngrgKielJUnqo74gIL/EO5oeWm8MftFWjEi213lq9QYTOwm1pv4lI1nA61tdgf80CF2i5zMcu1kw==

prettier@2.3.2:
version "2.3.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.2.tgz#ef280a05ec253712e486233db5c6f23441e7342d"
integrity sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ==

prettier@2.4.1:
version "2.4.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.4.1.tgz#671e11c89c14a4cfc876ce564106c4a6726c9f5c"
integrity sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA==

progress@^2.0.0:
version "2.0.3"
resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8"
Expand Down Expand Up @@ -2593,7 +2598,7 @@ type-fest@^0.8.1:
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d"
integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==

typescript@*,typescript@^4.4.3:
typescript@*, typescript@^4.4.3:
version "4.4.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.3.tgz#bdc5407caa2b109efd4f82fe130656f977a29324"
integrity sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA==
Expand Down Expand Up @@ -2638,37 +2643,37 @@ vfile-message@*:
"@types/unist" "^2.0.0"
unist-util-stringify-position "^2.0.0"

vscode-css-languageservice@5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-5.0.0.tgz#04fd899e25407a2fccd8f59a5896e2f020269bda"
integrity sha512-DTMa8QbVmujFPvD3NxoC5jjIXCyCG+cvn3hNzwQRhvhsk8LblNymBZBwzfcDdgEtqsi4O/2AB5HnMIRzxhzEzg==
vscode-css-languageservice@~5.1.0:
version "5.1.8"
resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-5.1.8.tgz#36cb389788ffc2d5e6630ffc84e55ee38f8a2338"
integrity sha512-Si1sMykS8U/p8LYgLGPCfZD1YFT0AtvUJQp9XJGw64DZWhtwYo28G2l64USLS9ge4ZPMZpwdpOK7PfbVKfgiiA==
dependencies:
vscode-languageserver-textdocument "^1.0.1"
vscode-languageserver-types "^3.16.0"
vscode-nls "^5.0.0"
vscode-uri "^2.1.2"
vscode-uri "^3.0.2"

vscode-emmet-helper@2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/vscode-emmet-helper/-/vscode-emmet-helper-2.1.2.tgz#2978060ebb736a7e0f6e6f1d649bd026880528c3"
integrity sha512-Fy6UNawSgxE3Kuqi54vSXohf03iOIrp1A74ReAgzvGP9Yt7fUAvkqF6No2WAc34/w0oWAHAeqoBNqmKKWh6U5w==
vscode-emmet-helper@~2.6.0:
version "2.6.4"
resolved "https://registry.yarnpkg.com/vscode-emmet-helper/-/vscode-emmet-helper-2.6.4.tgz#bea47f17649bba26b412f3d1fac18aaee43eba25"
integrity sha512-fP0nunW1RUWEKGf4gqiYLOVNFFGXSRHjCl0pikxtwCFlty8WwimM+RBJ5o0aIiwerrYD30HqeaVyvDW027Sseg==
dependencies:
emmet "^2.1.5"
emmet "^2.3.0"
jsonc-parser "^2.3.0"
vscode-languageserver-textdocument "^1.0.1"
vscode-languageserver-types "^3.15.1"
vscode-nls "^5.0.0"
vscode-uri "^2.1.2"

vscode-html-languageservice@4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/vscode-html-languageservice/-/vscode-html-languageservice-4.0.0.tgz#a562cb1dfe7e40a9d1f50dbd8c4ec2d02f393f01"
integrity sha512-UmC+GS0IqBeZnOAmdtQvaDzoH1c5/un+b7qALUziu/Y4SOPXso5dF+YkJeTqsde6YU2pLm78RtMDzl9BParwbw==
vscode-html-languageservice@~4.1.0:
version "4.1.1"
resolved "https://registry.yarnpkg.com/vscode-html-languageservice/-/vscode-html-languageservice-4.1.1.tgz#93739c9f3d0c12c8249bad23f5005850c289ec38"
integrity sha512-rrDyCiOgMwOPgchpPGAeLzjYVVEW/Ror2/a1BWUEI3S9+NQhA9vj4SQkzmH6g2Bq9S9SV0OQeadD+xphOf1N3w==
dependencies:
vscode-languageserver-textdocument "^1.0.1"
vscode-languageserver-types "^3.16.0"
vscode-nls "^5.0.0"
vscode-uri "^2.1.2"
vscode-uri "^3.0.2"

vscode-jsonrpc@6.0.0:
version "6.0.0"
Expand Down Expand Up @@ -2732,11 +2737,16 @@ vscode-nls@^5.0.0:
resolved "https://registry.yarnpkg.com/vscode-nls/-/vscode-nls-5.0.0.tgz#99f0da0bd9ea7cda44e565a74c54b1f2bc257840"
integrity sha512-u0Lw+IYlgbEJFF6/qAqG2d1jQmJl0eyAGJHoAJqr2HT4M2BNuQYSEiSE75f52pXHSJm8AlTjnLLbBFPrdz2hpA==

vscode-uri@2.1.2, vscode-uri@^2.1.2:
vscode-uri@^2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-2.1.2.tgz#c8d40de93eb57af31f3c715dd650e2ca2c096f1c"
integrity sha512-8TEXQxlldWAuIODdukIb+TR5s+9Ds40eSJrw+1iDDA9IFORPjMELarNQE3myz5XIkWWpdprmJjm1/SxMlWOC8A==

vscode-uri@^3.0.2, vscode-uri@~3.0.0:
version "3.0.2"
resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-3.0.2.tgz#ecfd1d066cb8ef4c3a208decdbab9a8c23d055d0"
integrity sha512-jkjy6pjU1fxUvI51P+gCsxg1u2n8LSt0W6KrCNQceaziKzff74GoWmjVG46KieVzybO1sttPQmYfrwSHey7GUA==

which@2.0.2, which@^2.0.1:
version "2.0.2"
resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1"
Expand Down