@depup/vscode-languageserver 10.1.1-depup.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/License.txt +11 -0
- package/README.md +25 -0
- package/bin/installServerIntoExtension +73 -0
- package/changes.json +5 -0
- package/eslint.config.js +10 -0
- package/lib/browser/main.d.ts +20 -0
- package/lib/browser/main.js +61 -0
- package/lib/common/api.d.ts +15 -0
- package/lib/common/api.js +35 -0
- package/lib/common/callHierarchy.d.ts +15 -0
- package/lib/common/callHierarchy.js +34 -0
- package/lib/common/configuration.d.ts +9 -0
- package/lib/common/configuration.js +71 -0
- package/lib/common/diagnostic.d.ts +29 -0
- package/lib/common/diagnostic.js +30 -0
- package/lib/common/fileOperations.d.ts +16 -0
- package/lib/common/fileOperations.js +43 -0
- package/lib/common/foldingRange.d.ts +22 -0
- package/lib/common/foldingRange.js +26 -0
- package/lib/common/inlayHint.d.ts +28 -0
- package/lib/common/inlayHint.js +30 -0
- package/lib/common/inlineCompletion.d.ts +18 -0
- package/lib/common/inlineCompletion.js +22 -0
- package/lib/common/inlineValue.d.ts +22 -0
- package/lib/common/inlineValue.js +25 -0
- package/lib/common/linkedEditingRange.d.ts +16 -0
- package/lib/common/linkedEditingRange.js +18 -0
- package/lib/common/moniker.d.ts +13 -0
- package/lib/common/moniker.js +23 -0
- package/lib/common/notebook.d.ts +99 -0
- package/lib/common/notebook.js +262 -0
- package/lib/common/progress.d.ts +25 -0
- package/lib/common/progress.js +172 -0
- package/lib/common/semanticTokens.d.ts +43 -0
- package/lib/common/semanticTokens.js +251 -0
- package/lib/common/server.d.ts +812 -0
- package/lib/common/server.js +798 -0
- package/lib/common/showDocument.d.ts +6 -0
- package/lib/common/showDocument.js +16 -0
- package/lib/common/textDocumentContent.d.ts +14 -0
- package/lib/common/textDocumentContent.js +25 -0
- package/lib/common/textDocuments.d.ts +133 -0
- package/lib/common/textDocuments.js +180 -0
- package/lib/common/typeHierarchy.d.ts +15 -0
- package/lib/common/typeHierarchy.js +34 -0
- package/lib/common/utils/is.d.ts +9 -0
- package/lib/common/utils/is.js +42 -0
- package/lib/common/utils/uuid.d.ts +22 -0
- package/lib/common/utils/uuid.js +98 -0
- package/lib/common/workspaceFolder.d.ts +7 -0
- package/lib/common/workspaceFolder.js +47 -0
- package/lib/node/files.d.ts +19 -0
- package/lib/node/files.js +295 -0
- package/lib/node/main.d.ts +60 -0
- package/lib/node/main.js +295 -0
- package/lib/node/resolve.d.ts +1 -0
- package/lib/node/resolve.js +20 -0
- package/package.json +65 -0
- package/thirdpartynotices.txt +84 -0
- package/typings/thenable.d.ts +5 -0
package/License.txt
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Copyright (c) Microsoft Corporation
|
|
2
|
+
|
|
3
|
+
All rights reserved.
|
|
4
|
+
|
|
5
|
+
MIT License
|
|
6
|
+
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
8
|
+
|
|
9
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
10
|
+
|
|
11
|
+
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# @depup/vscode-languageserver
|
|
2
|
+
|
|
3
|
+
> Dependency-bumped version of [vscode-languageserver](https://www.npmjs.com/package/vscode-languageserver)
|
|
4
|
+
|
|
5
|
+
Generated by [DepUp](https://github.com/depup/npm) -- all production
|
|
6
|
+
dependencies bumped to latest versions.
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install @depup/vscode-languageserver
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
| Field | Value |
|
|
15
|
+
|-------|-------|
|
|
16
|
+
| Original | [vscode-languageserver](https://www.npmjs.com/package/vscode-languageserver) @ 10.1.1 |
|
|
17
|
+
| Processed | 2026-08-30 |
|
|
18
|
+
| Smoke test | passed |
|
|
19
|
+
| Deps updated | 0 |
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
Source: https://github.com/depup/npm | Original: https://www.npmjs.com/package/vscode-languageserver
|
|
24
|
+
|
|
25
|
+
License inherited from the original package.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/* eslint-disable no-console */
|
|
3
|
+
|
|
4
|
+
var path = require('path');
|
|
5
|
+
var fs = require('fs');
|
|
6
|
+
var cp = require('child_process');
|
|
7
|
+
|
|
8
|
+
var extensionDirectory = process.argv[2];
|
|
9
|
+
if (!extensionDirectory) {
|
|
10
|
+
console.error('No extension directory provided.');
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
13
|
+
extensionDirectory = path.resolve(extensionDirectory);
|
|
14
|
+
if (!fs.existsSync(extensionDirectory)) {
|
|
15
|
+
console.error('Extension directory ' + extensionDirectory + ' doesn\'t exist on disk.');
|
|
16
|
+
process.exit(1);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
var packageFile = process.argv[3];
|
|
20
|
+
if (!packageFile) {
|
|
21
|
+
console.error('No package.json file provided.');
|
|
22
|
+
process.exit(1);
|
|
23
|
+
}
|
|
24
|
+
packageFile = path.resolve(packageFile);
|
|
25
|
+
if (!fs.existsSync(packageFile)) {
|
|
26
|
+
console.error('Package file ' + packageFile + ' doesn\'t exist on disk.');
|
|
27
|
+
process.exit(1);
|
|
28
|
+
}
|
|
29
|
+
var tsconfigFile = process.argv[4];
|
|
30
|
+
if (!tsconfigFile) {
|
|
31
|
+
console.error('No tsconfig.json file provided');
|
|
32
|
+
process.exit(1);
|
|
33
|
+
}
|
|
34
|
+
tsconfigFile = path.resolve(tsconfigFile);
|
|
35
|
+
if (!fs.existsSync(tsconfigFile)) {
|
|
36
|
+
console.error('tsconfig file ' + tsconfigFile + ' doesn\'t exist on disk.');
|
|
37
|
+
process.exit(1);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
var extensionServerDirectory = path.join(extensionDirectory, 'server');
|
|
41
|
+
|
|
42
|
+
var json = require(tsconfigFile);
|
|
43
|
+
var compilerOptions = json.compilerOptions;
|
|
44
|
+
if (compilerOptions) {
|
|
45
|
+
var outDir = compilerOptions.outDir;
|
|
46
|
+
if (!outDir || path.join(path.dirname(tsconfigFile), outDir) !== extensionServerDirectory) {
|
|
47
|
+
console.error('outDir in ' + process.argv[4] + ' must point to ' + extensionServerDirectory + ' but it points to ' + path.join(path.dirname(tsconfigFile), outDir));
|
|
48
|
+
console.error('Please change outDir in ' + process.argv[4] + ' to ' + path.relative(path.dirname(tsconfigFile), extensionServerDirectory).replace(/\\/g, '/'));
|
|
49
|
+
process.exit(1);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (!fs.existsSync(extensionServerDirectory)) {
|
|
54
|
+
fs.mkdirSync(extensionServerDirectory);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
var dest = path.join(extensionServerDirectory, 'package.json');
|
|
58
|
+
console.log('Copying package.json to extension\'s server location...');
|
|
59
|
+
fs.writeFileSync(dest, fs.readFileSync(packageFile));
|
|
60
|
+
|
|
61
|
+
var shrinkwrapFile = process.argv[5];
|
|
62
|
+
if (fs.existsSync(shrinkwrapFile)) {
|
|
63
|
+
const shrinkWrapDest = path.join(extensionServerDirectory, 'npm-shrinkwrap.json');
|
|
64
|
+
shrinkwrapFile = path.resolve(shrinkwrapFile);
|
|
65
|
+
console.log('Copying npm-shrinkwrap.json to extension\'s server location...');
|
|
66
|
+
fs.writeFileSync(shrinkWrapDest, fs.readFileSync(shrinkwrapFile));
|
|
67
|
+
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
console.log('The script is deprecated. See https://github.com/microsoft/vscode-extension-samples/tree/master/lsp-sample for an example on how to setup an extension / server project.');
|
|
71
|
+
console.log('');
|
|
72
|
+
console.log('Updating server npm modules into extension\'s server location...');
|
|
73
|
+
cp.execSync('npm update --production --prefix ' + extensionServerDirectory);
|
package/changes.json
ADDED
package/eslint.config.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const { createConfig } = require('../eslint.config.base.js');
|
|
5
|
+
|
|
6
|
+
module.exports = createConfig(
|
|
7
|
+
['src/browser/tsconfig.json', 'src/common/tsconfig.json', 'src/node/tsconfig.json', 'src/node/test/tsconfig.json'],
|
|
8
|
+
undefined,
|
|
9
|
+
{}
|
|
10
|
+
);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { MessageReader, MessageWriter, ConnectionStrategy, ConnectionOptions, Connection, Features, _Connection, _ } from '../common/api';
|
|
2
|
+
export * from 'vscode-languageserver-protocol/browser';
|
|
3
|
+
export * from '../common/api';
|
|
4
|
+
/**
|
|
5
|
+
* Creates a new connection.
|
|
6
|
+
*
|
|
7
|
+
* @param factories: The factories for proposed features.
|
|
8
|
+
* @param reader The message reader to read messages from.
|
|
9
|
+
* @param writer The message writer to write message to.
|
|
10
|
+
* @param options An optional connection strategy or connection options to control additional settings
|
|
11
|
+
*/
|
|
12
|
+
export declare function createConnection<PConsole = _, PTracer = _, PTelemetry = _, PClient = _, PWindow = _, PWorkspace = _, PLanguages = _>(factories: Features<PConsole, PTracer, PTelemetry, PClient, PWindow, PWorkspace, PLanguages>, reader: MessageReader, writer: MessageWriter, options?: ConnectionStrategy | ConnectionOptions): _Connection<PConsole, PTracer, PTelemetry, PClient, PWindow, PWorkspace, PLanguages>;
|
|
13
|
+
/**
|
|
14
|
+
* Creates a new connection.
|
|
15
|
+
*
|
|
16
|
+
* @param reader The message reader to read messages from.
|
|
17
|
+
* @param writer The message writer to write message to.
|
|
18
|
+
* @param options An optional connection strategy or connection options to control additional settings
|
|
19
|
+
*/
|
|
20
|
+
export declare function createConnection(reader: MessageReader, writer: MessageWriter, options?: ConnectionStrategy | ConnectionOptions): Connection;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* --------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
+
* ------------------------------------------------------------------------------------------ */
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
18
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.createConnection = createConnection;
|
|
22
|
+
const api_1 = require("../common/api");
|
|
23
|
+
__exportStar(require("vscode-languageserver-protocol/browser"), exports);
|
|
24
|
+
__exportStar(require("../common/api"), exports);
|
|
25
|
+
let _shutdownReceived = false;
|
|
26
|
+
const watchDog = {
|
|
27
|
+
initialize: (_params) => {
|
|
28
|
+
},
|
|
29
|
+
get shutdownReceived() {
|
|
30
|
+
return _shutdownReceived;
|
|
31
|
+
},
|
|
32
|
+
set shutdownReceived(value) {
|
|
33
|
+
_shutdownReceived = value;
|
|
34
|
+
},
|
|
35
|
+
exit: (_code) => {
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
function createConnection(arg1, arg2, arg3, arg4) {
|
|
39
|
+
let factories;
|
|
40
|
+
let reader;
|
|
41
|
+
let writer;
|
|
42
|
+
let options;
|
|
43
|
+
if (arg1 !== void 0 && arg1.__brand === 'features') {
|
|
44
|
+
factories = arg1;
|
|
45
|
+
arg1 = arg2;
|
|
46
|
+
arg2 = arg3;
|
|
47
|
+
arg3 = arg4;
|
|
48
|
+
}
|
|
49
|
+
if (api_1.ConnectionStrategy.is(arg1) || api_1.ConnectionOptions.is(arg1)) {
|
|
50
|
+
options = arg1;
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
reader = arg1;
|
|
54
|
+
writer = arg2;
|
|
55
|
+
options = arg3;
|
|
56
|
+
}
|
|
57
|
+
const connectionFactory = (logger) => {
|
|
58
|
+
return (0, api_1.createProtocolConnection)(reader, writer, logger, options);
|
|
59
|
+
};
|
|
60
|
+
return (0, api_1.createConnection)(connectionFactory, watchDog, factories);
|
|
61
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { _, Features, _Connection } from './server';
|
|
2
|
+
import { SemanticTokensBuilder } from './semanticTokens';
|
|
3
|
+
import type { WorkDoneProgressReporter, WorkDoneProgressServerReporter, ResultProgressReporter } from './progress';
|
|
4
|
+
export * from 'vscode-languageserver-protocol';
|
|
5
|
+
export { WorkDoneProgressReporter, WorkDoneProgressServerReporter, ResultProgressReporter };
|
|
6
|
+
export { SemanticTokensBuilder };
|
|
7
|
+
import { TextDocuments, TextDocumentsConfiguration, TextDocumentChangeEvent, TextDocumentWillSaveEvent } from './textDocuments';
|
|
8
|
+
export { TextDocuments, TextDocumentsConfiguration, TextDocumentChangeEvent, TextDocumentWillSaveEvent };
|
|
9
|
+
import { NotebookDocuments } from './notebook';
|
|
10
|
+
export { NotebookDocuments };
|
|
11
|
+
export * from './server';
|
|
12
|
+
export declare namespace ProposedFeatures {
|
|
13
|
+
const all: Features<_, _, _, _, _, _, _, _>;
|
|
14
|
+
type Connection = _Connection<_, _, _, _, _, _, _, _>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* --------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
+
* ------------------------------------------------------------------------------------------ */
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
18
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.ProposedFeatures = exports.NotebookDocuments = exports.TextDocuments = exports.SemanticTokensBuilder = void 0;
|
|
22
|
+
const semanticTokens_1 = require("./semanticTokens");
|
|
23
|
+
Object.defineProperty(exports, "SemanticTokensBuilder", { enumerable: true, get: function () { return semanticTokens_1.SemanticTokensBuilder; } });
|
|
24
|
+
__exportStar(require("vscode-languageserver-protocol"), exports);
|
|
25
|
+
const textDocuments_1 = require("./textDocuments");
|
|
26
|
+
Object.defineProperty(exports, "TextDocuments", { enumerable: true, get: function () { return textDocuments_1.TextDocuments; } });
|
|
27
|
+
const notebook_1 = require("./notebook");
|
|
28
|
+
Object.defineProperty(exports, "NotebookDocuments", { enumerable: true, get: function () { return notebook_1.NotebookDocuments; } });
|
|
29
|
+
__exportStar(require("./server"), exports);
|
|
30
|
+
var ProposedFeatures;
|
|
31
|
+
(function (ProposedFeatures) {
|
|
32
|
+
ProposedFeatures.all = {
|
|
33
|
+
__brand: 'features',
|
|
34
|
+
};
|
|
35
|
+
})(ProposedFeatures || (exports.ProposedFeatures = ProposedFeatures = {}));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CallHierarchyItem, CallHierarchyPrepareParams, CallHierarchyIncomingCallsParams, CallHierarchyIncomingCall, CallHierarchyOutgoingCallsParams, CallHierarchyOutgoingCall, Disposable } from 'vscode-languageserver-protocol';
|
|
2
|
+
import type { Feature, _Languages, ServerRequestHandler } from './server';
|
|
3
|
+
/**
|
|
4
|
+
* Shape of the call hierarchy feature
|
|
5
|
+
*
|
|
6
|
+
* @since 3.16.0
|
|
7
|
+
*/
|
|
8
|
+
export interface CallHierarchy {
|
|
9
|
+
callHierarchy: {
|
|
10
|
+
onPrepare(handler: ServerRequestHandler<CallHierarchyPrepareParams, CallHierarchyItem[] | null, never, void>): Disposable;
|
|
11
|
+
onIncomingCalls(handler: ServerRequestHandler<CallHierarchyIncomingCallsParams, CallHierarchyIncomingCall[] | null, CallHierarchyIncomingCall[], void>): Disposable;
|
|
12
|
+
onOutgoingCalls(handler: ServerRequestHandler<CallHierarchyOutgoingCallsParams, CallHierarchyOutgoingCall[] | null, CallHierarchyOutgoingCall[], void>): Disposable;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export declare const CallHierarchyFeature: Feature<_Languages, CallHierarchy>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* --------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
* ------------------------------------------------------------------------------------------ */
|
|
5
|
+
'use strict';
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.CallHierarchyFeature = void 0;
|
|
8
|
+
const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol");
|
|
9
|
+
const CallHierarchyFeature = (Base) => {
|
|
10
|
+
return class extends Base {
|
|
11
|
+
get callHierarchy() {
|
|
12
|
+
return {
|
|
13
|
+
onPrepare: (handler) => {
|
|
14
|
+
return this.connection.onRequest(vscode_languageserver_protocol_1.CallHierarchyPrepareRequest.type, (params, cancel) => {
|
|
15
|
+
return handler(params, cancel, this.attachWorkDoneProgress(params), undefined);
|
|
16
|
+
});
|
|
17
|
+
},
|
|
18
|
+
onIncomingCalls: (handler) => {
|
|
19
|
+
const type = vscode_languageserver_protocol_1.CallHierarchyIncomingCallsRequest.type;
|
|
20
|
+
return this.connection.onRequest(type, (params, cancel) => {
|
|
21
|
+
return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
|
|
22
|
+
});
|
|
23
|
+
},
|
|
24
|
+
onOutgoingCalls: (handler) => {
|
|
25
|
+
const type = vscode_languageserver_protocol_1.CallHierarchyOutgoingCallsRequest.type;
|
|
26
|
+
return this.connection.onRequest(type, (params, cancel) => {
|
|
27
|
+
return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
exports.CallHierarchyFeature = CallHierarchyFeature;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ConfigurationItem } from 'vscode-languageserver-protocol';
|
|
2
|
+
import type { Feature, _RemoteWorkspace } from './server';
|
|
3
|
+
export interface Configuration {
|
|
4
|
+
getConfiguration(): Promise<any>;
|
|
5
|
+
getConfiguration(section: string): Promise<any>;
|
|
6
|
+
getConfiguration(item: ConfigurationItem): Promise<any>;
|
|
7
|
+
getConfiguration(items: ConfigurationItem[]): Promise<any[]>;
|
|
8
|
+
}
|
|
9
|
+
export declare const ConfigurationFeature: Feature<_RemoteWorkspace, Configuration>;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* --------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
+
* ------------------------------------------------------------------------------------------ */
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
+
}) : function(o, v) {
|
|
20
|
+
o["default"] = v;
|
|
21
|
+
});
|
|
22
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
23
|
+
var ownKeys = function(o) {
|
|
24
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
25
|
+
var ar = [];
|
|
26
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
27
|
+
return ar;
|
|
28
|
+
};
|
|
29
|
+
return ownKeys(o);
|
|
30
|
+
};
|
|
31
|
+
return function (mod) {
|
|
32
|
+
if (mod && mod.__esModule) return mod;
|
|
33
|
+
var result = {};
|
|
34
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
35
|
+
__setModuleDefault(result, mod);
|
|
36
|
+
return result;
|
|
37
|
+
};
|
|
38
|
+
})();
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
exports.ConfigurationFeature = void 0;
|
|
41
|
+
const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol");
|
|
42
|
+
const Is = __importStar(require("./utils/is"));
|
|
43
|
+
const ConfigurationFeature = (Base) => {
|
|
44
|
+
return class extends Base {
|
|
45
|
+
getConfiguration(arg) {
|
|
46
|
+
if (!arg) {
|
|
47
|
+
return this._getConfiguration({});
|
|
48
|
+
}
|
|
49
|
+
else if (Is.string(arg)) {
|
|
50
|
+
return this._getConfiguration({ section: arg });
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
return this._getConfiguration(arg);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
_getConfiguration(arg) {
|
|
57
|
+
const params = {
|
|
58
|
+
items: Array.isArray(arg) ? arg : [arg]
|
|
59
|
+
};
|
|
60
|
+
return this.connection.sendRequest(vscode_languageserver_protocol_1.ConfigurationRequest.type, params).then((result) => {
|
|
61
|
+
if (Array.isArray(result)) {
|
|
62
|
+
return Array.isArray(arg) ? result : result[0];
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
return Array.isArray(arg) ? [] : null;
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
exports.ConfigurationFeature = ConfigurationFeature;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Disposable, DocumentDiagnosticParams, DocumentDiagnosticReport, DocumentDiagnosticReportPartialResult, DiagnosticServerCancellationData, WorkspaceDiagnosticParams, WorkspaceDiagnosticReport, WorkspaceDiagnosticReportPartialResult } from 'vscode-languageserver-protocol';
|
|
2
|
+
import type { Feature, _Languages, ServerRequestHandler } from './server';
|
|
3
|
+
/**
|
|
4
|
+
* Shape of the linked editing feature
|
|
5
|
+
*
|
|
6
|
+
* @since 3.16.0
|
|
7
|
+
*/
|
|
8
|
+
export interface DiagnosticFeatureShape {
|
|
9
|
+
diagnostics: {
|
|
10
|
+
/**
|
|
11
|
+
* Asks the client to refresh all diagnostics provided by this server by
|
|
12
|
+
* pull for the corresponding documents again.
|
|
13
|
+
*/
|
|
14
|
+
refresh(): Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* Installs a handler for the document diagnostic request.
|
|
17
|
+
*
|
|
18
|
+
* @param handler The corresponding handler.
|
|
19
|
+
*/
|
|
20
|
+
on(handler: ServerRequestHandler<DocumentDiagnosticParams, DocumentDiagnosticReport, DocumentDiagnosticReportPartialResult, DiagnosticServerCancellationData>): Disposable;
|
|
21
|
+
/**
|
|
22
|
+
* Installs a handler for the workspace diagnostic request.
|
|
23
|
+
*
|
|
24
|
+
* @param handler The corresponding handler.
|
|
25
|
+
*/
|
|
26
|
+
onWorkspace(handler: ServerRequestHandler<WorkspaceDiagnosticParams, WorkspaceDiagnosticReport, WorkspaceDiagnosticReportPartialResult, DiagnosticServerCancellationData>): Disposable;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export declare const DiagnosticFeature: Feature<_Languages, DiagnosticFeatureShape>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* --------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
+
* ------------------------------------------------------------------------------------------ */
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.DiagnosticFeature = void 0;
|
|
8
|
+
const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol");
|
|
9
|
+
const DiagnosticFeature = (Base) => {
|
|
10
|
+
return class extends Base {
|
|
11
|
+
get diagnostics() {
|
|
12
|
+
return {
|
|
13
|
+
refresh: () => {
|
|
14
|
+
return this.connection.sendRequest(vscode_languageserver_protocol_1.DiagnosticRefreshRequest.type);
|
|
15
|
+
},
|
|
16
|
+
on: (handler) => {
|
|
17
|
+
return this.connection.onRequest(vscode_languageserver_protocol_1.DocumentDiagnosticRequest.type, (params, cancel) => {
|
|
18
|
+
return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(vscode_languageserver_protocol_1.DocumentDiagnosticRequest.partialResult, params));
|
|
19
|
+
});
|
|
20
|
+
},
|
|
21
|
+
onWorkspace: (handler) => {
|
|
22
|
+
return this.connection.onRequest(vscode_languageserver_protocol_1.WorkspaceDiagnosticRequest.type, (params, cancel) => {
|
|
23
|
+
return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(vscode_languageserver_protocol_1.WorkspaceDiagnosticRequest.partialResult, params));
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
exports.DiagnosticFeature = DiagnosticFeature;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RequestHandler, NotificationHandler, WorkspaceEdit, CreateFilesParams, RenameFilesParams, DeleteFilesParams, Disposable } from 'vscode-languageserver-protocol';
|
|
2
|
+
import type { Feature, _RemoteWorkspace } from './server';
|
|
3
|
+
/**
|
|
4
|
+
* Shape of the file operations feature
|
|
5
|
+
*
|
|
6
|
+
* @since 3.16.0
|
|
7
|
+
*/
|
|
8
|
+
export interface FileOperationsFeatureShape {
|
|
9
|
+
onDidCreateFiles(handler: NotificationHandler<CreateFilesParams>): Disposable;
|
|
10
|
+
onDidRenameFiles(handler: NotificationHandler<RenameFilesParams>): Disposable;
|
|
11
|
+
onDidDeleteFiles(handler: NotificationHandler<DeleteFilesParams>): Disposable;
|
|
12
|
+
onWillCreateFiles(handler: RequestHandler<CreateFilesParams, WorkspaceEdit | null, never>): Disposable;
|
|
13
|
+
onWillRenameFiles(handler: RequestHandler<RenameFilesParams, WorkspaceEdit | null, never>): Disposable;
|
|
14
|
+
onWillDeleteFiles(handler: RequestHandler<DeleteFilesParams, WorkspaceEdit | null, never>): Disposable;
|
|
15
|
+
}
|
|
16
|
+
export declare const FileOperationsFeature: Feature<_RemoteWorkspace, FileOperationsFeatureShape>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* --------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
+
* ------------------------------------------------------------------------------------------ */
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.FileOperationsFeature = void 0;
|
|
8
|
+
const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol");
|
|
9
|
+
const FileOperationsFeature = (Base) => {
|
|
10
|
+
return class extends Base {
|
|
11
|
+
onDidCreateFiles(handler) {
|
|
12
|
+
return this.connection.onNotification(vscode_languageserver_protocol_1.DidCreateFilesNotification.type, (params) => {
|
|
13
|
+
return handler(params);
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
onDidRenameFiles(handler) {
|
|
17
|
+
return this.connection.onNotification(vscode_languageserver_protocol_1.DidRenameFilesNotification.type, (params) => {
|
|
18
|
+
return handler(params);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
onDidDeleteFiles(handler) {
|
|
22
|
+
return this.connection.onNotification(vscode_languageserver_protocol_1.DidDeleteFilesNotification.type, (params) => {
|
|
23
|
+
return handler(params);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
onWillCreateFiles(handler) {
|
|
27
|
+
return this.connection.onRequest(vscode_languageserver_protocol_1.WillCreateFilesRequest.type, (params, cancel) => {
|
|
28
|
+
return handler(params, cancel);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
onWillRenameFiles(handler) {
|
|
32
|
+
return this.connection.onRequest(vscode_languageserver_protocol_1.WillRenameFilesRequest.type, (params, cancel) => {
|
|
33
|
+
return handler(params, cancel);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
onWillDeleteFiles(handler) {
|
|
37
|
+
return this.connection.onRequest(vscode_languageserver_protocol_1.WillDeleteFilesRequest.type, (params, cancel) => {
|
|
38
|
+
return handler(params, cancel);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
exports.FileOperationsFeature = FileOperationsFeature;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { FoldingRange, Disposable, FoldingRangeParams } from 'vscode-languageserver-protocol';
|
|
2
|
+
import type { Feature, _Languages, ServerRequestHandler } from './server';
|
|
3
|
+
/**
|
|
4
|
+
* Shape of the folding range feature
|
|
5
|
+
*/
|
|
6
|
+
export interface FoldingRangeFeatureShape {
|
|
7
|
+
foldingRange: {
|
|
8
|
+
/**
|
|
9
|
+
* Ask the client to refresh all folding ranges
|
|
10
|
+
*
|
|
11
|
+
* @since 3.18.0.
|
|
12
|
+
*/
|
|
13
|
+
refresh(): Promise<void>;
|
|
14
|
+
/**
|
|
15
|
+
* Installs a handler for the folding range request.
|
|
16
|
+
*
|
|
17
|
+
* @param handler The corresponding handler.
|
|
18
|
+
*/
|
|
19
|
+
on(handler: ServerRequestHandler<FoldingRangeParams, FoldingRange[] | undefined | null, FoldingRange[], void>): Disposable;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export declare const FoldingRangeFeature: Feature<_Languages, FoldingRangeFeatureShape>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/* --------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
* ------------------------------------------------------------------------------------------ */
|
|
5
|
+
'use strict';
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.FoldingRangeFeature = void 0;
|
|
8
|
+
const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol");
|
|
9
|
+
const FoldingRangeFeature = (Base) => {
|
|
10
|
+
return class extends Base {
|
|
11
|
+
get foldingRange() {
|
|
12
|
+
return {
|
|
13
|
+
refresh: () => {
|
|
14
|
+
return this.connection.sendRequest(vscode_languageserver_protocol_1.FoldingRangeRefreshRequest.type);
|
|
15
|
+
},
|
|
16
|
+
on: (handler) => {
|
|
17
|
+
const type = vscode_languageserver_protocol_1.FoldingRangeRequest.type;
|
|
18
|
+
return this.connection.onRequest(type, (params, cancel) => {
|
|
19
|
+
return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
exports.FoldingRangeFeature = FoldingRangeFeature;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { InlayHint, InlayHintParams, Disposable, RequestHandler } from 'vscode-languageserver-protocol';
|
|
2
|
+
import type { Feature, _Languages, ServerRequestHandler } from './server';
|
|
3
|
+
/**
|
|
4
|
+
* Shape of the inlay hints feature
|
|
5
|
+
*
|
|
6
|
+
* @since 3.17.0
|
|
7
|
+
*/
|
|
8
|
+
export interface InlayHintFeatureShape {
|
|
9
|
+
inlayHint: {
|
|
10
|
+
/**
|
|
11
|
+
* Ask the client to refresh all inlay hints.
|
|
12
|
+
*/
|
|
13
|
+
refresh(): Promise<void>;
|
|
14
|
+
/**
|
|
15
|
+
* Installs a handler for the inlay hints request.
|
|
16
|
+
*
|
|
17
|
+
* @param handler The corresponding handler.
|
|
18
|
+
*/
|
|
19
|
+
on(handler: ServerRequestHandler<InlayHintParams, InlayHint[] | undefined | null, InlayHint[], void>): Disposable;
|
|
20
|
+
/**
|
|
21
|
+
* Installs a handler for the inlay hint resolve request.
|
|
22
|
+
*
|
|
23
|
+
* @param handler The corresponding handler.
|
|
24
|
+
*/
|
|
25
|
+
resolve(handler: RequestHandler<InlayHint, InlayHint, void>): Disposable;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export declare const InlayHintFeature: Feature<_Languages, InlayHintFeatureShape>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* --------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
* ------------------------------------------------------------------------------------------ */
|
|
5
|
+
'use strict';
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.InlayHintFeature = void 0;
|
|
8
|
+
const vscode_languageserver_protocol_1 = require("vscode-languageserver-protocol");
|
|
9
|
+
const InlayHintFeature = (Base) => {
|
|
10
|
+
return class extends Base {
|
|
11
|
+
get inlayHint() {
|
|
12
|
+
return {
|
|
13
|
+
refresh: () => {
|
|
14
|
+
return this.connection.sendRequest(vscode_languageserver_protocol_1.InlayHintRefreshRequest.type);
|
|
15
|
+
},
|
|
16
|
+
on: (handler) => {
|
|
17
|
+
return this.connection.onRequest(vscode_languageserver_protocol_1.InlayHintRequest.type, (params, cancel) => {
|
|
18
|
+
return handler(params, cancel, this.attachWorkDoneProgress(params));
|
|
19
|
+
});
|
|
20
|
+
},
|
|
21
|
+
resolve: (handler) => {
|
|
22
|
+
return this.connection.onRequest(vscode_languageserver_protocol_1.InlayHintResolveRequest.type, (params, cancel) => {
|
|
23
|
+
return handler(params, cancel);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
exports.InlayHintFeature = InlayHintFeature;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { InlineCompletionItem, Disposable, InlineCompletionParams, InlineCompletionList } from 'vscode-languageserver-protocol';
|
|
2
|
+
import type { Feature, _Languages, ServerRequestHandler } from './server';
|
|
3
|
+
/**
|
|
4
|
+
* Shape of the inline completions feature
|
|
5
|
+
*
|
|
6
|
+
* @since 3.18.0
|
|
7
|
+
*/
|
|
8
|
+
export interface InlineCompletionFeatureShape {
|
|
9
|
+
inlineCompletion: {
|
|
10
|
+
/**
|
|
11
|
+
* Installs a handler for the inline completions request.
|
|
12
|
+
*
|
|
13
|
+
* @param handler The corresponding handler.
|
|
14
|
+
*/
|
|
15
|
+
on(handler: ServerRequestHandler<InlineCompletionParams, InlineCompletionList | InlineCompletionItem[] | undefined | null, InlineCompletionItem[], void>): Disposable;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export declare const InlineCompletionFeature: Feature<_Languages, InlineCompletionFeatureShape>;
|