| // Copyright 2023 The Go Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| import "golang.org/x/tools/gopls/internal/lsp/protocol" |
| // Modification represents a modification to a file. |
| type Modification struct { |
| // OnDisk is true if a watched file is changed on disk. |
| // If true, Version will be -1 and Text will be nil. |
| // Version will be -1 and Text will be nil when they are not supplied, |
| // specifically on textDocument/didClose and for on-disk changes. |
| // LanguageID is only sent from the language client on textDocument/didOpen. |
| // An Action is a type of file state change. |
| UnknownAction = Action(iota) |
| func (a Action) String() string { |