LSP: Reuse stale parsers in request

This commit is contained in:
HolonProduction
2026-01-09 13:58:13 +01:00
parent 4089843d13
commit 9d90a6794c
2 changed files with 16 additions and 15 deletions
@@ -78,10 +78,10 @@ private:
~LSPeer();
private:
// We can't cache parsers for scripts not managed by the editor since we have
// no way to invalidate the cache. We still need to keep track of those parsers
// to clean them up properly.
HashMap<String, ExtendGDScriptParser *> stale_parsers;
void clear_stale_parsers();
// Paths of parsers which we can't cache longterm.
// Can be cleared up using `clear_stale_parsers()`.
HashSet<String> stale_parsers;
};
enum LSPErrorCode {