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

List install VS Code extensions as part of --doctor #2396

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 4 additions & 0 deletions exe/ruby-lsp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

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
....

Copy link
Member

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.

system("code --list-extensions --show-versions")

return
end

Expand Down
Loading