Skip to content

Commit

Permalink
include lsp_utils settings in LSP (#2395)
Browse files Browse the repository at this point in the history
  • Loading branch information
rchl authored Jan 20, 2024
1 parent 2910042 commit 7458bf8
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
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

0 comments on commit 7458bf8

Please sign in to comment.