go/gopls/internal/regtest
Robert Findley eeaf4eb24c internal/lsp/fake: add rename file support for testing
This CL implements the fake.Editor.RenameFile method, which mimic's the
behavior of VS Code when renaming files. Specifically:
- open buffers affected by the renaming are closed, and then reopened
  with new URIs
- files are moved on disk
- didChangeWatchedFile notifications are sent

Along the way, add missing comments and fix one place where the editor
mutex was held while sending notifications (in Editor.CreateBuffer).
Generally, the editor should not hold any mutex while making a remote
call.

For golang/go#41567

Change-Id: I2abfa846e923de566a21c096502a68f125e7e671
Reviewed-on: https://go-review.googlesource.com/c/tools/+/427903
Auto-Submit: Robert Findley <rfindley@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-09-09 15:30:36 +00:00
..
bench gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
codelens gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
completion gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
debug gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
diagnostics gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
inlayhints gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
misc internal/lsp/fake: add rename file support for testing 2022-09-09 15:30:36 +00:00
modfile gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
template gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
watch gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
workspace gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00