Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/improve schema for settings editor #764

Merged
merged 4 commits into from
Mar 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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