volar-service-typescript 0.0.31-patch.1 → 0.0.32
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/index.d.ts +4 -17
- package/index.js +12 -545
- package/lib/configs/getFormatCodeSettings.d.ts +2 -3
- package/lib/configs/getUserPreferences.d.ts +1 -1
- package/lib/plugins/directiveComment.d.ts +3 -0
- package/lib/plugins/directiveComment.js +65 -0
- package/lib/plugins/docCommentTemplate.d.ts +3 -0
- package/lib/{features/completions/jsDoc.js → plugins/docCommentTemplate.js} +42 -30
- package/lib/plugins/semantic.d.ts +23 -0
- package/lib/plugins/semantic.js +706 -0
- package/lib/plugins/syntactic.d.ts +7 -0
- package/lib/plugins/syntactic.js +92 -0
- package/lib/{features → semanticFeatures}/codeAction.d.ts +3 -2
- package/lib/{features → semanticFeatures}/codeAction.js +14 -17
- package/lib/{features → semanticFeatures}/codeActionResolve.d.ts +1 -1
- package/lib/{features → semanticFeatures}/codeActionResolve.js +7 -7
- package/lib/semanticFeatures/semanticTokens.d.ts +5 -0
- package/lib/{features → semanticFeatures}/semanticTokens.js +4 -8
- package/lib/{types.d.ts → semanticFeatures/types.d.ts} +1 -2
- package/lib/shared.d.ts +1 -0
- package/lib/shared.js +5 -1
- package/lib/syntacticLanguageService.d.ts +7 -0
- package/lib/syntacticLanguageService.js +38 -0
- package/lib/utils/lspConverters.d.ts +27 -0
- package/lib/utils/lspConverters.js +782 -0
- package/lib/utils/previewer.d.ts +5 -11
- package/lib/utils/previewer.js +30 -35
- package/package.json +5 -6
- package/lib/features/callHierarchy.d.ts +0 -8
- package/lib/features/callHierarchy.js +0 -102
- package/lib/features/completions/basic.d.ts +0 -17
- package/lib/features/completions/basic.js +0 -326
- package/lib/features/completions/directiveComment.d.ts +0 -4
- package/lib/features/completions/directiveComment.js +0 -54
- package/lib/features/completions/jsDoc.d.ts +0 -4
- package/lib/features/completions/resolve.d.ts +0 -6
- package/lib/features/completions/resolve.js +0 -146
- package/lib/features/definition.d.ts +0 -4
- package/lib/features/definition.js +0 -20
- package/lib/features/diagnostics.d.ts +0 -11
- package/lib/features/diagnostics.js +0 -120
- package/lib/features/documentHighlight.d.ts +0 -4
- package/lib/features/documentHighlight.js +0 -32
- package/lib/features/documentSymbol.d.ts +0 -4
- package/lib/features/documentSymbol.js +0 -94
- package/lib/features/fileReferences.d.ts +0 -4
- package/lib/features/fileReferences.js +0 -19
- package/lib/features/fileRename.d.ts +0 -4
- package/lib/features/fileRename.js +0 -25
- package/lib/features/foldingRanges.d.ts +0 -4
- package/lib/features/foldingRanges.js +0 -55
- package/lib/features/formatting.d.ts +0 -8
- package/lib/features/formatting.js +0 -55
- package/lib/features/hover.d.ts +0 -4
- package/lib/features/hover.js +0 -43
- package/lib/features/implementation.d.ts +0 -4
- package/lib/features/implementation.js +0 -20
- package/lib/features/inlayHints.d.ts +0 -4
- package/lib/features/inlayHints.js +0 -34
- package/lib/features/prepareRename.d.ts +0 -9
- package/lib/features/prepareRename.js +0 -27
- package/lib/features/references.d.ts +0 -4
- package/lib/features/references.js +0 -35
- package/lib/features/rename.d.ts +0 -6
- package/lib/features/rename.js +0 -116
- package/lib/features/selectionRanges.d.ts +0 -4
- package/lib/features/selectionRanges.js +0 -32
- package/lib/features/semanticTokens.d.ts +0 -4
- package/lib/features/signatureHelp.d.ts +0 -4
- package/lib/features/signatureHelp.js +0 -63
- package/lib/features/typeDefinition.d.ts +0 -4
- package/lib/features/typeDefinition.js +0 -20
- package/lib/features/workspaceSymbol.d.ts +0 -4
- package/lib/features/workspaceSymbol.js +0 -63
- package/lib/utils/transforms.d.ts +0 -15
- package/lib/utils/transforms.js +0 -85
- /package/lib/{types.js → semanticFeatures/types.js} +0 -0
package/lib/utils/transforms.js
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.boundSpanToLocationLinks = exports.entriesToLocationLinks = exports.entryToLocation = exports.entriesToLocations = void 0;
|
|
4
|
-
function entriesToLocations(entries, ctx) {
|
|
5
|
-
return entries
|
|
6
|
-
.map(entry => entryToLocation(entry, ctx))
|
|
7
|
-
.filter((location) => !!location);
|
|
8
|
-
}
|
|
9
|
-
exports.entriesToLocations = entriesToLocations;
|
|
10
|
-
function entryToLocation(entry, ctx) {
|
|
11
|
-
const entryUri = ctx.fileNameToUri(entry.fileName);
|
|
12
|
-
const doc = ctx.getTextDocument(entryUri);
|
|
13
|
-
if (!doc)
|
|
14
|
-
return;
|
|
15
|
-
const range = {
|
|
16
|
-
start: doc.positionAt(entry.textSpan.start),
|
|
17
|
-
end: doc.positionAt(entry.textSpan.start + entry.textSpan.length),
|
|
18
|
-
};
|
|
19
|
-
const location = { uri: entryUri, range };
|
|
20
|
-
return location;
|
|
21
|
-
}
|
|
22
|
-
exports.entryToLocation = entryToLocation;
|
|
23
|
-
function entriesToLocationLinks(entries, ctx) {
|
|
24
|
-
const locations = [];
|
|
25
|
-
for (const entry of entries) {
|
|
26
|
-
const entryUri = ctx.fileNameToUri(entry.fileName);
|
|
27
|
-
const doc = ctx.getTextDocument(entryUri);
|
|
28
|
-
if (!doc)
|
|
29
|
-
continue;
|
|
30
|
-
const targetSelectionRange = {
|
|
31
|
-
start: doc.positionAt(entry.textSpan.start),
|
|
32
|
-
end: doc.positionAt(entry.textSpan.start + entry.textSpan.length),
|
|
33
|
-
};
|
|
34
|
-
const targetRange = entry.contextSpan ? {
|
|
35
|
-
start: doc.positionAt(entry.contextSpan.start),
|
|
36
|
-
end: doc.positionAt(entry.contextSpan.start + entry.contextSpan.length),
|
|
37
|
-
} : targetSelectionRange;
|
|
38
|
-
const originSelectionRange = entry.originalTextSpan ? {
|
|
39
|
-
start: doc.positionAt(entry.originalTextSpan.start),
|
|
40
|
-
end: doc.positionAt(entry.originalTextSpan.start + entry.originalTextSpan.length),
|
|
41
|
-
} : undefined;
|
|
42
|
-
const location = {
|
|
43
|
-
targetUri: entryUri,
|
|
44
|
-
targetRange,
|
|
45
|
-
targetSelectionRange,
|
|
46
|
-
originSelectionRange,
|
|
47
|
-
};
|
|
48
|
-
locations.push(location);
|
|
49
|
-
}
|
|
50
|
-
return locations;
|
|
51
|
-
}
|
|
52
|
-
exports.entriesToLocationLinks = entriesToLocationLinks;
|
|
53
|
-
function boundSpanToLocationLinks(info, originalDoc, ctx) {
|
|
54
|
-
const locations = [];
|
|
55
|
-
if (!info.definitions)
|
|
56
|
-
return locations;
|
|
57
|
-
const originSelectionRange = {
|
|
58
|
-
start: originalDoc.positionAt(info.textSpan.start),
|
|
59
|
-
end: originalDoc.positionAt(info.textSpan.start + info.textSpan.length),
|
|
60
|
-
};
|
|
61
|
-
for (const entry of info.definitions) {
|
|
62
|
-
const entryUri = ctx.fileNameToUri(entry.fileName);
|
|
63
|
-
const doc = ctx.getTextDocument(entryUri);
|
|
64
|
-
if (!doc)
|
|
65
|
-
continue;
|
|
66
|
-
const targetSelectionRange = {
|
|
67
|
-
start: doc.positionAt(entry.textSpan.start),
|
|
68
|
-
end: doc.positionAt(entry.textSpan.start + entry.textSpan.length),
|
|
69
|
-
};
|
|
70
|
-
const targetRange = entry.contextSpan ? {
|
|
71
|
-
start: doc.positionAt(entry.contextSpan.start),
|
|
72
|
-
end: doc.positionAt(entry.contextSpan.start + entry.contextSpan.length),
|
|
73
|
-
} : targetSelectionRange;
|
|
74
|
-
const location = {
|
|
75
|
-
targetUri: entryUri,
|
|
76
|
-
targetRange,
|
|
77
|
-
targetSelectionRange,
|
|
78
|
-
originSelectionRange,
|
|
79
|
-
};
|
|
80
|
-
locations.push(location);
|
|
81
|
-
}
|
|
82
|
-
return locations;
|
|
83
|
-
}
|
|
84
|
-
exports.boundSpanToLocationLinks = boundSpanToLocationLinks;
|
|
85
|
-
//# sourceMappingURL=transforms.js.map
|
|
File without changes
|