1
0
mirror of https://github.com/golang/go synced 2024-11-18 19:54:44 -07:00
go/internal/lsp/cache
Rebecca Stambler 5e752206af internal/lsp: don't clear file contents on save
CL 212037 introduced a bug with saving overlays. Since VS Code sends nil
contents for a file on save, we were deleting overlay contents on save.
This resulted in very strange behavior.

Also rename overlay.data to overlay.text to match variable names.

Fixes golang/go#36224

Change-Id: I7f2d12e369aa7f6daa2c9f36c33468ec6bf61930
Reviewed-on: https://go-review.googlesource.com/c/tools/+/212199
Reviewed-by: Michael Matloob <matloob@golang.org>
2019-12-19 23:08:27 +00:00
..
analysis.go internal/lsp/cache: move overlay and debug handling into separate files 2019-12-18 19:17:43 +00:00
builtin.go internal/lsp/cache: move overlay and debug handling into separate files 2019-12-18 19:17:43 +00:00
cache.go internal/lsp: return snapshots from text modifications 2019-12-18 22:53:40 +00:00
check.go internal/lsp/cache: detach context before invalidation 2019-12-19 21:23:07 +00:00
debug.go internal/lsp: don't clear file contents on save 2019-12-19 23:08:27 +00:00
error_test.go internal/lsp: refactor error handling code in type-checking 2019-10-21 18:57:46 +00:00
errors.go internal/lsp/cache: move overlay and debug handling into separate files 2019-12-18 19:17:43 +00:00
external.go internal/lsp: use versioned URIs in rename and code actions 2019-11-13 05:52:40 +00:00
file.go internal/lsp: eliminate source.File type and move GetFile to snapshot 2019-12-19 20:51:25 +00:00
load.go internal/lsp: put verbose go/packages output behind verboseOutput flag 2019-12-19 19:20:50 +00:00
modfiles.go internal/lsp: add gopls setting to disable use of -modfile flag behavior 2019-12-19 18:11:24 +00:00
overlay.go internal/lsp: don't clear file contents on save 2019-12-19 23:08:27 +00:00
parse_mod.go internal/lsp: create parseModHandle for storing go.mod data 2019-12-13 22:03:54 +00:00
parse.go internal/lsp: create parseModHandle for storing go.mod data 2019-12-13 22:03:54 +00:00
pkg.go internal/lsp: set version correctly after textDocument/didOpen 2019-11-25 19:35:51 +00:00
session.go internal/lsp/cache: consolidate function to update overlays 2019-12-19 21:06:08 +00:00
snapshot.go internal/lsp: eliminate source.File type and move GetFile to snapshot 2019-12-19 20:51:25 +00:00
view.go internal/lsp/cache: detach context before invalidation 2019-12-19 21:23:07 +00:00