File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
packages/jupyterlab-lsp/src Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ export * as SCHEMA from './_schema';
9
9
/** Component- and feature-specific APIs */
10
10
export * from './api' ;
11
11
12
+ import { JSONExt } from '@lumino/coreutils' ;
12
13
import { COMPLETION_THEME_MANAGER } from '@jupyter-lsp/completion-theme' ;
13
14
import { plugin as THEME_MATERIAL } from '@jupyter-lsp/theme-material' ;
14
15
import { plugin as THEME_VSCODE } from '@jupyter-lsp/theme-vscode' ;
@@ -158,13 +159,16 @@ export class LSPExtension {
158
159
let languageServerSettings = ( options . language_servers ||
159
160
{ } ) as TLanguageServerConfigurations ;
160
161
161
- // Add `configuration` as a copy of `serverSettings ` to work with changed name upstream
162
- // Add `rank` as a copy of priority for the same reason.
162
+ // Rename `serverSettings` to `configuration ` to work with changed name upstream,
163
+ // rename `priority` to `rank` for the same reason.
163
164
languageServerSettings = Object . fromEntries (
164
165
Object . entries ( languageServerSettings ) . map ( ( [ key , value ] ) => {
165
- value . configuration = value . serverSettings ;
166
- value . rank = value . priority ;
167
- return [ key , value ] ;
166
+ const copy = JSONExt . deepCopy ( value ) ;
167
+ copy . configuration = copy . serverSettings ;
168
+ copy . rank = copy . priority ;
169
+ delete copy . priority ;
170
+ delete copy . serverSettings ;
171
+ return [ key , copy ] ;
168
172
} )
169
173
) ;
170
174
You can’t perform that action at this time.
0 commit comments