-
Notifications
You must be signed in to change notification settings - Fork 154
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
List install VS Code extensions as part of --doctor
#2396
Conversation
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.
I feel ruby-lsp
's flags should aim for server functionalities. Therefore, --doctor
should focus on diagnosing server issues and listing VS Code-specific output with it doesn't feel quite right.
Also, some users may have code
installed but use other editors (like I used to). And in this case, could having this output be misleading?
But I think it's ok to give it a try first as it's easy to drop if not helpful.
@@ -129,6 +129,10 @@ if options[:doctor] | |||
puts "indexing: #{indexable.full_path}" | |||
index.index_single(indexable) | |||
end | |||
|
|||
# This will fail silently if `code` is not available |
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.
Let's add some of output to make this section's purpose clearer. Something like:
puts
puts "======== VS Code extensions ========"
puts
indexing: /Users/hung-wulo/.gem/ruby/3.3.4/gems/sorbet-runtime-0.5.11481/lib/types/types/union.rb
indexing: /Users/hung-wulo/.gem/ruby/3.3.4/gems/sorbet-runtime-0.5.11481/lib/types/types/untyped.rb
indexing: /Users/hung-wulo/.gem/ruby/3.3.4/gems/sorbet-runtime-0.5.11481/lib/types/utils.rb
======== VS Code extensions ========
aaron-bond.better-comments@3.0.2
alefragnani.project-manager@12.8.0
bierner.markdown-mermaid@1.23.1
....
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.
In addition to that, I think we need some explanation of why this is being shown. It may not be obvious to the user why we're printing their VS Code extensions.
Something along the lines of Having other Ruby related VS Code extensions may conflict with the Ruby LSP's behaviour. Here are the currently installed extensions. Could the problem be coming from a different extension?
.
Also, this will list private extensions too, so we may need some sort of warning indicating that. We wouldn't want people to accidentally paste information about private extensions into issues.
Another idea: should we instead add a Additionally, we can also list users' (By print, I mean maybe writing the output to a blank file (with name like |
Good ideas |
Stock VSCode is surely by far the most popular flavor but there are other like VSCodium https://github.com/VSCodium/vscodium which enjoys some usage. Another plus when delegating this to the extenion since it uses a different binary name and Edit: Code Insiders would probably also fall under this category. |
Doing it in the extension may also allow us to know which extensions are enabled rather than just installed. |
Just a little idea I had: What if we list the extensions as part of
--doctor
to aid with troubleshooting? The intention would be that people can paste this into an issue.