@singapore-editor/lsp 0.1.1
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/README.md +26 -0
- package/dist/capabilities.d.ts +24 -0
- package/dist/capabilities.d.ts.map +1 -0
- package/dist/capabilities.js +191 -0
- package/dist/capabilities.js.map +1 -0
- package/dist/client.d.ts +92 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +391 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/performanceDiagnostics.d.ts +5 -0
- package/dist/performanceDiagnostics.d.ts.map +1 -0
- package/dist/performanceDiagnostics.js +64 -0
- package/dist/performanceDiagnostics.js.map +1 -0
- package/dist/positions.d.ts +17 -0
- package/dist/positions.d.ts.map +1 -0
- package/dist/positions.js +268 -0
- package/dist/positions.js.map +1 -0
- package/dist/protocol.d.ts +53 -0
- package/dist/protocol.d.ts.map +1 -0
- package/dist/protocol.js +95 -0
- package/dist/protocol.js.map +1 -0
- package/dist/semanticTokens.d.ts +77 -0
- package/dist/semanticTokens.d.ts.map +1 -0
- package/dist/semanticTokens.js +94 -0
- package/dist/semanticTokens.js.map +1 -0
- package/dist/transports.d.ts +54 -0
- package/dist/transports.d.ts.map +1 -0
- package/dist/transports.js +200 -0
- package/dist/transports.js.map +1 -0
- package/dist/types.d.ts +129 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +0 -0
- package/dist/workspace.d.ts +29 -0
- package/dist/workspace.d.ts.map +1 -0
- package/dist/workspace.js +248 -0
- package/dist/workspace.js.map +1 -0
- package/dist/workspaceFactory.d.ts +4 -0
- package/dist/workspaceFactory.d.ts.map +1 -0
- package/dist/workspaceFactory.js +13 -0
- package/dist/workspaceFactory.js.map +1 -0
- package/package.json +51 -0
package/README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# @singapore-editor/lsp
|
|
2
|
+
|
|
3
|
+
Runtime-neutral LSP client primitives for Singapore packages.
|
|
4
|
+
|
|
5
|
+
This package is the low-level transport and protocol layer. Use `@singapore-editor/lsp-plugin` when you want
|
|
6
|
+
an editor plugin that connects these primitives to `@singapore-editor/core`.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
npm install @singapore-editor/lsp
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
import { LspClient, createWebSocketLspTransport } from '@singapore-editor/lsp'
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Exports
|
|
21
|
+
|
|
22
|
+
- `LspClient` manages request, response, notification, and workspace synchronization state.
|
|
23
|
+
- `createWebSocketLspTransport` and `createWorkerLspTransport` create managed transports.
|
|
24
|
+
- Position helpers convert between editor offsets and LSP positions.
|
|
25
|
+
- Protocol error helpers expose LSP response and cancellation errors.
|
|
26
|
+
- `lsp` re-exports `vscode-languageserver-protocol` types.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type * as lsp from 'vscode-languageserver-protocol';
|
|
2
|
+
import type { LspDocumentSyncMode, LspDocumentSyncOptions } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* What every client of this package declares, before a host adds anything of its own.
|
|
5
|
+
*
|
|
6
|
+
* There is deliberately **no `textDocument.semanticTokens` block here**, and adding one would be a
|
|
7
|
+
* mistake rather than a convenience. The content of that block is the host's — a real server
|
|
8
|
+
* computes its advertised legend as the intersection of its own token types with the ones the
|
|
9
|
+
* client declared, which makes the declared block an input to the server rather than a local table
|
|
10
|
+
* — and declaring it at all commits every server the client speaks to to computing tokens. A host
|
|
11
|
+
* that paints no semantic colour would be paying for answers nobody draws. Hosts that do want them
|
|
12
|
+
* build a block with `semanticTokensClientCapability()` and pass it in as `capabilities`.
|
|
13
|
+
*/
|
|
14
|
+
export declare const defaultClientCapabilities: () => lsp.ClientCapabilities;
|
|
15
|
+
export declare const mergeClientCapabilities: (base: lsp.ClientCapabilities, override: lsp.ClientCapabilities | undefined) => lsp.ClientCapabilities;
|
|
16
|
+
/**
|
|
17
|
+
* Adds the response capability only when a host can apply the complete plan. The returned block is
|
|
18
|
+
* also the policy boundary: callers cannot smuggle in server-initiated or snippet application.
|
|
19
|
+
*/
|
|
20
|
+
export declare const composeWorkspaceEditClientCapabilities: (capabilities: lsp.ClientCapabilities | undefined, supported: boolean) => lsp.ClientCapabilities | undefined;
|
|
21
|
+
export declare const documentSyncModeFromCapabilities: (capabilities: lsp.ServerCapabilities | null) => LspDocumentSyncMode;
|
|
22
|
+
export declare const documentSyncOptionsFromCapabilities: (capabilities: lsp.ServerCapabilities | null) => LspDocumentSyncOptions;
|
|
23
|
+
export declare const clientSupportsDidSave: (capabilities: lsp.ClientCapabilities) => boolean;
|
|
24
|
+
//# sourceMappingURL=capabilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../src/capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,GAAG,MAAM,gCAAgC,CAAA;AAC1D,OAAO,KAAK,EAAuB,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AA4B/F;;;;;;;;;;GAUG;AACH,eAAO,MAAM,yBAAyB,QAAO,GAAG,CAAC,kBA+E/C,CAAA;AAEF,eAAO,MAAM,uBAAuB,GAClC,MAAM,GAAG,CAAC,kBAAkB,EAC5B,UAAU,GAAG,CAAC,kBAAkB,GAAG,SAAS,KAC3C,GAAG,CAAC,kBAA4E,CAAA;AAYnF;;;GAGG;AACH,eAAO,MAAM,sCAAsC,GACjD,cAAc,GAAG,CAAC,kBAAkB,GAAG,SAAS,EAChD,WAAW,OAAO,KACjB,GAAG,CAAC,kBAAkB,GAAG,SAuB3B,CAAA;AAED,eAAO,MAAM,gCAAgC,GAC3C,cAAc,GAAG,CAAC,kBAAkB,GAAG,IAAI,KAC1C,mBAEF,CAAA;AAED,eAAO,MAAM,mCAAmC,GAC9C,cAAc,GAAG,CAAC,kBAAkB,GAAG,IAAI,KAC1C,sBAUF,CAAA;AAED,eAAO,MAAM,qBAAqB,GAAI,cAAc,GAAG,CAAC,kBAAkB,KAAG,OACf,CAAA"}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
//#region src/capabilities.ts
|
|
2
|
+
var TEXT_DOCUMENT_SYNC_NONE = 0;
|
|
3
|
+
var TEXT_DOCUMENT_SYNC_FULL = 1;
|
|
4
|
+
var TEXT_DOCUMENT_SYNC_INCREMENTAL = 2;
|
|
5
|
+
var DIAGNOSTIC_TAG_UNNECESSARY = 1;
|
|
6
|
+
var DIAGNOSTIC_TAG_DEPRECATED = 2;
|
|
7
|
+
var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
8
|
+
/**
|
|
9
|
+
* The roots of the code-action kind hierarchy, which is what the value set names — a server is free
|
|
10
|
+
* to answer with any kind beneath one of these, and the client matches by dotted prefix.
|
|
11
|
+
*/
|
|
12
|
+
var CODE_ACTION_KINDS = [
|
|
13
|
+
"",
|
|
14
|
+
"quickfix",
|
|
15
|
+
"refactor",
|
|
16
|
+
"refactor.extract",
|
|
17
|
+
"refactor.inline",
|
|
18
|
+
"refactor.rewrite",
|
|
19
|
+
"source",
|
|
20
|
+
"source.organizeImports",
|
|
21
|
+
"source.fixAll"
|
|
22
|
+
];
|
|
23
|
+
/**
|
|
24
|
+
* What every client of this package declares, before a host adds anything of its own.
|
|
25
|
+
*
|
|
26
|
+
* There is deliberately **no `textDocument.semanticTokens` block here**, and adding one would be a
|
|
27
|
+
* mistake rather than a convenience. The content of that block is the host's — a real server
|
|
28
|
+
* computes its advertised legend as the intersection of its own token types with the ones the
|
|
29
|
+
* client declared, which makes the declared block an input to the server rather than a local table
|
|
30
|
+
* — and declaring it at all commits every server the client speaks to to computing tokens. A host
|
|
31
|
+
* that paints no semantic colour would be paying for answers nobody draws. Hosts that do want them
|
|
32
|
+
* build a block with `semanticTokensClientCapability()` and pass it in as `capabilities`.
|
|
33
|
+
*/
|
|
34
|
+
var defaultClientCapabilities = () => ({
|
|
35
|
+
general: { positionEncodings: ["utf-16"] },
|
|
36
|
+
workspace: { diagnostics: { refreshSupport: true } },
|
|
37
|
+
textDocument: {
|
|
38
|
+
synchronization: {
|
|
39
|
+
didSave: false,
|
|
40
|
+
willSave: false,
|
|
41
|
+
willSaveWaitUntil: false
|
|
42
|
+
},
|
|
43
|
+
publishDiagnostics: {
|
|
44
|
+
tagSupport: { valueSet: [DIAGNOSTIC_TAG_UNNECESSARY, DIAGNOSTIC_TAG_DEPRECATED] },
|
|
45
|
+
versionSupport: true
|
|
46
|
+
},
|
|
47
|
+
diagnostic: {
|
|
48
|
+
dynamicRegistration: false,
|
|
49
|
+
relatedDocumentSupport: false,
|
|
50
|
+
tagSupport: { valueSet: [DIAGNOSTIC_TAG_UNNECESSARY, DIAGNOSTIC_TAG_DEPRECATED] }
|
|
51
|
+
},
|
|
52
|
+
hover: { contentFormat: ["markdown", "plaintext"] },
|
|
53
|
+
definition: { linkSupport: true },
|
|
54
|
+
completion: {
|
|
55
|
+
contextSupport: true,
|
|
56
|
+
completionItem: {
|
|
57
|
+
commitCharactersSupport: true,
|
|
58
|
+
documentationFormat: ["markdown", "plaintext"],
|
|
59
|
+
insertReplaceSupport: true,
|
|
60
|
+
labelDetailsSupport: true,
|
|
61
|
+
resolveSupport: { properties: [
|
|
62
|
+
"documentation",
|
|
63
|
+
"detail",
|
|
64
|
+
"additionalTextEdits"
|
|
65
|
+
] },
|
|
66
|
+
snippetSupport: true
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
codeAction: {
|
|
70
|
+
codeActionLiteralSupport: { codeActionKind: { valueSet: CODE_ACTION_KINDS } },
|
|
71
|
+
dataSupport: true,
|
|
72
|
+
isPreferredSupport: true,
|
|
73
|
+
resolveSupport: { properties: ["edit"] }
|
|
74
|
+
},
|
|
75
|
+
signatureHelp: {
|
|
76
|
+
contextSupport: true,
|
|
77
|
+
signatureInformation: {
|
|
78
|
+
documentationFormat: ["markdown", "plaintext"],
|
|
79
|
+
parameterInformation: { labelOffsetSupport: true }
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
window: { showMessage: {} }
|
|
84
|
+
});
|
|
85
|
+
var mergeClientCapabilities = (base, override) => mergeObjects(base, override);
|
|
86
|
+
var WORKSPACE_EDIT_CAPABILITY = {
|
|
87
|
+
documentChanges: true,
|
|
88
|
+
resourceOperations: [
|
|
89
|
+
"create",
|
|
90
|
+
"rename",
|
|
91
|
+
"delete"
|
|
92
|
+
],
|
|
93
|
+
failureHandling: "undo",
|
|
94
|
+
normalizesLineEndings: true,
|
|
95
|
+
changeAnnotationSupport: { groupsOnLabel: true }
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Adds the response capability only when a host can apply the complete plan. The returned block is
|
|
99
|
+
* also the policy boundary: callers cannot smuggle in server-initiated or snippet application.
|
|
100
|
+
*/
|
|
101
|
+
var composeWorkspaceEditClientCapabilities = (capabilities, supported) => {
|
|
102
|
+
const cloned = capabilities ? mergeObjects({}, capabilities) : void 0;
|
|
103
|
+
const { applyEdit: _applyEdit, workspaceEdit: _workspaceEdit, ...preservedWorkspace } = cloned?.workspace ?? {};
|
|
104
|
+
const { workspace: _workspace, ...preservedCapabilities } = cloned ?? {};
|
|
105
|
+
if (supported) return {
|
|
106
|
+
...preservedCapabilities,
|
|
107
|
+
workspace: {
|
|
108
|
+
...preservedWorkspace,
|
|
109
|
+
workspaceEdit: WORKSPACE_EDIT_CAPABILITY
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
if (Object.keys(preservedWorkspace).length > 0) return {
|
|
113
|
+
...preservedCapabilities,
|
|
114
|
+
workspace: preservedWorkspace
|
|
115
|
+
};
|
|
116
|
+
if (Object.keys(preservedCapabilities).length > 0) return preservedCapabilities;
|
|
117
|
+
};
|
|
118
|
+
var documentSyncModeFromCapabilities = (capabilities) => {
|
|
119
|
+
return documentSyncOptionsFromCapabilities(capabilities).change;
|
|
120
|
+
};
|
|
121
|
+
var documentSyncOptionsFromCapabilities = (capabilities) => {
|
|
122
|
+
const sync = capabilities?.textDocumentSync;
|
|
123
|
+
if (!sync) return noDocumentSync();
|
|
124
|
+
if (typeof sync === "number") return numericDocumentSync(sync);
|
|
125
|
+
return {
|
|
126
|
+
change: syncModeFromKind(sync.change ?? TEXT_DOCUMENT_SYNC_NONE),
|
|
127
|
+
openClose: sync.openClose === true,
|
|
128
|
+
save: saveSyncFromOptions(sync.save)
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
var clientSupportsDidSave = (capabilities) => capabilities.textDocument?.synchronization?.didSave === true;
|
|
132
|
+
var noDocumentSync = () => ({
|
|
133
|
+
change: "none",
|
|
134
|
+
openClose: false,
|
|
135
|
+
save: {
|
|
136
|
+
enabled: false,
|
|
137
|
+
includeText: false
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
var numericDocumentSync = (kind) => {
|
|
141
|
+
const change = syncModeFromKind(kind);
|
|
142
|
+
return {
|
|
143
|
+
change,
|
|
144
|
+
openClose: change !== "none",
|
|
145
|
+
save: {
|
|
146
|
+
enabled: false,
|
|
147
|
+
includeText: false
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
var saveSyncFromOptions = (save) => {
|
|
152
|
+
if (!save) return {
|
|
153
|
+
enabled: false,
|
|
154
|
+
includeText: false
|
|
155
|
+
};
|
|
156
|
+
if (save === true) return {
|
|
157
|
+
enabled: true,
|
|
158
|
+
includeText: false
|
|
159
|
+
};
|
|
160
|
+
return {
|
|
161
|
+
enabled: true,
|
|
162
|
+
includeText: save.includeText === true
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
var syncModeFromKind = (kind) => {
|
|
166
|
+
if (kind === TEXT_DOCUMENT_SYNC_INCREMENTAL) return "incremental";
|
|
167
|
+
if (kind === TEXT_DOCUMENT_SYNC_FULL) return "full";
|
|
168
|
+
return "none";
|
|
169
|
+
};
|
|
170
|
+
var mergeObjects = (base, override) => {
|
|
171
|
+
if (override === void 0) return cloneValue(base);
|
|
172
|
+
if (!isRecord(base) || !isRecord(override)) return cloneValue(override);
|
|
173
|
+
const result = {};
|
|
174
|
+
for (const key of Object.keys(base)) result[key] = mergeObjects(base[key], override[key]);
|
|
175
|
+
for (const key of Object.keys(override)) {
|
|
176
|
+
if (key in result) continue;
|
|
177
|
+
result[key] = cloneValue(override[key]);
|
|
178
|
+
}
|
|
179
|
+
return result;
|
|
180
|
+
};
|
|
181
|
+
var cloneValue = (value) => {
|
|
182
|
+
if (Array.isArray(value)) return value.map(cloneValue);
|
|
183
|
+
if (!isRecord(value)) return value;
|
|
184
|
+
const result = {};
|
|
185
|
+
for (const key of Object.keys(value)) result[key] = cloneValue(value[key]);
|
|
186
|
+
return result;
|
|
187
|
+
};
|
|
188
|
+
//#endregion
|
|
189
|
+
export { clientSupportsDidSave, composeWorkspaceEditClientCapabilities, defaultClientCapabilities, documentSyncModeFromCapabilities, documentSyncOptionsFromCapabilities, mergeClientCapabilities };
|
|
190
|
+
|
|
191
|
+
//# sourceMappingURL=capabilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capabilities.js","names":[],"sources":["../src/capabilities.ts"],"sourcesContent":["import type * as lsp from 'vscode-languageserver-protocol'\nimport type { LspDocumentSaveSync, LspDocumentSyncMode, LspDocumentSyncOptions } from './types'\n\nconst TEXT_DOCUMENT_SYNC_NONE = 0\nconst TEXT_DOCUMENT_SYNC_FULL = 1\nconst TEXT_DOCUMENT_SYNC_INCREMENTAL = 2\n\nconst DIAGNOSTIC_TAG_UNNECESSARY = 1\nconst DIAGNOSTIC_TAG_DEPRECATED = 2\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value)\n\n/**\n * The roots of the code-action kind hierarchy, which is what the value set names — a server is free\n * to answer with any kind beneath one of these, and the client matches by dotted prefix.\n */\nconst CODE_ACTION_KINDS: lsp.CodeActionKind[] = [\n '',\n 'quickfix',\n 'refactor',\n 'refactor.extract',\n 'refactor.inline',\n 'refactor.rewrite',\n 'source',\n 'source.organizeImports',\n 'source.fixAll',\n]\n\n/**\n * What every client of this package declares, before a host adds anything of its own.\n *\n * There is deliberately **no `textDocument.semanticTokens` block here**, and adding one would be a\n * mistake rather than a convenience. The content of that block is the host's — a real server\n * computes its advertised legend as the intersection of its own token types with the ones the\n * client declared, which makes the declared block an input to the server rather than a local table\n * — and declaring it at all commits every server the client speaks to to computing tokens. A host\n * that paints no semantic colour would be paying for answers nobody draws. Hosts that do want them\n * build a block with `semanticTokensClientCapability()` and pass it in as `capabilities`.\n */\nexport const defaultClientCapabilities = (): lsp.ClientCapabilities => ({\n general: {\n positionEncodings: ['utf-16'],\n },\n workspace: {\n diagnostics: { refreshSupport: true },\n },\n textDocument: {\n synchronization: {\n didSave: false,\n willSave: false,\n willSaveWaitUntil: false,\n },\n // Required, not decorative: typescript-language-server sets\n // `features.diagnosticsSupport = Boolean(publishDiagnostics)` and returns early from every\n // publish without it, so an undeclaring client gets a server that never diagnoses anything.\n publishDiagnostics: {\n tagSupport: { valueSet: [DIAGNOSTIC_TAG_UNNECESSARY, DIAGNOSTIC_TAG_DEPRECATED] },\n versionSupport: true,\n },\n // Pull diagnostics negotiate tags separately; TypeScript 7 sends none without this.\n diagnostic: {\n dynamicRegistration: false,\n relatedDocumentSupport: false,\n tagSupport: { valueSet: [DIAGNOSTIC_TAG_UNNECESSARY, DIAGNOSTIC_TAG_DEPRECATED] },\n },\n hover: {\n contentFormat: ['markdown', 'plaintext'],\n },\n definition: {\n linkSupport: true,\n },\n completion: {\n contextSupport: true,\n completionItem: {\n // The characters an item may be accepted on are withheld from a client that has not said it\n // will act on them, and a set nobody reads is a set no server sends.\n commitCharactersSupport: true,\n documentationFormat: ['markdown', 'plaintext'],\n // An item that can both insert at the caret and overtype the word around it only carries\n // both ranges for a client that says it can choose between them; undeclared, the server\n // picks one for us and picks it before the user has decided how to accept.\n insertReplaceSupport: true,\n labelDetailsSupport: true,\n // Servers defer the expensive parts of an item until resolve; without this they either\n // send nothing there or refuse the request. additionalTextEdits is the load-bearing one —\n // it carries the auto-import.\n resolveSupport: {\n properties: ['documentation', 'detail', 'additionalTextEdits'],\n },\n snippetSupport: true,\n },\n },\n // Without the literal form a server may only answer with bare commands, which carry no kind and\n // no preference — nothing to filter or rank an action by. dataSupport is what lets a server hand\n // back a handle instead of an edit and compute the expensive part only when the fix is chosen.\n codeAction: {\n codeActionLiteralSupport: {\n codeActionKind: { valueSet: CODE_ACTION_KINDS },\n },\n dataSupport: true,\n isPreferredSupport: true,\n resolveSupport: { properties: ['edit'] },\n },\n // Servers only answer what the client advertises, so this has to be declared for\n // textDocument/signatureHelp to come back at all.\n signatureHelp: {\n contextSupport: true,\n signatureInformation: {\n documentationFormat: ['markdown', 'plaintext'],\n parameterInformation: {\n labelOffsetSupport: true,\n },\n },\n },\n },\n window: {\n showMessage: {},\n },\n})\n\nexport const mergeClientCapabilities = (\n base: lsp.ClientCapabilities,\n override: lsp.ClientCapabilities | undefined,\n): lsp.ClientCapabilities => mergeObjects(base, override) as lsp.ClientCapabilities\n\nconst WORKSPACE_EDIT_CAPABILITY: NonNullable<\n NonNullable<lsp.ClientCapabilities['workspace']>['workspaceEdit']\n> = {\n documentChanges: true,\n resourceOperations: ['create', 'rename', 'delete'],\n failureHandling: 'undo',\n normalizesLineEndings: true,\n changeAnnotationSupport: { groupsOnLabel: true },\n}\n\n/**\n * Adds the response capability only when a host can apply the complete plan. The returned block is\n * also the policy boundary: callers cannot smuggle in server-initiated or snippet application.\n */\nexport const composeWorkspaceEditClientCapabilities = (\n capabilities: lsp.ClientCapabilities | undefined,\n supported: boolean,\n): lsp.ClientCapabilities | undefined => {\n const cloned = capabilities\n ? (mergeObjects({}, capabilities) as lsp.ClientCapabilities)\n : undefined\n const workspace = cloned?.workspace\n const {\n applyEdit: _applyEdit,\n workspaceEdit: _workspaceEdit,\n ...preservedWorkspace\n } = workspace ?? {}\n const { workspace: _workspace, ...preservedCapabilities } = cloned ?? {}\n\n if (supported) {\n return {\n ...preservedCapabilities,\n workspace: { ...preservedWorkspace, workspaceEdit: WORKSPACE_EDIT_CAPABILITY },\n }\n }\n if (Object.keys(preservedWorkspace).length > 0) {\n return { ...preservedCapabilities, workspace: preservedWorkspace }\n }\n if (Object.keys(preservedCapabilities).length > 0) return preservedCapabilities\n return undefined\n}\n\nexport const documentSyncModeFromCapabilities = (\n capabilities: lsp.ServerCapabilities | null,\n): LspDocumentSyncMode => {\n return documentSyncOptionsFromCapabilities(capabilities).change\n}\n\nexport const documentSyncOptionsFromCapabilities = (\n capabilities: lsp.ServerCapabilities | null,\n): LspDocumentSyncOptions => {\n const sync = capabilities?.textDocumentSync\n if (!sync) return noDocumentSync()\n if (typeof sync === 'number') return numericDocumentSync(sync)\n\n return {\n change: syncModeFromKind(sync.change ?? TEXT_DOCUMENT_SYNC_NONE),\n openClose: sync.openClose === true,\n save: saveSyncFromOptions(sync.save),\n }\n}\n\nexport const clientSupportsDidSave = (capabilities: lsp.ClientCapabilities): boolean =>\n capabilities.textDocument?.synchronization?.didSave === true\n\nconst noDocumentSync = (): LspDocumentSyncOptions => ({\n change: 'none',\n openClose: false,\n save: { enabled: false, includeText: false },\n})\n\nconst numericDocumentSync = (kind: number): LspDocumentSyncOptions => {\n const change = syncModeFromKind(kind)\n return {\n change,\n openClose: change !== 'none',\n save: { enabled: false, includeText: false },\n }\n}\n\nconst saveSyncFromOptions = (save: boolean | lsp.SaveOptions | undefined): LspDocumentSaveSync => {\n if (!save) return { enabled: false, includeText: false }\n if (save === true) return { enabled: true, includeText: false }\n return { enabled: true, includeText: save.includeText === true }\n}\n\nconst syncModeFromKind = (kind: number): LspDocumentSyncMode => {\n if (kind === TEXT_DOCUMENT_SYNC_INCREMENTAL) return 'incremental'\n if (kind === TEXT_DOCUMENT_SYNC_FULL) return 'full'\n return 'none'\n}\n\nconst mergeObjects = (base: unknown, override: unknown): unknown => {\n if (override === undefined) return cloneValue(base)\n if (!isRecord(base) || !isRecord(override)) return cloneValue(override)\n\n const result: Record<string, unknown> = {}\n for (const key of Object.keys(base)) {\n result[key] = mergeObjects(base[key], override[key])\n }\n for (const key of Object.keys(override)) {\n if (key in result) continue\n result[key] = cloneValue(override[key])\n }\n\n return result\n}\n\nconst cloneValue = (value: unknown): unknown => {\n if (Array.isArray(value)) return value.map(cloneValue)\n if (!isRecord(value)) return value\n\n const result: Record<string, unknown> = {}\n for (const key of Object.keys(value)) result[key] = cloneValue(value[key])\n return result\n}\n"],"mappings":";AAGA,IAAM,0BAA0B;AAChC,IAAM,0BAA0B;AAChC,IAAM,iCAAiC;AAEvC,IAAM,6BAA6B;AACnC,IAAM,4BAA4B;AAElC,IAAM,YAAY,UAChB,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;;;;;AAMrE,IAAM,oBAA0C;CAC9C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;;;;;;;;;;;AAaA,IAAa,mCAA2D;CACtE,SAAS,EACP,mBAAmB,CAAC,QAAQ,EAC9B;CACA,WAAW,EACT,aAAa,EAAE,gBAAgB,KAAK,EACtC;CACA,cAAc;EACZ,iBAAiB;GACf,SAAS;GACT,UAAU;GACV,mBAAmB;EACrB;EAIA,oBAAoB;GAClB,YAAY,EAAE,UAAU,CAAC,4BAA4B,yBAAyB,EAAE;GAChF,gBAAgB;EAClB;EAEA,YAAY;GACV,qBAAqB;GACrB,wBAAwB;GACxB,YAAY,EAAE,UAAU,CAAC,4BAA4B,yBAAyB,EAAE;EAClF;EACA,OAAO,EACL,eAAe,CAAC,YAAY,WAAW,EACzC;EACA,YAAY,EACV,aAAa,KACf;EACA,YAAY;GACV,gBAAgB;GAChB,gBAAgB;IAGd,yBAAyB;IACzB,q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,OAAO;AACT;AAEA,IAAM,cAAc,UAA4B;CAC9C,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO,MAAM,IAAI,UAAU;CACrD,IAAI,CAAC,SAAS,KAAK,GAAG,OAAO;CAE7B,MAAM,SAAkC,CAAC;CACzC,KAAK,MAAM,OAAO,OAAO,KAAK,KAAK,GAAG,OAAO,OAAO,WAAW,MAAM,IAAI;CACzE,OAAO;AACT"}
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type * as lsp from 'vscode-languageserver-protocol';
|
|
2
|
+
import type { LspDocumentChange, LspDocument, LspNotificationHandler, LspRequestHandle, LspServerMessageHandler, LspServerRequestHandler, LspClientWorkspace, LspTransport, LspUnhandledNotificationHandler } from './types';
|
|
3
|
+
export type LspClientState = 'disconnected' | 'initializing' | 'ready' | 'failed';
|
|
4
|
+
export type LspClientConfig = {
|
|
5
|
+
readonly rootUri?: lsp.DocumentUri | null;
|
|
6
|
+
readonly workspaceFolders?: readonly lsp.WorkspaceFolder[] | null;
|
|
7
|
+
readonly clientInfo?: lsp.InitializeParams['clientInfo'];
|
|
8
|
+
readonly initializationOptions?: unknown;
|
|
9
|
+
readonly capabilities?: lsp.ClientCapabilities;
|
|
10
|
+
readonly timeoutMs?: number;
|
|
11
|
+
readonly processId?: number | null;
|
|
12
|
+
readonly locale?: string;
|
|
13
|
+
readonly workspace?: LspClientWorkspace;
|
|
14
|
+
readonly notificationHandlers?: Readonly<Record<string, LspNotificationHandler<LspClient>>>;
|
|
15
|
+
readonly unhandledNotification?: LspUnhandledNotificationHandler<LspClient>;
|
|
16
|
+
readonly serverMessageHandler?: LspServerMessageHandler<LspClient>;
|
|
17
|
+
readonly serverRequestHandlers?: Readonly<Record<string, LspServerRequestHandler<LspClient>>>;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Per-request overrides. Both matter to a caller the default was not written for: `timeoutMs`
|
|
21
|
+
* because a cold server on a large project will blow past the 3s default on its first answer, and
|
|
22
|
+
* `signal` because aborting sends `$/cancelRequest` on the wire — a server that honours it abandons
|
|
23
|
+
* real work, which is not the same thing as suppressing a response that was already computed.
|
|
24
|
+
*/
|
|
25
|
+
export type RequestOptions = {
|
|
26
|
+
readonly timeoutMs?: number;
|
|
27
|
+
readonly signal?: AbortSignal;
|
|
28
|
+
};
|
|
29
|
+
export declare class LspClient {
|
|
30
|
+
readonly workspace: LspClientWorkspace;
|
|
31
|
+
serverCapabilities: lsp.ServerCapabilities | null;
|
|
32
|
+
initializeResult: lsp.InitializeResult | null;
|
|
33
|
+
private readonly config;
|
|
34
|
+
private readonly timeoutMs;
|
|
35
|
+
private readonly clientCapabilities;
|
|
36
|
+
private transport;
|
|
37
|
+
private state;
|
|
38
|
+
private nextRequestId;
|
|
39
|
+
private initializePromise;
|
|
40
|
+
private syncMode;
|
|
41
|
+
private syncOpenClose;
|
|
42
|
+
private syncSave;
|
|
43
|
+
private readonly pendingRequests;
|
|
44
|
+
private readonly syncedDocuments;
|
|
45
|
+
constructor(config?: LspClientConfig);
|
|
46
|
+
get connected(): boolean;
|
|
47
|
+
get initialized(): boolean;
|
|
48
|
+
get initialization(): Promise<void> | null;
|
|
49
|
+
connect(transport: LspTransport): Promise<void>;
|
|
50
|
+
disconnect(): void;
|
|
51
|
+
shutdown(): Promise<void>;
|
|
52
|
+
request<TResult = unknown, TParams = unknown>(method: string, params?: TParams, options?: RequestOptions): Promise<TResult>;
|
|
53
|
+
requestHandle<TResult = unknown, TParams = unknown>(method: string, params?: TParams, options?: RequestOptions): LspRequestHandle<TResult>;
|
|
54
|
+
notify<TParams = unknown>(method: string, params?: TParams): Promise<void>;
|
|
55
|
+
notification<TParams = unknown>(method: string, params?: TParams): Promise<void>;
|
|
56
|
+
hasCapability(name: keyof lsp.ServerCapabilities): boolean | null;
|
|
57
|
+
didOpenDocument(document: LspDocument): void;
|
|
58
|
+
didChangeDocument(document: LspDocument, change: LspDocumentChange): void;
|
|
59
|
+
didSaveDocument(document: LspDocument): void;
|
|
60
|
+
didCloseDocument(document: LspDocument): void;
|
|
61
|
+
private initialize;
|
|
62
|
+
private initializeParams;
|
|
63
|
+
private applyInitializeResult;
|
|
64
|
+
private shouldTrackDocumentSync;
|
|
65
|
+
private contentChangesForDocumentChange;
|
|
66
|
+
private createContentChanges;
|
|
67
|
+
private requestInner;
|
|
68
|
+
private sendHandledRequest;
|
|
69
|
+
private sendReadyHandledRequest;
|
|
70
|
+
private requestInnerWithId;
|
|
71
|
+
private allocateRequestId;
|
|
72
|
+
private createPendingRequest;
|
|
73
|
+
private sendMessage;
|
|
74
|
+
private sendNotification;
|
|
75
|
+
private notifyReady;
|
|
76
|
+
private trySendNotification;
|
|
77
|
+
private receiveMessage;
|
|
78
|
+
private handleResponse;
|
|
79
|
+
private handleNotification;
|
|
80
|
+
private handleDefaultNotification;
|
|
81
|
+
private handleServerMessage;
|
|
82
|
+
private handleRequest;
|
|
83
|
+
private sendServerResponse;
|
|
84
|
+
private timeoutRequest;
|
|
85
|
+
private abortRequest;
|
|
86
|
+
private deletePendingRequest;
|
|
87
|
+
private rejectPendingRequests;
|
|
88
|
+
private handleTransportSendError;
|
|
89
|
+
private awaitInitialization;
|
|
90
|
+
private requireTransport;
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,GAAG,MAAM,gCAAgC,CAAA;AAsB1D,OAAO,KAAK,EACV,iBAAiB,EAEjB,WAAW,EAEX,sBAAsB,EACtB,gBAAgB,EAChB,uBAAuB,EACvB,uBAAuB,EACvB,kBAAkB,EAClB,YAAY,EACZ,+BAA+B,EAChC,MAAM,SAAS,CAAA;AAGhB,MAAM,MAAM,cAAc,GAAG,cAAc,GAAG,cAAc,GAAG,OAAO,GAAG,QAAQ,CAAA;AAEjF,MAAM,MAA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