@volar/typescript 2.0.0-alpha.2 → 2.0.0-alpha.3
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.
|
@@ -5,6 +5,29 @@ const language_core_1 = require("@volar/language-core");
|
|
|
5
5
|
const dedupe_1 = require("./dedupe");
|
|
6
6
|
function decorateLanguageService(virtualFiles, languageService, isTsPlugin) {
|
|
7
7
|
const transformedDiagnostics = new WeakMap();
|
|
8
|
+
// ignored methods
|
|
9
|
+
const { getNavigationTree, getOutliningSpans, } = languageService;
|
|
10
|
+
languageService.getNavigationTree = (fileName) => {
|
|
11
|
+
const [virtualFile] = getVirtualFileAndMap(fileName);
|
|
12
|
+
if (virtualFile) {
|
|
13
|
+
const tree = getNavigationTree(fileName);
|
|
14
|
+
tree.childItems = undefined;
|
|
15
|
+
return tree;
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
return getNavigationTree(fileName);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
languageService.getOutliningSpans = (fileName) => {
|
|
22
|
+
const [virtualFile] = getVirtualFileAndMap(fileName);
|
|
23
|
+
if (virtualFile) {
|
|
24
|
+
return [];
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
return getOutliningSpans(fileName);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
// methods
|
|
8
31
|
const { findReferences, findRenameLocations, getCompletionEntryDetails, getCompletionsAtPosition, getDefinitionAndBoundSpan, getDefinitionAtPosition, getFileReferences, getImplementationAtPosition, getQuickInfoAtPosition, getReferencesAtPosition, getSemanticDiagnostics, getSyntacticDiagnostics, getSuggestionDiagnostics, getTypeDefinitionAtPosition, getEncodedSemanticClassifications, getDocumentHighlights, getApplicableRefactors, getEditsForRefactor, getRenameInfo, getCodeFixesAtPosition, prepareCallHierarchy, provideCallHierarchyIncomingCalls, provideCallHierarchyOutgoingCalls, provideInlayHints, organizeImports, } = languageService;
|
|
9
32
|
languageService.prepareCallHierarchy = (fileName, position) => {
|
|
10
33
|
const [virtualFile, sourceFile, map] = getVirtualFileAndMap(fileName);
|
|
@@ -94,7 +94,6 @@ function createLanguage(ts, sys, languages, configFileName, projectHost) {
|
|
|
94
94
|
...sys,
|
|
95
95
|
getCurrentDirectory: projectHost.getCurrentDirectory,
|
|
96
96
|
getCompilationSettings: projectHost.getCompilationSettings,
|
|
97
|
-
getCancellationToken: projectHost.getCancellationToken,
|
|
98
97
|
getLocalizedDiagnosticMessages: projectHost.getLocalizedDiagnosticMessages,
|
|
99
98
|
getProjectReferences: projectHost.getProjectReferences,
|
|
100
99
|
getDefaultLibFileName: (options) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volar/typescript",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"**/*.js",
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
"directory": "packages/typescript"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@volar/language-core": "2.0.0-alpha.
|
|
15
|
+
"@volar/language-core": "2.0.0-alpha.3",
|
|
16
16
|
"path-browserify": "^1.0.1"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@types/path-browserify": "latest",
|
|
20
|
-
"@volar/language-service": "2.0.0-alpha.
|
|
20
|
+
"@volar/language-service": "2.0.0-alpha.3"
|
|
21
21
|
},
|
|
22
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "0bb685a72cff180bb9b3420aaf3136c8e899c908"
|
|
23
23
|
}
|