type Editor …
type CallCounts …
type buffer …
func (b buffer) text() string { … }
type EditorConfig …
func NewEditor(sandbox *Sandbox, config EditorConfig) *Editor { … }
func (e *Editor) Connect(ctx context.Context, connector servertest.Connector, hooks ClientHooks) (*Editor, error) { … }
func DelayedHandler(maxDelay time.Duration, handler jsonrpc2.Handler) jsonrpc2.Handler { … }
func (e *Editor) Stats() CallCounts { … }
func (e *Editor) Shutdown(ctx context.Context) error { … }
func (e *Editor) Exit(ctx context.Context) error { … }
func (e *Editor) Close(ctx context.Context) error { … }
func (e *Editor) Client() *Client { … }
func makeSettings(sandbox *Sandbox, config EditorConfig, scopeURI *protocol.URI) map[string]any { … }
func (e *Editor) initialize(ctx context.Context) error { … }
func clientCapabilities(cfg EditorConfig) (protocol.ClientCapabilities, error) { … }
func (e *Editor) ServerCapabilities() protocol.ServerCapabilities { … }
func marshalUnmarshal[T any](v any) (T, error) { … }
func (e *Editor) HasCommand(cmd command.Command) bool { … }
var uriRE …
func makeWorkspaceFolders(sandbox *Sandbox, paths []string) (folders []protocol.WorkspaceFolder) { … }
func (e *Editor) onFileChanges(ctx context.Context, evts []protocol.FileEvent) { … }
func (e *Editor) OpenFile(ctx context.Context, path string) error { … }
func toWindowsLineEndings(content []byte) []byte { … }
func (e *Editor) CreateBuffer(ctx context.Context, path, content string) error { … }
func (e *Editor) createBuffer(ctx context.Context, path string, dirty bool, content []byte) error { … }
func (e *Editor) textDocumentItem(buf buffer) protocol.TextDocumentItem { … }
func (e *Editor) sendDidOpen(ctx context.Context, item protocol.TextDocumentItem) error { … }
var defaultFileAssociations …
func languageID(p string, fileAssociations map[string]string) protocol.LanguageKind { … }
func (e *Editor) CloseBuffer(ctx context.Context, path string) error { … }
func (e *Editor) sendDidClose(ctx context.Context, doc protocol.TextDocumentIdentifier) error { … }
func (e *Editor) DocumentURI(path string) protocol.DocumentURI { … }
func (e *Editor) TextDocumentIdentifier(path string) protocol.TextDocumentIdentifier { … }
func (e *Editor) SaveBuffer(ctx context.Context, path string) error { … }
func (e *Editor) SaveBufferWithoutActions(ctx context.Context, path string) error { … }
var ErrNoMatch …
var ErrUnknownBuffer …
func regexpLocation(mapper *protocol.Mapper, re string) (protocol.Location, error) { … }
func (e *Editor) RegexpSearch(bufName, re string) (protocol.Location, error) { … }
func (e *Editor) RegexpReplace(ctx context.Context, path, re, replace string) error { … }
func (e *Editor) EditBuffer(ctx context.Context, path string, edits []protocol.TextEdit) error { … }
func (e *Editor) SetBufferContent(ctx context.Context, path, content string) error { … }
func (e *Editor) HasBuffer(name string) bool { … }
func (e *Editor) BufferText(name string) (string, bool) { … }
func (e *Editor) Mapper(name string) (*protocol.Mapper, error) { … }
func (e *Editor) BufferVersion(name string) int { … }
func (e *Editor) editBufferLocked(ctx context.Context, path string, edits []protocol.TextEdit) error { … }
func (e *Editor) setBufferContentLocked(ctx context.Context, path string, dirty bool, content []byte, fromEdits []protocol.TextEdit) error { … }
func (e *Editor) Definition(ctx context.Context, loc protocol.Location) (protocol.Location, error) { … }
func (e *Editor) TypeDefinition(ctx context.Context, loc protocol.Location) (protocol.Location, error) { … }
func (e *Editor) extractFirstLocation(ctx context.Context, locs []protocol.Location) (protocol.Location, error) { … }
func (e *Editor) Symbol(ctx context.Context, query string) ([]protocol.SymbolInformation, error) { … }
func (e *Editor) OrganizeImports(ctx context.Context, path string) error { … }
func (e *Editor) RefactorRewrite(ctx context.Context, loc protocol.Location) error { … }
func (e *Editor) ApplyQuickFixes(ctx context.Context, loc protocol.Location, diagnostics []protocol.Diagnostic) error { … }
func (e *Editor) ApplyCodeAction(ctx context.Context, action protocol.CodeAction) error { … }
func (e *Editor) Diagnostics(ctx context.Context, path string) ([]protocol.Diagnostic, error) { … }
func (e *Editor) GetQuickFixes(ctx context.Context, loc protocol.Location, diagnostics []protocol.Diagnostic) ([]protocol.CodeAction, error) { … }
func (e *Editor) applyCodeActions(ctx context.Context, loc protocol.Location, diagnostics []protocol.Diagnostic, only ...protocol.CodeActionKind) (int, error) { … }
func (e *Editor) CodeActions(ctx context.Context, loc protocol.Location, diagnostics []protocol.Diagnostic, only ...protocol.CodeActionKind) ([]protocol.CodeAction, error) { … }
func (e *Editor) ExecuteCodeLensCommand(ctx context.Context, path string, cmd command.Command, result any) error { … }
func (e *Editor) ExecuteCommand(ctx context.Context, params *protocol.ExecuteCommandParams, result any) error { … }
func (e *Editor) FormatBuffer(ctx context.Context, path string) error { … }
func (e *Editor) checkBufferLocation(loc protocol.Location) error { … }
func (e *Editor) RunGenerate(ctx context.Context, dir string) error { … }
func (e *Editor) CodeLens(ctx context.Context, path string) ([]protocol.CodeLens, error) { … }
func (e *Editor) Completion(ctx context.Context, loc protocol.Location) (*protocol.CompletionList, error) { … }
func (e *Editor) SetSuggestionInsertReplaceMode(_ context.Context, useReplaceMode bool) { … }
func (e *Editor) AcceptCompletion(ctx context.Context, loc protocol.Location, item protocol.CompletionItem) error { … }
func (e *Editor) Symbols(ctx context.Context, sym string) ([]protocol.SymbolInformation, error) { … }
func (e *Editor) InlayHint(ctx context.Context, path string) ([]protocol.InlayHint, error) { … }
func (e *Editor) References(ctx context.Context, loc protocol.Location) ([]protocol.Location, error) { … }
func (e *Editor) Rename(ctx context.Context, loc protocol.Location, newName string) error { … }
func (e *Editor) Implementations(ctx context.Context, loc protocol.Location) ([]protocol.Location, error) { … }
func (e *Editor) SignatureHelp(ctx context.Context, loc protocol.Location) (*protocol.SignatureHelp, error) { … }
func (e *Editor) RenameFile(ctx context.Context, oldPath, newPath string) error { … }
func (e *Editor) renameBuffers(oldPath, newPath string) (closed []protocol.TextDocumentIdentifier, opened []protocol.TextDocumentItem, _ error) { … }
func (e *Editor) applyWorkspaceEdit(ctx context.Context, wsedit *protocol.WorkspaceEdit) error { … }
func (e *Editor) applyTextDocumentEdit(ctx context.Context, change protocol.TextDocumentEdit) error { … }
func (e *Editor) Config() EditorConfig { … }
func (e *Editor) SetConfig(cfg EditorConfig) { … }
func (e *Editor) ChangeConfiguration(ctx context.Context, newConfig EditorConfig) error { … }
func (e *Editor) ChangeWorkspaceFolders(ctx context.Context, folders []string) error { … }
func (e *Editor) CodeAction(ctx context.Context, loc protocol.Location, diagnostics []protocol.Diagnostic, trigger protocol.CodeActionTriggerKind) ([]protocol.CodeAction, error) { … }
func (e *Editor) EditResolveSupport() (bool, error) { … }
func (e *Editor) Hover(ctx context.Context, loc protocol.Location) (*protocol.MarkupContent, protocol.Location, error) { … }
func (e *Editor) DocumentLink(ctx context.Context, path string) ([]protocol.DocumentLink, error) { … }
func (e *Editor) DocumentHighlight(ctx context.Context, loc protocol.Location) ([]protocol.DocumentHighlight, error) { … }
func (e *Editor) SemanticTokensFull(ctx context.Context, path string) ([]SemanticToken, error) { … }
func (e *Editor) SemanticTokensRange(ctx context.Context, loc protocol.Location) ([]SemanticToken, error) { … }
type SemanticToken …
func (e *Editor) interpretTokens(x []uint32, contents string) []SemanticToken { … }