vscode-languageserver
Advanced tools
Comparing version 8.0.0-next.3 to 8.0.0-next.4
@@ -9,5 +9,7 @@ import { _, Features, _Connection } from './server'; | ||
import { DiagnosticsFeatureShape } from './proposed.diagnostic'; | ||
import { TypeHierarchyFeatureShape } from './proposed.typeHierarchy'; | ||
import { InlineValuesFeatureShape } from './proposed.inlineValues'; | ||
export declare namespace ProposedFeatures { | ||
const all: Features<_, _, _, _, _, _, DiagnosticsFeatureShape>; | ||
type Connection = _Connection<_, _, _, _, _, _, DiagnosticsFeatureShape>; | ||
const all: Features<_, _, _, _, _, _, DiagnosticsFeatureShape & TypeHierarchyFeatureShape & InlineValuesFeatureShape>; | ||
type Connection = _Connection<_, _, _, _, _, _, DiagnosticsFeatureShape & TypeHierarchyFeatureShape & InlineValuesFeatureShape>; | ||
} |
@@ -18,2 +18,3 @@ "use strict"; | ||
exports.ProposedFeatures = exports.SemanticTokensBuilder = void 0; | ||
const server_1 = require("./server"); | ||
const semanticTokens_1 = require("./semanticTokens"); | ||
@@ -24,2 +25,4 @@ Object.defineProperty(exports, "SemanticTokensBuilder", { enumerable: true, get: function () { return semanticTokens_1.SemanticTokensBuilder; } }); | ||
const proposed_diagnostic_1 = require("./proposed.diagnostic"); | ||
const proposed_typeHierarchy_1 = require("./proposed.typeHierarchy"); | ||
const proposed_inlineValues_1 = require("./proposed.inlineValues"); | ||
var ProposedFeatures; | ||
@@ -29,5 +32,5 @@ (function (ProposedFeatures) { | ||
__brand: 'features', | ||
languages: proposed_diagnostic_1.DiagnosticFeature | ||
languages: (0, server_1.combineLanguagesFeatures)(proposed_inlineValues_1.InlineValuesFeature, (0, server_1.combineLanguagesFeatures)(proposed_typeHierarchy_1.TypeHierarchyFeature, proposed_diagnostic_1.DiagnosticFeature)) | ||
}; | ||
})(ProposedFeatures = exports.ProposedFeatures || (exports.ProposedFeatures = {})); | ||
//# sourceMappingURL=api.js.map |
@@ -28,3 +28,8 @@ "use strict"; | ||
return this.connection.sendRequest(vscode_languageserver_protocol_1.ConfigurationRequest.type, params).then((result) => { | ||
return Array.isArray(arg) ? result : result[0]; | ||
if (Array.isArray(result)) { | ||
return Array.isArray(arg) ? result : result[0]; | ||
} | ||
else { | ||
return Array.isArray(arg) ? [] : null; | ||
} | ||
}); | ||
@@ -31,0 +36,0 @@ } |
@@ -104,5 +104,4 @@ "use strict"; | ||
initialize(capabilities) { | ||
var _a; | ||
super.initialize(capabilities); | ||
if (((_a = capabilities === null || capabilities === void 0 ? void 0 : capabilities.window) === null || _a === void 0 ? void 0 : _a.workDoneProgress) === true) { | ||
if (capabilities?.window?.workDoneProgress === true) { | ||
this._progressSupported = true; | ||
@@ -109,0 +108,0 @@ this.connection.onNotification(vscode_languageserver_protocol_1.WorkDoneProgressCancelNotification.type, (params) => { |
@@ -1,2 +0,2 @@ | ||
import { CancellationToken, ProtocolRequestType0, RequestHandler0, ProtocolRequestType, RequestHandler, GenericRequestHandler, StarRequestHandler, HandlerResult, ProtocolNotificationType0, NotificationHandler0, ProtocolNotificationType, NotificationHandler, GenericNotificationHandler, StarNotificationHandler, ProgressType, Disposable, InitializeParams, InitializeResult, InitializeError, InitializedParams, DidChangeConfigurationParams, DidChangeWatchedFilesParams, DidOpenTextDocumentParams, DidChangeTextDocumentParams, DidCloseTextDocumentParams, WillSaveTextDocumentParams, TextEdit, DidSaveTextDocumentParams, PublishDiagnosticsParams, HoverParams, Hover, CompletionParams, CompletionItem, CompletionList, SignatureHelpParams, SignatureHelp, DeclarationParams, Declaration, DeclarationLink, Location, DefinitionParams, Definition, DefinitionLink, TypeDefinitionParams, ImplementationParams, ReferenceParams, DocumentHighlightParams, DocumentHighlight, DocumentSymbolParams, SymbolInformation, DocumentSymbol, WorkspaceSymbolParams, CodeActionParams, Command, CodeAction, CodeLensParams, CodeLens, DocumentFormattingParams, DocumentRangeFormattingParams, DocumentOnTypeFormattingParams, RenameParams, WorkspaceEdit, PrepareRenameParams, Range, DocumentLinkParams, DocumentLink, DocumentColorParams, ColorInformation, ColorPresentationParams, ColorPresentation, FoldingRangeParams, FoldingRange, SelectionRangeParams, SelectionRange, ExecuteCommandParams, MessageActionItem, ClientCapabilities, ServerCapabilities, Logger, ProtocolConnection, TextDocumentContentChangeEvent, TextDocumentSaveReason, Event, MessageSignature, ApplyWorkspaceEditParams, ApplyWorkspaceEditResponse, WorkDoneProgressParams, PartialResultParams, RegistrationType, RequestType0, RequestType, NotificationType0, NotificationType } from 'vscode-languageserver-protocol'; | ||
import { CancellationToken, ProtocolRequestType0, RequestHandler0, ProtocolRequestType, RequestHandler, GenericRequestHandler, StarRequestHandler, HandlerResult, ProtocolNotificationType0, NotificationHandler0, ProtocolNotificationType, NotificationHandler, GenericNotificationHandler, StarNotificationHandler, ProgressType, Disposable, InitializeParams, InitializeResult, InitializeError, InitializedParams, DidChangeConfigurationParams, DidChangeWatchedFilesParams, DidOpenTextDocumentParams, DidChangeTextDocumentParams, DidCloseTextDocumentParams, WillSaveTextDocumentParams, TextEdit, DidSaveTextDocumentParams, PublishDiagnosticsParams, HoverParams, Hover, CompletionParams, CompletionItem, CompletionList, SignatureHelpParams, SignatureHelp, DeclarationParams, Declaration, DeclarationLink, Location, DefinitionParams, Definition, DefinitionLink, TypeDefinitionParams, ImplementationParams, ReferenceParams, DocumentHighlightParams, DocumentHighlight, DocumentSymbolParams, SymbolInformation, DocumentSymbol, WorkspaceSymbolParams, CodeActionParams, Command, CodeAction, CodeLensParams, CodeLens, DocumentFormattingParams, DocumentRangeFormattingParams, DocumentOnTypeFormattingParams, RenameParams, WorkspaceEdit, PrepareRenameParams, Range, DocumentLinkParams, DocumentLink, DocumentColorParams, ColorInformation, ColorPresentationParams, ColorPresentation, FoldingRangeParams, FoldingRange, SelectionRangeParams, SelectionRange, ExecuteCommandParams, MessageActionItem, ClientCapabilities, ServerCapabilities, Logger, ProtocolConnection, TextDocumentContentChangeEvent, TextDocumentSaveReason, Event, MessageSignature, ApplyWorkspaceEditParams, ApplyWorkspaceEditResponse, WorkDoneProgressParams, PartialResultParams, RegistrationType, RequestType0, RequestType, NotificationType0, NotificationType, WorkspaceSymbol } from 'vscode-languageserver-protocol'; | ||
import { WorkDoneProgressReporter, ResultProgressReporter, WindowProgress } from './progress'; | ||
@@ -11,3 +11,2 @@ import { Configuration } from './configuration'; | ||
import { MonikerFeatureShape } from './moniker'; | ||
import { TypeHierarchyFeatureShape } from './proposed.typeHierarchy'; | ||
export interface TextDocumentsConfiguration<T> { | ||
@@ -431,3 +430,3 @@ create(uri: string, languageId: string, version: number, content: string): T; | ||
} | ||
export declare type Languages = _Languages & CallHierarchy & SemanticTokensFeatureShape & LinkedEditingRangeFeatureShape & MonikerFeatureShape & TypeHierarchyFeatureShape; | ||
export declare type Languages = _Languages & CallHierarchy & SemanticTokensFeatureShape & LinkedEditingRangeFeatureShape & MonikerFeatureShape; | ||
/** | ||
@@ -732,4 +731,10 @@ * An empty interface for new proposed API. | ||
*/ | ||
onWorkspaceSymbol(handler: ServerRequestHandler<WorkspaceSymbolParams, SymbolInformation[] | undefined | null, SymbolInformation[], void>): void; | ||
onWorkspaceSymbol(handler: ServerRequestHandler<WorkspaceSymbolParams, SymbolInformation[] | WorkspaceSymbol[] | undefined | null, SymbolInformation[], void>): void; | ||
/** | ||
* Installs a handler for the `WorkspaceSymbol` request. | ||
* | ||
* @param handler The corresponding handler. | ||
*/ | ||
onWorkspaceSymbolResolve(handler: ServerRequestHandler<WorkspaceSymbol, WorkspaceSymbol, never, void>): void; | ||
/** | ||
* Installs a handler for the `CodeAction` request. | ||
@@ -736,0 +741,0 @@ * |
@@ -20,3 +20,2 @@ "use strict"; | ||
const moniker_1 = require("./moniker"); | ||
const proposed_typeHierarchy_1 = require("./proposed.typeHierarchy"); | ||
function null2Undefined(value) { | ||
@@ -554,3 +553,3 @@ if (value === null) { | ||
exports._LanguagesImpl = _LanguagesImpl; | ||
const LanguagesImpl = (0, proposed_typeHierarchy_1.TypeHierarchyFeature)((0, moniker_1.MonikerFeature)((0, linkedEditingRange_1.LinkedEditingRangeFeature)((0, semanticTokens_1.SemanticTokensFeature)((0, callHierarchy_1.CallHierarchyFeature)(_LanguagesImpl))))); | ||
const LanguagesImpl = (0, moniker_1.MonikerFeature)((0, linkedEditingRange_1.LinkedEditingRangeFeature)((0, semanticTokens_1.SemanticTokensFeature)((0, callHierarchy_1.CallHierarchyFeature)(_LanguagesImpl)))); | ||
function combineConsoleFeatures(one, two) { | ||
@@ -720,2 +719,3 @@ return function (Base) { | ||
}), | ||
onWorkspaceSymbolResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WorkspaceSymbolResolveRequest.type, handler), | ||
onCodeAction: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeActionRequest.type, (params, cancel) => { | ||
@@ -722,0 +722,0 @@ return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params)); |
@@ -26,5 +26,4 @@ /* -------------------------------------------------------------------------------------------- | ||
fillServerCapabilities(capabilities) { | ||
var _a, _b; | ||
super.fillServerCapabilities(capabilities); | ||
const changeNotifications = (_b = (_a = capabilities.workspace) === null || _a === void 0 ? void 0 : _a.workspaceFolders) === null || _b === void 0 ? void 0 : _b.changeNotifications; | ||
const changeNotifications = capabilities.workspace?.workspaceFolders?.changeNotifications; | ||
this._notificationIsAutoRegistered = changeNotifications === true || typeof changeNotifications === 'string'; | ||
@@ -31,0 +30,0 @@ } |
{ | ||
"name": "vscode-languageserver", | ||
"description": "Language server implementation for node", | ||
"version": "8.0.0-next.3", | ||
"version": "8.0.0-next.4", | ||
"author": "Microsoft Corporation", | ||
@@ -24,3 +24,3 @@ "license": "MIT", | ||
"dependencies": { | ||
"vscode-languageserver-protocol": "3.17.0-next.9" | ||
"vscode-languageserver-protocol": "3.17.0-next.10" | ||
}, | ||
@@ -27,0 +27,0 @@ "scripts": { |
163212
51
3448
+ Addedvscode-jsonrpc@8.0.0-next.4(transitive)
+ Addedvscode-languageserver-protocol@3.17.0-next.10(transitive)
+ Addedvscode-languageserver-types@3.17.0-next.5(transitive)
- Removedvscode-jsonrpc@8.0.0-next.3(transitive)
- Removedvscode-languageserver-protocol@3.17.0-next.9(transitive)
- Removedvscode-languageserver-types@3.17.0-next.4(transitive)