package file
import "cuelang.org/go/internal/golangorgx/gopls/file"
Index ¶
Constants ¶
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 )
Types ¶
type Action ¶
type Action int
An Action is a type of file state change.
func (Action) String ¶
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.
func (Kind) String ¶
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.
Source Files ¶
kind.go modification.go
- Version
- v0.15.1 (latest)
- Published
- Nov 21, 2025
- Platform
- linux/amd64
- Imports
- 2 packages
- Last checked
- 4 months ago –
Tools for package owners.