Skip to content

Commit

Permalink
chore: bump next volar
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Aug 18, 2024
1 parent 0e52a2d commit 2e559db
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 111 deletions.
1 change: 0 additions & 1 deletion extensions/vscode/src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ async function doActivate(context: vscode.ExtensionContext, createLc: CreateLang
lsp.activateAutoInsertion(selectors, client);
lsp.activateDocumentDropEdit(selectors, client);
lsp.activateWriteVirtualFiles('vue.action.writeVirtualFiles', client);
lsp.activateServerSys(client);

if (!enabledHybridMode) {
lsp.activateTsConfigStatusItem(selectors, 'vue.tsconfig', client);
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
},
"pnpm": {
"overrides": {
"@volar/kit": "https://pkg.pr.new/volarjs/volar.js/@volar/kit@7f93034",
"@volar/language-core": "https://pkg.pr.new/volarjs/volar.js/@volar/language-core@7f93034",
"@volar/language-server": "https://pkg.pr.new/volarjs/volar.js/@volar/language-server@7f93034",
"@volar/language-service": "https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034",
"@volar/source-map": "https://pkg.pr.new/volarjs/volar.js/@volar/source-map@7f93034",
"@volar/typescript": "https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034",
"@volar/vscode": "https://pkg.pr.new/volarjs/volar.js/@volar/vscode@7f93034",
"@volar/kit": "https://pkg.pr.new/volarjs/volar.js/@volar/kit@ab44192",
"@volar/language-core": "https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ab44192",
"@volar/language-server": "https://pkg.pr.new/volarjs/volar.js/@volar/language-server@ab44192",
"@volar/language-service": "https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192",
"@volar/source-map": "https://pkg.pr.new/volarjs/volar.js/@volar/source-map@ab44192",
"@volar/typescript": "https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192",
"@volar/vscode": "https://pkg.pr.new/volarjs/volar.js/@volar/vscode@ab44192",
"volar-service-css": "https://pkg.pr.new/volarjs/services/volar-service-css@f520ee3",
"volar-service-emmet": "https://pkg.pr.new/volarjs/services/volar-service-emmet@f520ee3",
"volar-service-html": "https://pkg.pr.new/volarjs/services/volar-service-html@f520ee3",
Expand Down
11 changes: 5 additions & 6 deletions packages/language-server/lib/hybridModeProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ export function createHybridModeProject(
setup(_server) {
server = _server;
onSomePipeReadyCallbacks.push(() => {
server.diagnosticsSupport?.refresh(project, false);
server.languageFeatures.refreshDiagnostics(false);
});
server.onDidChangeWatchedFiles(({ changes }) => {
server.fileWatcher.onDidChangeWatchedFiles(({ changes }) => {
for (const change of changes) {
const changeUri = URI.parse(change.uri);
if (tsconfigProjects.has(changeUri)) {
Expand Down Expand Up @@ -90,11 +90,10 @@ export function createHybridModeProject(
asFileName,
});
const language = createLanguage([
{ getLanguageId: uri => server.documents.get(server.getSyncedDocumentKey(uri) ?? uri.toString())?.languageId },
{ getLanguageId: uri => server.documents.get(uri)?.languageId },
...languagePlugins,
], createUriMap(), uri => {
const documentKey = server.getSyncedDocumentKey(uri);
const document = documentKey ? server.documents.get(documentKey) : undefined;
const document = server.documents.get(uri);
if (document) {
language.scripts.set(uri, document.getSnapshot(), document.languageId);
}
Expand All @@ -107,7 +106,7 @@ export function createHybridModeProject(
return createLanguageService(
language,
server.languageServicePlugins,
createLanguageServiceEnvironment(server, [...server.workspaceFolders.keys()]),
createLanguageServiceEnvironment(server, [...server.workspaceFolders.all]),
project
);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/language-server/lib/initialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export function initialize(
watchingExtensions.add(ext);
}
fileWatcher?.then(dispose => dispose.dispose());
fileWatcher = server.watchFiles(['**/*.{' + [...watchingExtensions].join(',') + '}']);
fileWatcher = server.fileWatcher.watchFiles(['**/*.{' + [...watchingExtensions].join(',') + '}']);
}
}
}
2 changes: 1 addition & 1 deletion packages/language-service/lib/plugins/vue-document-drop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function create(
return {
name: 'vue-document-drop',
capabilities: {
// documentDropEditsProvider: true,
documentDropEditsProvider: true,
},
create(context): LanguageServicePluginInstance {
if (!context.project.vue) {
Expand Down
Loading

0 comments on commit 2e559db

Please sign in to comment.