Documentation ¶
Index ¶
- func EmptyParseFunc(string, *gotextdiff.TextEdit) (interface{}, bool)
- type Entry
- type Overlay
- func (o *Overlay) Close(u uri.URI)
- func (o *Overlay) Current(u uri.URI) *Entry
- func (o *Overlay) Parsed(u uri.URI) *Entry
- func (o *Overlay) Replace(u uri.URI, version int64, data string, parse ParseFunc, done UpdateFunc)
- func (o *Overlay) Update(u uri.URI, version int64, edits []gotextdiff.TextEdit, parse ParseFunc, ...)
- type ParseFunc
- type UpdateFunc
- type UpdateResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EmptyParseFunc ¶
func EmptyParseFunc(string, *gotextdiff.TextEdit) (interface{}, bool)
Types ¶
type Overlay ¶
type Overlay struct {
// contains filtered or unexported fields
}
func NewOverlay ¶
func NewOverlay() *Overlay
func (*Overlay) Update ¶
func (o *Overlay) Update(u uri.URI, version int64, edits []gotextdiff.TextEdit, parse ParseFunc, done UpdateFunc)
type ParseFunc ¶
type ParseFunc func(contents string, lastEdit *gotextdiff.TextEdit) (data interface{}, ok bool)
This function is used to parse the file that was just updated. It will be called for every item of a batch update. `lastEdit` may be set as the last edit made in the update.
type UpdateFunc ¶
type UpdateFunc func(UpdateResult)
UpdateFunc will be called at the end of an update batch. Calls to this callback for each individual file are linearized under a lock. Holding this lock may be useful for batching updates, f.ex waiting until diagnostics are done before returning.
type UpdateResult ¶
Click to show internal directories.
Click to hide internal directories.