Skip to content

Commit

Permalink
Merge pull request #764 from jupyter-lsp/fix-schema
Browse files Browse the repository at this point in the history
Fix/improve schema for settings editor
  • Loading branch information
krassowski authored Mar 20, 2022
2 parents 4ca2dba + dec3433 commit ad61495
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 34 deletions.
68 changes: 36 additions & 32 deletions packages/jupyterlab-lsp/schema/completion.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,13 @@
"description": "The time to wait for the kernel completions suggestions in milliseconds. Set to 0 to disable kernel completions, or to -1 to wait indefinitely (not recommended)."
},
"disableCompletionsFrom": {
"title": "Disable completions by source",
"description": "The sources from which to exclude completion from. Possible values include 'Kernel', 'LSP'.",
"type": "array",
"items": {
"type": "string",
"enum": ["Kernel", "LSP"]
},
"default": [],
"uniqueItems": true
},
Expand All @@ -62,6 +67,7 @@
"kernelCompletionsFirst": {
"title": "Prioritize completions from kernel",
"default": false,
"type": "boolean",
"description": "In case of ties when sorting completions, should the kernel completions receive higher priority than the language server completions?"
},
"caseSensitive": {
Expand Down Expand Up @@ -110,38 +116,36 @@
"undefinitializer": "Constant",
"base.devnull": "Constant"
},
"patternProperties": {
"^.*$": {
"type": "string",
"enum": [
"Kernel",
"Text",
"Method",
"Function",
"Constructor",
"Field",
"Variable",
"Class",
"Interface",
"Module",
"Property",
"Unit",
"Value",
"Enum",
"Keyword",
"Snippet",
"Color",
"File",
"Reference",
"Folder",
"EnumMember",
"Constant",
"Struct",
"Event",
"Operator",
"TypeParameter"
]
}
"additionalProperties": {
"type": "string",
"enum": [
"Kernel",
"Text",
"Method",
"Function",
"Constructor",
"Field",
"Variable",
"Class",
"Interface",
"Module",
"Property",
"Unit",
"Value",
"Enum",
"Keyword",
"Snippet",
"Color",
"File",
"Reference",
"Folder",
"EnumMember",
"Constant",
"Struct",
"Event",
"Operator",
"TypeParameter"
]
}
},
"disable": {
Expand Down
1 change: 1 addition & 0 deletions packages/jupyterlab-lsp/schema/highlights.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"title": "Debouncer delay",
"type": "number",
"default": 250,
"minimum": 0,
"description": "Number of milliseconds to delay sending out the highlights request to the language server; you can get better responsiveness adjusting this value, but setting it to zero can actually slow it down as the server might get overwhelmed when moving the cursor."
},
"removeOnBlur": {
Expand Down
2 changes: 2 additions & 0 deletions packages/jupyterlab-lsp/schema/hover.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@
"title": "Throttler delay",
"type": "number",
"default": 50,
"minimum": 0,
"description": "Number of milliseconds to delay sending out the hover request to the language server; you can get better responsiveness adjusting this value, but setting it to zero can actually slow it down as the server might get overwhelmed when moving the mouse over the code."
},
"cacheSize": {
"title": "Cache size",
"type": "number",
"default": 25,
"minimum": 0,
"description": "Up to how many hover responses should be cached at any given time. The cache being is invalidated after any change in the editor."
},
"disable": {
Expand Down
4 changes: 2 additions & 2 deletions packages/jupyterlab-lsp/schema/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"type": "object",
"definitions": {
"language-server": {
"title": "Language Server",
"description": "Client and server configurations for a single language server",
"type": "object",
"default": {},
Expand All @@ -15,7 +14,8 @@
"title": "Language Server Configurations",
"description": "Configuration to be sent to language server over LSP when initialized: see the specific language server's documentation for more",
"type": "object",
"default": {}
"default": {},
"additionalProperties": true
},
"priority": {
"title": "Priority of the server",
Expand Down
2 changes: 2 additions & 0 deletions packages/jupyterlab-lsp/schema/syntax_highlighting.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
"title": "Threshold of foreign code coverage for changing the mode in an editor",
"type": "number",
"default": 0.5,
"minimum": 0,
"maximum": 1,
"description": "If a code editor includes a code fragment in another language (for example a %%markdown magic in IPython) with appropriate foreign code extractor defined, and the extend of this code (coverage of the editor) passes the threshold, the syntax highlighting (i.e. the mode) will change to provide highlighting for the language of the foreign code."
},
"disable": {
Expand Down

0 comments on commit ad61495

Please sign in to comment.