Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vscode-languageclient

Package Overview
Dependencies
Maintainers
9
Versions
302
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vscode-languageclient - npm Package Compare versions

Comparing version 1.1.4-prerelease.1 to 1.2.0-prerelease.1

1

lib/main.d.ts

@@ -54,2 +54,3 @@ import * as cp from 'child_process';

diagnosticCollectionName?: string;
initializationOptions?: any;
}

@@ -56,0 +57,0 @@ export declare class LanguageClient {

4

lib/main.js

@@ -271,3 +271,3 @@ /* --------------------------------------------------------------------------------------------

var _this = this;
var initParams = { processId: process.pid, rootPath: vscode_1.workspace.rootPath, capabilities: {} };
var initParams = { processId: process.pid, rootPath: vscode_1.workspace.rootPath, capabilities: {}, initializationOptions: this._languageOptions.initializationOptions };
return connection.initialize(initParams).then(function (result) {

@@ -584,3 +584,3 @@ _this._state = ClientState.Running;

provideCompletionItems: function (document, position, token) {
return _this.doSendRequest(connection, protocol_1.CompletionRequest.type, c2p.asTextDocumentPosition(document, position)).then(p2c.asCompletionItems, function (error) { return Promise.resolve([]); });
return _this.doSendRequest(connection, protocol_1.CompletionRequest.type, c2p.asTextDocumentPosition(document, position)).then(p2c.asCompletionResult, function (error) { return Promise.resolve([]); });
},

@@ -587,0 +587,0 @@ resolveCompletionItem: this._capabilites.completionProvider.resolveProvider

@@ -508,2 +508,6 @@ import { RequestType, NotificationType } from 'vscode-jsonrpc';

capabilities: ClientCapabilities;
/**
* User provided initialization options.
*/
initializationOptions: any;
}

@@ -839,2 +843,28 @@ /**

/**
* Represents a collection of [completion items](#CompletionItem) to be presented
* in the editor.
*/
export declare class CompletionList {
/**
* This list it not complete. Further typing should result in recomputing
* this list.
*/
isIncomplete: boolean;
/**
* The completion items.
*/
items: CompletionItem[];
}
/**
* The CompletionItem namespace provides functions to deal with
* completion items.
*/
export declare namespace CompletionList {
/**
* Create a completion item and seed it with a label.
* @param label The completion item's label
*/
function create(items: CompletionItem[], isIncomplete: boolean): CompletionList;
}
/**
* Request to request completion at a given text document position. The request's

@@ -841,0 +871,0 @@ * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response

@@ -518,2 +518,27 @@ /* --------------------------------------------------------------------------------------------

/**
* Represents a collection of [completion items](#CompletionItem) to be presented
* in the editor.
*/
var CompletionList = (function () {
function CompletionList() {
}
return CompletionList;
})();
exports.CompletionList = CompletionList;
/**
* The CompletionItem namespace provides functions to deal with
* completion items.
*/
var CompletionList;
(function (CompletionList) {
/**
* Create a completion item and seed it with a label.
* @param label The completion item's label
*/
function create(items, isIncomplete) {
return { items: items, isIncomplete: isIncomplete };
}
CompletionList.create = create;
})(CompletionList = exports.CompletionList || (exports.CompletionList = {}));
/**
* Request to request completion at a given text document position. The request's

@@ -520,0 +545,0 @@ * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response

@@ -10,3 +10,3 @@ import * as code from 'vscode';

export declare function asHover(hover: proto.Hover): code.Hover;
export declare function asCompletionItems(items: proto.CompletionItem[]): code.CompletionItem[];
export declare function asCompletionResult(result: proto.CompletionItem[] | proto.CompletionList): code.CompletionItem[] | code.CompletionList;
export declare function asCompletionItem(item: proto.CompletionItem): ProtocolCompletionItem;

@@ -13,0 +13,0 @@ export declare function asTextEdit(edit: proto.TextEdit): code.TextEdit;

@@ -67,6 +67,11 @@ /* --------------------------------------------------------------------------------------------

exports.asHover = asHover;
function asCompletionItems(items) {
return items.map(asCompletionItem);
function asCompletionResult(result) {
if (Array.isArray(result)) {
var items = result;
return items.map(asCompletionItem);
}
var list = result;
return new code.CompletionList(list.items.map(asCompletionItem), list.isIncomplete);
}
exports.asCompletionItems = asCompletionItems;
exports.asCompletionResult = asCompletionResult;
function set(value, func) {

@@ -73,0 +78,0 @@ if (is.defined(value)) {

{
"name": "vscode-languageclient",
"description": "VSCode Language client implementation",
"version": "1.1.4-prerelease.1",
"version": "1.2.0-prerelease.1",
"author": "Microsoft Corporation",
"license": "MIT",
"engines": {
"vscode": "^0.10.1"
"vscode": "^0.10.7"
},

@@ -21,3 +21,3 @@ "repository": {

"typescript": "^1.6.2",
"vscode": "0.10.x"
"vscode": "next"
},

@@ -30,4 +30,5 @@ "dependencies": {

"compile": "tsc -p ./src",
"watch": "tsc -w -p ./src"
"watch": "tsc -w -p ./src",
"postinstall": "node ./node_modules/vscode/bin/install"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc