go/gopls/internal
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
..
coverage gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
govulncheck
hooks gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
lsp internal/lsp/fake: add rename file support for testing 2022-09-09 15:30:36 +00:00
regtest internal/lsp/fake: add rename file support for testing 2022-09-09 15:30:36 +00:00
vulncheck gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
migrate.sh