lib/ruby_lsp/requests/workspace_symbol.rb in ruby-lsp-0.16.6 vs lib/ruby_lsp/requests/workspace_symbol.rb in ruby-lsp-0.17.0
- old
+ new
@@ -37,11 +37,11 @@
# we still return entries defined in gems to allow developers to jump directly to the source
file_path = entry.file_path
next if @global_state.typechecker && not_in_dependencies?(file_path)
# We should never show private symbols when searching the entire workspace
- next if entry.visibility == :private
+ next if entry.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
@@ -77,9 +77,11 @@
Constant::SymbolKind::CONSTANT
when RubyIndexer::Entry::Method
entry.name == "initialize" ? Constant::SymbolKind::CONSTRUCTOR : Constant::SymbolKind::METHOD
when RubyIndexer::Entry::Accessor
Constant::SymbolKind::PROPERTY
+ when RubyIndexer::Entry::InstanceVariable
+ Constant::SymbolKind::FIELD
end
end
end
end
end