Skip to content

Commit fdb1d35

Browse files
committed
Clean up lodash import, nest serverSettings
1 parent 2b19066 commit fdb1d35

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{
2-
"dependencies": {
3-
"lodash": "^4.17.15"
4-
},
2+
"dependencies": {},
53
"devDependencies": {
64
"bash-language-server": "^1.6.1",
75
"dockerfile-language-server-nodejs": "^0.0.22",

packages/jupyterlab-lsp/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
},
3838
"dependencies": {
3939
"@krassowski/jupyterlab_go_to_definition": "~1.0.0",
40+
"lodash": "^4.17.15",
4041
"lsp-ws-connection": "~0.4.0"
4142
},
4243
"devDependencies": {

packages/jupyterlab-lsp/schema/plugin.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@
2424
"description": "Client and server configurations for a single language server",
2525
"type": "object",
2626
"default": {},
27-
"patternProperties": {
28-
"^.*$": {
29-
"anyOf": [
30-
{"type": "string"},
31-
{"type": "boolean"}
32-
]
33-
}
27+
"properties": {
28+
"serverSettings": {
29+
"title": "Language Server Configurations",
30+
"description": "Configuration to be sent to language server over LSP when initialized: see the specific language server's documentation for more",
31+
"type": "object",
32+
"default": {}
33+
}
3434
}
3535
}
3636
},

packages/jupyterlab-lsp/src/utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import _ from 'lodash';
21
import { PageConfig } from '@jupyterlab/coreutils';
2+
import merge from 'lodash/merge';
33

44
const RE_PATH_ANCHOR = /^file:\/\/([^\/]+|\/[A-Z]:)/;
55

@@ -140,7 +140,7 @@ export function uri_to_contents_path(child: string, parent?: string) {
140140
* as the language servers themselves don't accept that syntax.
141141
*/
142142
const vscodeStyleSettingParser = (settingString: string, value: any) => {
143-
const propArr: any = settingString.split('.');
143+
const propArr = settingString.split('.');
144144
const obj: any = {};
145145

146146
let curr = obj;
@@ -163,5 +163,5 @@ export const vscodeStyleSettingsParser = (settingsObject: any) => {
163163
const parsed = vscodeStyleSettingParser(setting, settingsObject[setting]);
164164
settings.push(parsed);
165165
}
166-
return _.merge({}, ...settings);
166+
return merge({}, ...settings);
167167
};

0 commit comments

Comments
 (0)