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

include lsp_utils settings in LSP #2395

Merged
merged 1 commit into from
Jan 20, 2024
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
8 changes: 8 additions & 0 deletions Default.sublime-commands
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@
"default": "// SublimeText base scope -> LSP Language ID overrides\n{\n\t// \"source.mylanguage\": \"mylang\"\n\t$0\n}\n"
}
},
{
"caption": "Preferences: LSP Utils Settings",
"command": "edit_settings",
"args": {
"base_file": "${packages}/LSP/lsp_utils.sublime-settings",
"default": "// Settings in here override those in \"LSP/lsp_utils.sublime-settings\"\n{\n\t$0\n}\n"
}
},
{
"caption": "LSP Development: Parse VSCode Package JSON From Clipboard",
"command": "lsp_parse_vscode_package_json"
Expand Down
14 changes: 14 additions & 0 deletions lsp_utils.sublime-settings
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
// Specifies the type and priority of the Node.js installation that should be used for Node.js-based servers.
// The allowed values are:
// - 'system' - a Node.js runtime found on the PATH
// - 'local' - a Node.js runtime managed by LSP that doesn't affect the system
// The order in which the values are specified determines which one is tried first,
// with the later one being used as a fallback.
// You can also specify just a single value to disable the fallback.
"nodejs_runtime": ["system", "local"],
// Uses Node.js runtime from the Electron package rather than the official distribution. This has the benefit of
// lower memory usage due to it having the pointer compression (https://v8.dev/blog/pointer-compression) enabled.
// Only relevant when using `local` variant of `nodejs_runtime`.
"local_use_electron": false,
}
36 changes: 36 additions & 0 deletions sublime-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,42 @@
"additionalProperties": false
}
},
{
"file_patterns": [
"/lsp_utils.sublime-settings"
],
"schema": {
"type": "object",
"properties": {
"nodejs_runtime": {
"type": "array",
"markdownDescription": "Specifies the type and priority of the Node.js installation that should be used for Node.js-based servers.\n\nThe allowed values are:\n\n- `system` - a Node.js runtime found on the PATH\n- `local` - a Node.js runtime managed by LSP that doesn't affect the system\n\nThe order in which the values are specified determines which one is tried first,\nwith the later one being used as a fallback.\nYou can also specify just a single value to disable the fallback.",
"default": [
"system",
"local",
],
"items": {
"type": "string",
"enum": [
"system",
"local"
],
"markdownEnumDescriptions": [
"Node.js runtime found on the PATH",
"Node.js runtime managed by LSP"
]
},
"uniqueItems": true,
},
"local_use_electron": {
"type": "boolean",
"default": false,
"markdownDescription": "Uses Node.js runtime from the Electron package rather than the official distribution. This has the benefit of lower memory usage due to it having the [pointer compression](https://v8.dev/blog/pointer-compression) enabled.\n\nOnly relevant when using `local` variant of `nodejs_runtime`."
}
},
"additionalProperties": false,
}
},
{
"file_patterns": [
"/Preferences.sublime-settings"
Expand Down