class Solargraph::LanguageServer::Message::Workspace::WorkspaceSymbol

Public Instance Methods

process() click to toggle source
# File lib/solargraph/language_server/message/workspace/workspace_symbol.rb, line 6
def process
  pins = host.query_symbols(params['query'])
  info = pins.map do |pin|
    uri = file_to_uri(pin.location.filename)
    {
      name: pin.name,
      containerName: pin.namespace,
      kind: pin.symbol_kind,
      location: {
        uri: uri,
        range: pin.location.range.to_hash
      },
      deprecated: pin.deprecated?
    }
  end
  set_result info
end