lib/ruby_lsp/requests/workspace_symbol.rb in ruby-lsp-0.10.1 vs lib/ruby_lsp/requests/workspace_symbol.rb in ruby-lsp-0.11.0
- old
+ new
@@ -37,14 +37,17 @@
@index.fuzzy_search(@query).filter_map do |entry|
# If the project is using Sorbet, we let Sorbet handle symbols defined inside the project itself and RBIs, but
# we still return entries defined in gems to allow developers to jump directly to the source
file_path = entry.file_path
- if DependencyDetector::HAS_TYPECHECKER && bundle_path && !file_path.start_with?(bundle_path) &&
+ if DependencyDetector.instance.typechecker && bundle_path && !file_path.start_with?(bundle_path) &&
!file_path.start_with?(RbConfig::CONFIG["rubylibdir"])
next
end
+
+ # We should never show private symbols when searching the entire workspace
+ next if entry.visibility == :private
kind = kind_for_entry(entry)
loc = entry.location
# We use the namespace as the container name, but we also use the full name as the regular name. The reason we