-
Notifications
You must be signed in to change notification settings - Fork 263
Restore window scope for several workspace specific settings #4120
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -131,7 +131,7 @@ | |
| { | ||
| "command": "rubyLsp.selectRubyVersionManager", | ||
| "title": "Select Ruby version manager", | ||
| "category": "Ruby LSP" | ||
| "category": "Ruby LSP", | ||
| }, | ||
| { | ||
| "command": "rubyLsp.toggleFeatures", | ||
|
|
@@ -389,6 +389,7 @@ | |
| }, | ||
| "rubyLsp.rubyVersionManager": { | ||
| "type": "object", | ||
| "scope": "window", | ||
| "properties": { | ||
| "identifier": { | ||
| "description": "The Ruby version manager to use", | ||
|
|
@@ -440,7 +441,7 @@ | |
| "rubyLsp.customRubyCommand": { | ||
| "description": "A shell command to activate the right Ruby version or add a custom Ruby bin folder to the PATH. Only used if rubyVersionManager is set to 'custom'", | ||
| "type": "string", | ||
| "scope": "machine" | ||
| "scope": "window" | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is safe to use window scope because untrusted workspace cannot execute command thanks to capabilities.untrustedWorkspaces options.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure if this one makes sense to not be machine dependent. I know some people use a custom ruby command to add their own activation script, but I don't think this is something we want to support going forward.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When someone resorts to custom rubyVersionManager, it is likely that they need something adhoc with maximum flexiblity and it is not unusual that solution differs from one project to another. If Ruby LSP forces machine scope here, they have to maintain a lines of single shell script with mixed concerns from different, independent projects. I believe it makes Ruby LSP less convenient to use. I feel clicking the "trust this workspace" button should be treated as "I know what I'm doing", and if they seriously care about security, they can prepare sandboxed environment outside of VS Code (and I think it would be the way to go as it is more generic solution not tied to IDE). I will investigate if there is VS Code API that allows develops to customize the trust workspace popup to notice them that users should be pay extra attention to .vscode directory. |
||
| }, | ||
| "rubyLsp.formatter": { | ||
| "description": "Which tool the Ruby LSP should use for formatting files", | ||
|
|
@@ -478,7 +479,7 @@ | |
| "rubyLsp.bundleGemfile": { | ||
| "description": "Relative or absolute path to the Gemfile to use for bundling the Ruby LSP server. Do not use this if you're working on a monorepo or your project's Gemfile is in a subdirectory (look into multiroot workspaces instead). Only necessary when using a separate Gemfile for the Ruby LSP", | ||
| "type": "string", | ||
| "scope": "machine", | ||
| "scope": "window", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this should be window. @alexcrocha what was the reason to make it machine dependent? It is for sure a per-project config.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I agree. It shouldn't have been bundled with the other changes and we should relax it |
||
| "default": "" | ||
| }, | ||
| "rubyLsp.testTimeout": { | ||
|
|
@@ -509,7 +510,7 @@ | |
| "rubyLsp.rubyExecutablePath": { | ||
| "description": "Path to the Ruby installation. This is used as a fallback if version manager activation fails", | ||
| "type": "string", | ||
| "scope": "machine" | ||
| "scope": "window" | ||
| }, | ||
| "rubyLsp.indexing": { | ||
| "description": "Indexing configurations. Modifying these will impact which declarations are available for definition, completion and other features", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ruby version manager could be different depending on workspaces.