Closed Julian closed 2 years ago
I've been abusing :e
for this.
Probably we should keep telling others that's the "official" way to do it -- the reason to have something else just in case would be for someone (yesterday me) having a BufRead
autocmd they're running, in which case hitting :e
will keep triggering it unnecessarily.
Maybe doesn't have to be an exact equivalent of refresh file dependencies, could just be we kill + restart an LSP client.
Yeah, the :e
is not ideal. You also need to do :w
first.
The server expects a didClose followed by a didOpen notification to restart the file worker. Restarting the LSP server is useful as well (and unfortunately not as easy as :LspRestart
), but it restarts all the file workers, which is rarely what you want.
We need a command equivalent of lean4.refreshFileDependencies for telling the Lean server to restart the worker for the current file / refresh building imported files.