gotools/gopls/internal/server/text_synchronization.go

type ModificationSource

const FromDidOpen

const FromDidChange

const FromDidChangeWatchedFiles

const FromDidSave

const FromDidClose

const FromDidChangeConfiguration

const FromRegenerateCgo

const FromInitialWorkspaceLoad

const FromCheckUpgrades

const FromResetGoModDiagnostics

const FromToggleGCDetails

func (m ModificationSource) String() string {}

func (s *server) DidOpen(ctx context.Context, params *protocol.DidOpenTextDocumentParams) error {}

func (s *server) DidChange(ctx context.Context, params *protocol.DidChangeTextDocumentParams) error {}

// warnAboutModifyingGeneratedFiles shows a warning if a user tries to edit a
// generated file for the first time.
func (s *server) warnAboutModifyingGeneratedFiles(ctx context.Context, uri protocol.DocumentURI) error {}

func (s *server) DidChangeWatchedFiles(ctx context.Context, params *protocol.DidChangeWatchedFilesParams) error {}

func (s *server) DidSave(ctx context.Context, params *protocol.DidSaveTextDocumentParams) error {}

func (s *server) DidClose(ctx context.Context, params *protocol.DidCloseTextDocumentParams) error {}

func (s *server) didModifyFiles(ctx context.Context, modifications []file.Modification, cause ModificationSource) error {}

// needsDiagnosis records the given views as needing diagnosis, returning the
// context and modification id to use for said diagnosis.
//
// Only the keys of viewsToDiagnose are used; the changed files are irrelevant.
func (s *server) needsDiagnosis(ctx context.Context, viewsToDiagnose map[*cache.View][]protocol.DocumentURI) (context.Context, uint64) {}

// DiagnosticWorkTitle returns the title of the diagnostic work resulting from a
// file change originating from the given cause.
func DiagnosticWorkTitle(cause ModificationSource) string {}

func (s *server) changedText(ctx context.Context, uri protocol.DocumentURI, changes []protocol.TextDocumentContentChangeEvent) ([]byte, error) {}

func (s *server) applyIncrementalChanges(ctx context.Context, uri protocol.DocumentURI, changes []protocol.TextDocumentContentChangeEvent) ([]byte, error) {}

// increment counters if any of the completions look like there were used
func (s *server) checkEfficacy(uri protocol.DocumentURI, version int32, change protocol.TextDocumentContentChangePartial) {}

func changeTypeToFileAction(ct protocol.FileChangeType) file.Action {}