acme-lsp
acme-lsp copied to clipboard
Watch for changed files
When files are changed outside of acme (e.g. git branch change), gopls
currently doesn't update its cache. We should implement workspace/didChangeWatchedFiles when gopls supports it (issue https://github.com/golang/go/issues/31553).
We may want to have a temporary workaround for gopls
. Perhaps just watch for all matching (.go) files in the workspaces?
I just ran into this issue. Is the only solution to restart gopls at the moment?
fyi, I asked on the gopls channel in slack, and apparently file watching is on the roadmap for gopls.
You can execute Get
in the window to reload the file in gopls
. That usually works if the set of files didn't change, but if you add/remove files, gopls
might get so confused that you need to restart it.
From the looks of the issue mentioned, this now works in gopls.