watcher

package
v0.0.0-...-df5614f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileWatcher

type FileWatcher struct {
	// contains filtered or unexported fields
}

FileWatcher is a simple in-memory file watcher that keeps track of files that were changed but not saved.

func NewFileWatcher

func NewFileWatcher() *FileWatcher

func (*FileWatcher) IsDirty

func (w *FileWatcher) IsDirty(uri sglsp.DocumentURI) bool

IsDirty returns true if the file has unsaved changes.

func (*FileWatcher) SetFileAsChanged

func (w *FileWatcher) SetFileAsChanged(uri sglsp.DocumentURI)

SetFileAsChanged marks the file as having unsaved changes. Calling SetFileAsSaved will mark the file as "clean" again.

func (*FileWatcher) SetFileAsSaved

func (w *FileWatcher) SetFileAsSaved(uri sglsp.DocumentURI)

SetFileAsSaved marks the file as "clean".

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL