Skip to content

Commit 1cc7d5d

Browse files
committed
Update vue-suggest-define-assignment.ts
1 parent 24655ed commit 1cc7d5d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/language-service/lib/plugins/vue-suggest-define-assignment.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { CompletionItem, CompletionItemKind, LanguageServicePlugin, TextDocument } from '@volar/language-service';
22
import { type TextRange, tsCodegen } from '@vue/language-core';
33
import type * as ts from 'typescript';
4+
import { URI } from 'vscode-uri';
45
import { resolveEmbeddedCode } from '../utils';
56

67
const documentToSourceFile = new WeakMap<TextDocument, ts.SourceFile>();
@@ -129,7 +130,7 @@ function getSourceFile(ts: typeof import('typescript'), document: TextDocument):
129130
let sourceFile = documentToSourceFile.get(document);
130131
if (!sourceFile) {
131132
sourceFile = ts.createSourceFile(
132-
document.uri,
133+
URI.parse(document.uri).path,
133134
document.getText(),
134135
ts.ScriptTarget.Latest,
135136
);

0 commit comments

Comments
 (0)