Help us shape the future of Go! Take the 2026 Go Developer Survey

editor

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package editor is the code editor area of the native desktop: a file explorer, open-file tabs, a code editor (MyGo ui/editor, with find bar, folding, multi-cursor and syntax highlighting), image/PDF viewers and a status bar. It reaches parity with web-ui/src/components/editor (Monaco) over the same /api/v1/files endpoints.

LSP: Pando exposes no diagnostics/hover/completion over the HTTP API (the language servers live in the agent's process and feed the agent only), so the editor shows syntax highlighting but no LSP hints. The hooks (State.SetDiagnostics, OnHover, OnCompletion) are ready for when an endpoint exists.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Editor

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

Editor is the area's state; every field belongs to the UI thread.

func New

func New(a *app.Context) *Editor

New returns the editor view.

func (*Editor) Build

func (e *Editor) Build(c *ui.Context, r *ui.Route)

Build lays out explorer | tabs + editor, and the status bar.

func (*Editor) Close

func (e *Editor) Close()

Close stops background work.

func (*Editor) HeaderActions

func (e *Editor) HeaderActions(c *ui.Context)

HeaderActions adds Save, New file and the explorer toggles to the header.

func (*Editor) Open

func (e *Editor) Open(p string)

Open opens (or focuses) a file of the working directory.

func (*Editor) Title

func (e *Editor) Title() string

Title is the header title.

Jump to

Keyboard shortcuts

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