Documentation
¶
Index ¶
Constants ¶
View Source
const ( // UnknownKind is a file type we don't know about. UnknownKind = Kind(iota) // Go is a Go source file. Go // Mod is a go.mod file. Mod // Sum is a go.sum file. Sum // Tmpl is a template file. Tmpl // Work is a go.work file. Work // CUE is a CUE source file CUE )
View Source
const ( UnknownAction = Action(iota) Open Change Close Save Create Delete )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Kind ¶
type Kind int
Kind describes the kind of the file in question. It can be one of Go,mod, Sum, or Tmpl.
func KindForLang ¶
KindForLang returns the file kind associated with the given language ID (from protocol.TextDocumentItem.LanguageID), or UnknownKind if the language ID is not recognized.
type Modification ¶
type Modification struct { URI protocol.DocumentURI Action Action // OnDisk is true if a watched file is changed on disk. If true, // Version will be -1 and Text will be nil. OnDisk bool // Version should not be used when the modification is an on-disk // modification. Version int32 // ContentChanges will be nil when they are not supplied, // specifically on textDocument/didClose and for on-disk changes. ContentChanges []protocol.TextDocumentContentChangeEvent // LanguageID is only sent from the language client on // textDocument/didOpen. LanguageID string }
Modification represents a modification to a file.
Click to show internal directories.
Click to hide internal directories.