typescript-language-server 0.11.1 → 1.1.0
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/CHANGELOG.md +52 -0
- package/README.md +160 -27
- package/lib/calls.d.ts +3 -3
- package/lib/calls.d.ts.map +1 -1
- package/lib/calls.js +143 -195
- package/lib/calls.js.map +1 -1
- package/lib/cli.js +9 -33
- package/lib/cli.js.map +1 -1
- package/lib/commands.d.ts +1 -0
- package/lib/commands.d.ts.map +1 -1
- package/lib/commands.js +4 -5
- package/lib/commands.js.map +1 -1
- package/lib/completion.d.ts +8 -11
- package/lib/completion.d.ts.map +1 -1
- package/lib/completion.js +121 -163
- package/lib/completion.js.map +1 -1
- package/lib/configuration-manager.d.ts +47 -0
- package/lib/configuration-manager.d.ts.map +1 -0
- package/lib/configuration-manager.js +105 -0
- package/lib/configuration-manager.js.map +1 -0
- package/lib/diagnostic-queue.d.ts +10 -9
- package/lib/diagnostic-queue.d.ts.map +1 -1
- package/lib/diagnostic-queue.js +13 -21
- package/lib/diagnostic-queue.js.map +1 -1
- package/lib/document-symbol.d.ts +2 -2
- package/lib/document-symbol.d.ts.map +1 -1
- package/lib/document-symbol.js +20 -25
- package/lib/document-symbol.js.map +1 -1
- package/lib/document.d.ts +1 -1
- package/lib/document.d.ts.map +1 -1
- package/lib/document.js +6 -34
- package/lib/document.js.map +1 -1
- package/lib/features/fix-all.d.ts +4 -4
- package/lib/features/fix-all.d.ts.map +1 -1
- package/lib/features/fix-all.js +104 -147
- package/lib/features/fix-all.js.map +1 -1
- package/lib/features/inlay-hints.d.ts +11 -0
- package/lib/features/inlay-hints.d.ts.map +1 -0
- package/lib/features/inlay-hints.js +70 -0
- package/lib/features/inlay-hints.js.map +1 -0
- package/lib/features/source-definition.d.ts +11 -0
- package/lib/features/source-definition.d.ts.map +1 -0
- package/lib/features/source-definition.js +50 -0
- package/lib/features/source-definition.js.map +1 -0
- package/lib/file-lsp-server.spec.js +26 -36
- package/lib/file-lsp-server.spec.js.map +1 -1
- package/lib/hover.d.ts +4 -3
- package/lib/hover.d.ts.map +1 -1
- package/lib/hover.js +53 -17
- package/lib/hover.js.map +1 -1
- package/lib/logger.d.ts +12 -4
- package/lib/logger.d.ts.map +1 -1
- package/lib/logger.js +37 -44
- package/lib/logger.js.map +1 -1
- package/lib/lsp-client.d.ts +13 -17
- package/lib/lsp-client.d.ts.map +1 -1
- package/lib/lsp-client.js +32 -91
- package/lib/lsp-client.js.map +1 -1
- package/lib/lsp-connection.d.ts +1 -1
- package/lib/lsp-connection.d.ts.map +1 -1
- package/lib/lsp-connection.js +13 -39
- package/lib/lsp-connection.js.map +1 -1
- package/lib/lsp-protocol.calls.proposed.d.ts +1 -1
- package/lib/lsp-protocol.calls.proposed.d.ts.map +1 -1
- package/lib/lsp-protocol.calls.proposed.js +7 -32
- package/lib/lsp-protocol.calls.proposed.js.map +1 -1
- package/lib/lsp-protocol.inlayHints.proposed.d.ts +2 -11
- package/lib/lsp-protocol.inlayHints.proposed.d.ts.map +1 -1
- package/lib/lsp-protocol.inlayHints.proposed.js +2 -28
- package/lib/lsp-protocol.inlayHints.proposed.js.map +1 -1
- package/lib/lsp-server.d.ts +27 -28
- package/lib/lsp-server.d.ts.map +1 -1
- package/lib/lsp-server.js +868 -926
- package/lib/lsp-server.js.map +1 -1
- package/lib/lsp-server.spec.js +956 -606
- package/lib/lsp-server.spec.js.map +1 -1
- package/lib/organize-imports.d.ts +3 -3
- package/lib/organize-imports.d.ts.map +1 -1
- package/lib/organize-imports.js +5 -32
- package/lib/organize-imports.js.map +1 -1
- package/lib/organize-imports.spec.js +17 -42
- package/lib/organize-imports.spec.js.map +1 -1
- package/lib/protocol-translation.d.ts +5 -10
- package/lib/protocol-translation.d.ts.map +1 -1
- package/lib/protocol-translation.js +39 -168
- package/lib/protocol-translation.js.map +1 -1
- package/lib/quickfix.d.ts +3 -3
- package/lib/quickfix.d.ts.map +1 -1
- package/lib/quickfix.js +7 -35
- package/lib/quickfix.js.map +1 -1
- package/lib/refactor.d.ts +2 -2
- package/lib/refactor.d.ts.map +1 -1
- package/lib/refactor.js +11 -36
- package/lib/refactor.js.map +1 -1
- package/lib/semantic-tokens.d.ts +1 -1
- package/lib/semantic-tokens.d.ts.map +1 -1
- package/lib/semantic-tokens.js +1 -5
- package/lib/semantic-tokens.js.map +1 -1
- package/lib/test-utils.d.ts +11 -5
- package/lib/test-utils.d.ts.map +1 -1
- package/lib/test-utils.js +137 -120
- package/lib/test-utils.js.map +1 -1
- package/lib/ts-protocol.d.ts +8 -20
- package/lib/ts-protocol.d.ts.map +1 -1
- package/lib/ts-protocol.js +4 -31
- package/lib/ts-protocol.js.map +1 -1
- package/lib/tsp-client.d.ts +46 -43
- package/lib/tsp-client.d.ts.map +1 -1
- package/lib/tsp-client.js +31 -52
- package/lib/tsp-client.js.map +1 -1
- package/lib/tsp-client.spec.js +48 -75
- package/lib/tsp-client.spec.js.map +1 -1
- package/lib/tsp-command-types.d.ts +1 -0
- package/lib/tsp-command-types.d.ts.map +1 -1
- package/lib/tsp-command-types.js +4 -8
- package/lib/tsp-command-types.js.map +1 -1
- package/lib/utils/SnippetString.js +1 -4
- package/lib/utils/SnippetString.js.map +1 -1
- package/lib/utils/api.d.ts +1 -0
- package/lib/utils/api.d.ts.map +1 -1
- package/lib/utils/api.js +3 -28
- package/lib/utils/api.js.map +1 -1
- package/lib/utils/configuration.d.ts +2 -2
- package/lib/utils/configuration.d.ts.map +1 -1
- package/lib/utils/configuration.js +1 -2
- package/lib/utils/errorCodes.js +11 -14
- package/lib/utils/errorCodes.js.map +1 -1
- package/lib/utils/fixNames.js +13 -16
- package/lib/utils/fixNames.js.map +1 -1
- package/lib/utils/modules-resolver.js +7 -34
- package/lib/utils/modules-resolver.js.map +1 -1
- package/lib/utils/modules-resolver.spec.d.ts +1 -1
- package/lib/utils/modules-resolver.spec.d.ts.map +1 -1
- package/lib/utils/modules-resolver.spec.js +11 -34
- package/lib/utils/modules-resolver.spec.js.map +1 -1
- package/lib/utils/typeConverters.d.ts +20 -2
- package/lib/utils/typeConverters.d.ts.map +1 -1
- package/lib/utils/typeConverters.js +105 -9
- package/lib/utils/typeConverters.js.map +1 -1
- package/lib/utils/types.js +2 -29
- package/lib/utils/types.js.map +1 -1
- package/lib/utils/versionProvider.d.ts +3 -3
- package/lib/utils/versionProvider.d.ts.map +1 -1
- package/lib/utils/versionProvider.js +52 -60
- package/lib/utils/versionProvider.js.map +1 -1
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +3 -5
- package/lib/utils.js.map +1 -1
- package/package.json +38 -33
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,58 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
|
3
3
|
|
|
4
|
+
## [1.1.0](https://github.com/typescript-language-server/typescript-language-server/compare/v1.0.0...v1.1.0) (2022-08-21)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* add "Go To Source Definition" command ([#560](https://github.com/typescript-language-server/typescript-language-server/issues/560)) ([9bcdaf2](https://github.com/typescript-language-server/typescript-language-server/commit/9bcdaf2b0b09da9aa4d7e6ed79bdcd742b3cfc17))
|
|
10
|
+
* support `textDocument/inlayHint` request from 3.17.0 spec ([#566](https://github.com/typescript-language-server/typescript-language-server/issues/566)) ([9a2fd4e](https://github.com/typescript-language-server/typescript-language-server/commit/9a2fd4e34b6c50c57b974f617018dcefdb469788))
|
|
11
|
+
* support LocationLink[] for textDocument/definition response ([#563](https://github.com/typescript-language-server/typescript-language-server/issues/563)) ([196f328](https://github.com/typescript-language-server/typescript-language-server/commit/196f328cd9fd7a06998151d59bed0b945cc68b40))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* don't trigger error on empty Source Definition response ([#568](https://github.com/typescript-language-server/typescript-language-server/issues/568)) ([146a6ba](https://github.com/typescript-language-server/typescript-language-server/commit/146a6ba97f0792701ff8afcc431d3a1dfdb978a6))
|
|
17
|
+
* make wording in the typescript lookup error more generic ([585a05e](https://github.com/typescript-language-server/typescript-language-server/commit/585a05e43a0b530f10e488aed634fac0436109ae)), closes [#554](https://github.com/typescript-language-server/typescript-language-server/issues/554)
|
|
18
|
+
* snippet completions returned to clients that don't support them ([#556](https://github.com/typescript-language-server/typescript-language-server/issues/556)) ([050d335](https://github.com/typescript-language-server/typescript-language-server/commit/050d3350e16fe78b7c60d7443ed3ad6d2cc4730d))
|
|
19
|
+
* update signature help feature to v3.15.0 LSP spec ([#555](https://github.com/typescript-language-server/typescript-language-server/issues/555)) ([da074a6](https://github.com/typescript-language-server/typescript-language-server/commit/da074a618ca6c29819834a0344682094d6ff08f6))
|
|
20
|
+
|
|
21
|
+
## [1.0.0](https://github.com/typescript-language-server/typescript-language-server/compare/v0.11.2...v1.0.0) (2022-08-06)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### ⚠ BREAKING CHANGES
|
|
25
|
+
|
|
26
|
+
* Ship as an ES module. Might be breaking for programmatic users of this server. Read more about consuming ES module packages at gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
|
|
27
|
+
* **deps:** LSP libraries updated to match the 3.17 version of the LSP spec. Requires minimum Node 14.
|
|
28
|
+
|
|
29
|
+
### Features
|
|
30
|
+
|
|
31
|
+
* add support for CompletionItem.labelDetails ([#534](https://github.com/typescript-language-server/typescript-language-server/issues/534)) ([3c140d9](https://github.com/typescript-language-server/typescript-language-server/commit/3c140d958507300d7d186adb84f5b0baa549edb2))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Bug Fixes
|
|
35
|
+
|
|
36
|
+
* declare quickfix/refactor CodeAction capabilities ([#553](https://github.com/typescript-language-server/typescript-language-server/issues/553)) ([e76fc64](https://github.com/typescript-language-server/typescript-language-server/commit/e76fc6493295649d6ada83c8a5f6d88abe2a6167))
|
|
37
|
+
* handle shutdown lifecycle properly ([#536](https://github.com/typescript-language-server/typescript-language-server/issues/536)) ([ac8536b](https://github.com/typescript-language-server/typescript-language-server/commit/ac8536bf8eb805bfc28e484a8f4827b5375d6824))
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### Miscellaneous Chores
|
|
41
|
+
|
|
42
|
+
* **deps:** update LSP libraries to match 3.17 spec ([#532](https://github.com/typescript-language-server/typescript-language-server/issues/532)) ([bdbdd83](https://github.com/typescript-language-server/typescript-language-server/commit/bdbdd8379815583aa28d2a770034253050ba24de))
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
### Code Refactoring
|
|
46
|
+
|
|
47
|
+
* ship as an ES module ([#547](https://github.com/typescript-language-server/typescript-language-server/issues/547)) ([0dfd411](https://github.com/typescript-language-server/typescript-language-server/commit/0dfd41125c04868b547a3893334bb0bb822e0517))
|
|
48
|
+
|
|
49
|
+
## [0.11.2](https://github.com/typescript-language-server/typescript-language-server/compare/v0.11.1...v0.11.2) (2022-06-24)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
### Bug Fixes
|
|
53
|
+
|
|
54
|
+
* apply refactoring returns -1 positions in ranges ([#502](https://github.com/typescript-language-server/typescript-language-server/issues/502)) ([5f52db0](https://github.com/typescript-language-server/typescript-language-server/commit/5f52db0383d6c326cd321c13fc969ab9d3958011))
|
|
55
|
+
|
|
4
56
|
## [0.11.1](https://github.com/typescript-language-server/typescript-language-server/compare/v0.11.0...v0.11.1) (2022-06-13)
|
|
5
57
|
|
|
6
58
|
|
package/README.md
CHANGED
|
@@ -11,6 +11,33 @@ Based on concepts and ideas from https://github.com/prabirshrestha/typescript-la
|
|
|
11
11
|
|
|
12
12
|
Maintained by a [community of contributors](https://github.com/typescript-language-server/typescript-language-server/graphs/contributors) like you
|
|
13
13
|
|
|
14
|
+
<!-- MarkdownTOC -->
|
|
15
|
+
|
|
16
|
+
- [Installing](#installing)
|
|
17
|
+
- [Running the language server](#running-the-language-server)
|
|
18
|
+
- [CLI Options](#cli-options)
|
|
19
|
+
- [initializationOptions](#initializationoptions)
|
|
20
|
+
- [workspace/didChangeConfiguration](#workspacedidchangeconfiguration)
|
|
21
|
+
- [Code actions on save](#code-actions-on-save)
|
|
22
|
+
- [Workspace commands \(`workspace/executeCommand`\)](#workspace-commands-workspaceexecutecommand)
|
|
23
|
+
- [Go to Source Definition](#go-to-source-definition)
|
|
24
|
+
- [Apply Workspace Edits](#apply-workspace-edits)
|
|
25
|
+
- [Apply Code Action](#apply-code-action)
|
|
26
|
+
- [Apply Refactoring](#apply-refactoring)
|
|
27
|
+
- [Organize Imports](#organize-imports)
|
|
28
|
+
- [Rename File](#rename-file)
|
|
29
|
+
- [Inlay hints \(`typescript/inlayHints`\) \(experimental\)](#inlay-hints-typescriptinlayhints-experimental)
|
|
30
|
+
- [Callers and callees \(`textDocument/calls`\) \(experimental\)](#callers-and-callees-textdocumentcalls-experimental)
|
|
31
|
+
- [Supported Protocol features](#supported-protocol-features)
|
|
32
|
+
- [Experimental](#experimental)
|
|
33
|
+
- [Development](#development)
|
|
34
|
+
- [Build](#build)
|
|
35
|
+
- [Test](#test)
|
|
36
|
+
- [Watch](#watch)
|
|
37
|
+
- [Publishing](#publishing)
|
|
38
|
+
|
|
39
|
+
<!-- /MarkdownTOC -->
|
|
40
|
+
|
|
14
41
|
## Installing
|
|
15
42
|
|
|
16
43
|
```sh
|
|
@@ -97,6 +124,24 @@ interface UserPreferences {
|
|
|
97
124
|
* @default true
|
|
98
125
|
*/
|
|
99
126
|
includeCompletionsWithClassMemberSnippets: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* If enabled, object literal methods will have a method declaration completion entry in addition
|
|
129
|
+
* to the regular completion entry containing just the method name.
|
|
130
|
+
* E.g., `const objectLiteral: T = { f| }` could be completed to `const objectLiteral: T = { foo(): void {} }`,
|
|
131
|
+
* in addition to `const objectLiteral: T = { foo }`.
|
|
132
|
+
* @since 4.7.2
|
|
133
|
+
* @default true
|
|
134
|
+
*/
|
|
135
|
+
includeCompletionsWithObjectLiteralMethodSnippets: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* Indicates whether {@link CompletionEntry.labelDetails completion entry label details} are supported.
|
|
138
|
+
* If not, contents of `labelDetails` may be included in the {@link CompletionEntry.name} property.
|
|
139
|
+
* Only supported if the client supports `textDocument.completion.completionItem.labelDetailsSupport` capability
|
|
140
|
+
* and a compatible TypeScript version is used.
|
|
141
|
+
* @since 4.7.2
|
|
142
|
+
* @default true
|
|
143
|
+
*/
|
|
144
|
+
useLabelDetailsInCompletionEntries: boolean;
|
|
100
145
|
/**
|
|
101
146
|
* Allows import module names to be resolved in the initial completions request.
|
|
102
147
|
* @default false
|
|
@@ -122,6 +167,14 @@ interface UserPreferences {
|
|
|
122
167
|
jsxAttributeCompletionStyle: "auto" | "braces" | "none";
|
|
123
168
|
displayPartsForJSDoc: boolean;
|
|
124
169
|
generateReturnInDocTemplate: boolean;
|
|
170
|
+
|
|
171
|
+
includeInlayParameterNameHints: "none" | "literals" | "all";
|
|
172
|
+
includeInlayParameterNameHintsWhenArgumentMatchesName: boolean;
|
|
173
|
+
includeInlayFunctionParameterTypeHints: boolean,
|
|
174
|
+
includeInlayVariableTypeHints: boolean;
|
|
175
|
+
includeInlayPropertyDeclarationTypeHints: boolean;
|
|
176
|
+
includeInlayFunctionLikeReturnTypeHints: boolean;
|
|
177
|
+
includeInlayEnumMemberValueHints: boolean;
|
|
125
178
|
}
|
|
126
179
|
```
|
|
127
180
|
|
|
@@ -138,6 +191,7 @@ From the `preferences` options listed above, this server explicilty sets the fol
|
|
|
138
191
|
includeCompletionsForImportStatements: true,
|
|
139
192
|
includeCompletionsForModuleExports: true,
|
|
140
193
|
includeCompletionsWithClassMemberSnippets: true,
|
|
194
|
+
includeCompletionsWithObjectLiteralMethodSnippets: true,
|
|
141
195
|
includeCompletionsWithInsertText: true,
|
|
142
196
|
includeCompletionsWithSnippetText: true,
|
|
143
197
|
jsxAttributeCompletionStyle: "auto",
|
|
@@ -220,38 +274,114 @@ The user can enable it with a setting similar to (can vary per-editor):
|
|
|
220
274
|
|
|
221
275
|
## Workspace commands (`workspace/executeCommand`)
|
|
222
276
|
|
|
223
|
-
See [LSP specification](https://microsoft.github.io/language-server-protocol/specifications/
|
|
277
|
+
See [LSP specification](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_executeCommand).
|
|
224
278
|
|
|
225
279
|
Most of the time, you'll execute commands with arguments retrieved from another request like `textDocument/codeAction`. There are some use cases for calling them manually.
|
|
226
280
|
|
|
227
|
-
|
|
281
|
+
`lsp` refers to the language server protocol types, `tsp` refers to the typescript server protocol types.
|
|
282
|
+
|
|
283
|
+
### Go to Source Definition
|
|
284
|
+
|
|
285
|
+
- Request:
|
|
286
|
+
```ts
|
|
287
|
+
{
|
|
288
|
+
command: `_typescript.goToSourceDefinition`
|
|
289
|
+
arguments: [
|
|
290
|
+
lsp.DocumentUri, // String URI of the document
|
|
291
|
+
lsp.Position, // Line and character position (zero-based)
|
|
292
|
+
]
|
|
293
|
+
}
|
|
294
|
+
```
|
|
295
|
+
- Response:
|
|
296
|
+
```ts
|
|
297
|
+
lsp.Location[] | null
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
(This command is supported from Typescript 4.7.)
|
|
301
|
+
|
|
302
|
+
### Apply Workspace Edits
|
|
303
|
+
|
|
304
|
+
- Request:
|
|
305
|
+
```ts
|
|
306
|
+
{
|
|
307
|
+
command: `_typescript.applyWorkspaceEdit`
|
|
308
|
+
arguments: [lsp.WorkspaceEdit]
|
|
309
|
+
}
|
|
310
|
+
```
|
|
311
|
+
- Response:
|
|
312
|
+
```ts
|
|
313
|
+
lsp.ApplyWorkspaceEditResult
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
### Apply Code Action
|
|
317
|
+
|
|
318
|
+
- Request:
|
|
319
|
+
```ts
|
|
320
|
+
{
|
|
321
|
+
command: `_typescript.applyCodeAction`
|
|
322
|
+
arguments: [
|
|
323
|
+
tsp.CodeAction, // TypeScript Code Action object
|
|
324
|
+
]
|
|
325
|
+
}
|
|
326
|
+
```
|
|
327
|
+
- Response:
|
|
328
|
+
```ts
|
|
329
|
+
void
|
|
330
|
+
```
|
|
228
331
|
|
|
229
|
-
|
|
332
|
+
### Apply Refactoring
|
|
230
333
|
|
|
231
|
-
|
|
334
|
+
- Request:
|
|
232
335
|
```ts
|
|
233
|
-
|
|
336
|
+
{
|
|
337
|
+
command: `_typescript.applyRefactoring`
|
|
338
|
+
arguments: [
|
|
339
|
+
tsp.GetEditsForRefactorRequestArgs,
|
|
340
|
+
]
|
|
341
|
+
}
|
|
234
342
|
```
|
|
235
|
-
|
|
343
|
+
- Response:
|
|
344
|
+
```ts
|
|
345
|
+
void
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
### Organize Imports
|
|
349
|
+
|
|
350
|
+
- Request:
|
|
236
351
|
```ts
|
|
237
|
-
|
|
352
|
+
{
|
|
353
|
+
command: `_typescript.organizeImports`
|
|
354
|
+
arguments: [
|
|
355
|
+
// The "skipDestructiveCodeActions" argument is supported from Typescript 4.4+
|
|
356
|
+
[string] | [string, { skipDestructiveCodeActions?: boolean }],
|
|
357
|
+
]
|
|
358
|
+
}
|
|
238
359
|
```
|
|
239
|
-
|
|
360
|
+
- Response:
|
|
240
361
|
```ts
|
|
241
|
-
|
|
362
|
+
void
|
|
242
363
|
```
|
|
243
|
-
|
|
364
|
+
|
|
365
|
+
### Rename File
|
|
366
|
+
|
|
367
|
+
- Request:
|
|
244
368
|
```ts
|
|
245
|
-
|
|
246
|
-
|
|
369
|
+
{
|
|
370
|
+
command: `_typescript.applyRenameFile`
|
|
371
|
+
arguments: [
|
|
372
|
+
{ sourceUri: string; targetUri: string; },
|
|
373
|
+
]
|
|
374
|
+
}
|
|
247
375
|
```
|
|
248
|
-
|
|
376
|
+
- Response:
|
|
249
377
|
```ts
|
|
250
|
-
|
|
378
|
+
void
|
|
251
379
|
```
|
|
252
380
|
|
|
253
381
|
## Inlay hints (`typescript/inlayHints`) (experimental)
|
|
254
382
|
|
|
383
|
+
> !!! This implementation is deprecated. Use the spec-compliant `textDocument/inlayHint` request instead. !!!
|
|
384
|
+
|
|
255
385
|
Supports experimental inline hints.
|
|
256
386
|
|
|
257
387
|
```ts
|
|
@@ -374,28 +504,32 @@ interface DefinitionSymbol {
|
|
|
374
504
|
|
|
375
505
|
## Supported Protocol features
|
|
376
506
|
|
|
507
|
+
- [x] textDocument/codeAction
|
|
508
|
+
- [x] textDocument/completion (incl. `completion/resolve`)
|
|
509
|
+
- [x] textDocument/definition
|
|
377
510
|
- [x] textDocument/didChange (incremental)
|
|
378
511
|
- [x] textDocument/didClose
|
|
379
512
|
- [x] textDocument/didOpen
|
|
380
513
|
- [x] textDocument/didSave
|
|
381
|
-
- [x] textDocument/codeAction
|
|
382
|
-
- [x] textDocument/completion (incl. completion/resolve)
|
|
383
|
-
- [x] textDocument/definition
|
|
384
514
|
- [x] textDocument/documentHighlight
|
|
385
515
|
- [x] textDocument/documentSymbol
|
|
386
516
|
- [x] textDocument/executeCommand
|
|
387
517
|
- [x] textDocument/formatting
|
|
388
|
-
- [x] textDocument/rangeFormatting
|
|
389
518
|
- [x] textDocument/hover
|
|
390
|
-
- [x] textDocument/
|
|
519
|
+
- [x] textDocument/inlayHint (no support for `inlayHint/resolve` or `workspace/inlayHint/refresh`)
|
|
520
|
+
- [x] textDocument/rangeFormatting
|
|
391
521
|
- [x] textDocument/references
|
|
522
|
+
- [x] textDocument/rename
|
|
392
523
|
- [x] textDocument/signatureHelp
|
|
393
|
-
- [x] textDocument/calls (experimental)
|
|
394
|
-
- [x] typescript/inlayHints (experimental, supported from Typescript v4.4.2)
|
|
395
524
|
- [x] workspace/symbol
|
|
396
525
|
- [x] workspace/didChangeConfiguration
|
|
397
526
|
- [x] workspace/executeCommand
|
|
398
527
|
|
|
528
|
+
### Experimental
|
|
529
|
+
|
|
530
|
+
- [x] textDocument/calls (experimental)
|
|
531
|
+
- [x] typescript/inlayHints (experimental, supported from Typescript v4.4.2) DEPRECATED (use `textDocument/inlayHint` instead)
|
|
532
|
+
|
|
399
533
|
## Development
|
|
400
534
|
|
|
401
535
|
### Build
|
|
@@ -406,9 +540,10 @@ yarn
|
|
|
406
540
|
|
|
407
541
|
### Test
|
|
408
542
|
|
|
409
|
-
|
|
410
|
-
yarn test
|
|
411
|
-
|
|
543
|
+
- `yarn test` - run all tests
|
|
544
|
+
- `yarn test:watch` - run all tests and enable watch mode for developing
|
|
545
|
+
|
|
546
|
+
By default only console logs of level `warn` and higher are printed to the console. You can override the `CONSOLE_LOG_LEVEL` level in `package.json` to either `log`, `info`, `warn` or `error` to log other levels.
|
|
412
547
|
|
|
413
548
|
### Watch
|
|
414
549
|
|
|
@@ -418,6 +553,4 @@ yarn watch
|
|
|
418
553
|
|
|
419
554
|
### Publishing
|
|
420
555
|
|
|
421
|
-
|
|
422
|
-
yarn publish
|
|
423
|
-
```
|
|
556
|
+
New version of the package is published automatically on pushing new tag to the upstream repo.
|
package/lib/calls.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as lsp from 'vscode-languageserver
|
|
2
|
-
import * as lspcalls from './lsp-protocol.calls.proposed';
|
|
3
|
-
import { TspClient } from './tsp-client';
|
|
1
|
+
import * as lsp from 'vscode-languageserver';
|
|
4
2
|
import { TextDocument } from 'vscode-languageserver-textdocument';
|
|
3
|
+
import * as lspcalls from './lsp-protocol.calls.proposed.js';
|
|
4
|
+
import { TspClient } from './tsp-client.js';
|
|
5
5
|
export declare function computeCallers(tspClient: TspClient, args: lsp.TextDocumentPositionParams): Promise<lspcalls.CallsResult>;
|
|
6
6
|
export declare type DocumentProvider = (file: string) => TextDocument | undefined;
|
|
7
7
|
export declare function computeCallees(tspClient: TspClient, args: lsp.TextDocumentPositionParams, documentProvider: DocumentProvider): Promise<lspcalls.CallsResult>;
|
package/lib/calls.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calls.d.ts","sourceRoot":"","sources":["../src/calls.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"calls.d.ts","sourceRoot":"","sources":["../src/calls.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,KAAK,QAAQ,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAK5C,wBAAsB,cAAc,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,CAAC,0BAA0B,GAAG,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAwB9H;AACD,oBAAY,gBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,YAAY,GAAG,SAAS,CAAC;AAC1E,wBAAsB,cAAc,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,CAAC,0BAA0B,EAAE,gBAAgB,EAAE,gBAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CA6BlK"}
|