ruby-lsp
ruby-lsp copied to clipboard
Investigate merging requests
After #238 is in place, it is possible to execute more than one request at the same time if we know they are in the queue. That is, if we have a foldingRange and a documentSymbol request sitting in the queue, we could collect the information about both in a single tree visit.
Investigate the possibility of combining visitors to return multiple responses from the server at once.
One idea: could we have a mechanism for combining visitors?
class CombinedVisitor
def initialize(*visitors)
@visitors = visitors
end
def visit_class(node)
@visitors.each { |v| v.visit_class(node) }
end
...
end