leanprover / vscode-lean4

Visual Studio Code extension for the Lean 4 proof assistant
Apache License 2.0
158 stars 48 forks source link

fix: remove invisible doc filtering #491

Closed mhuisi closed 3 months ago

mhuisi commented 3 months ago

This PR removes the last iteration of invisible doc filtering that was introduced in #460, which would sometimes filter visible documents due to event ordering issues with the window.tabGroups API of VS Code.

Fixes #484 and another issue reported at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Server.20crashes.20on.20new.20file/near/447351002.

With the removal of this code, VS Code will now sometimes open invisible documents in the language server. In my testing, this is not much of an issue for the most common kind of invisible documents (Ctrl + hovering over an identifier).

The other issue for which we introduced this handling in the first place was that the VS Code extension would start looping when using Ctrl + Hover (https://github.com/leanprover/lean4/issues/367), but this issue has been resolved separately since we removed the vscode-lean compatibility layer (#426), and so it is not an issue anymore.

For more details, see https://github.com/microsoft/vscode-languageserver-node/issues/848#issuecomment-2185043021.