components

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CursorPos

type CursorPos struct {
	Row int
	Col int
}

type CursorState

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

type Editor

type Editor struct {
	*tview.Box

	Text        rope.RopeNode
	LineIndexes map[int]struct {
		Start int
		End   int
	}
	CurrentLine int
	ScrollX     int

	CurrentDiagnostic chan struct {
		Diagnostics int
		Diagnostic  *protocol.Diagnostic
	}

	PreviousMaxLine int
	// contains filtered or unexported fields
}

func NewEditor

func NewEditor(theme theme.EditorTheme) *Editor

func (*Editor) Draw

func (e *Editor) Draw(screen tcell.Screen)

func (*Editor) InputHandler

func (e *Editor) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))

func (*Editor) NewLspClient

func (e *Editor) NewLspClient() *LspClient

func (*Editor) SetApplication

func (e *Editor) SetApplication(app *tview.Application)

func (*Editor) SetHighlighter

func (e *Editor) SetHighlighter(highlighter highlighter.Highlighter)

func (*Editor) SetLanguageServer

func (e *Editor) SetLanguageServer(ctx context.Context, server protocol.Server)

func (*Editor) SetURI

func (e *Editor) SetURI(uri uri.URI)

func (*Editor) SetWorkspace

func (e *Editor) SetWorkspace(uri uri.URI)

type LanguageProtocol

type LanguageProtocol struct {
	Server protocol.Server
}

type LspClient

type LspClient struct {
	DiagnosticsCount int
	// contains filtered or unexported fields
}

func (*LspClient) ApplyEdit

func (c *LspClient) ApplyEdit(ctx context.Context, params *protocol.ApplyWorkspaceEditParams) (result bool, err error)

func (*LspClient) Configuration

func (c *LspClient) Configuration(ctx context.Context, params *protocol.ConfigurationParams) (result []interface{}, err error)

func (*LspClient) LogMessage

func (c *LspClient) LogMessage(ctx context.Context, params *protocol.LogMessageParams) (err error)

func (*LspClient) Progress

func (c *LspClient) Progress(ctx context.Context, params *protocol.ProgressParams) (err error)

func (*LspClient) PublishDiagnostics

func (c *LspClient) PublishDiagnostics(ctx context.Context, params *protocol.PublishDiagnosticsParams) (err error)

func (*LspClient) RegisterCapability

func (c *LspClient) RegisterCapability(ctx context.Context, params *protocol.RegistrationParams) (err error)

func (*LspClient) ShowMessage

func (c *LspClient) ShowMessage(ctx context.Context, params *protocol.ShowMessageParams) (err error)

func (*LspClient) ShowMessageRequest

func (c *LspClient) ShowMessageRequest(ctx context.Context, params *protocol.ShowMessageRequestParams) (result *protocol.MessageActionItem, err error)

func (*LspClient) Telemetry

func (c *LspClient) Telemetry(ctx context.Context, params interface{}) (err error)

func (*LspClient) UnregisterCapability

func (c *LspClient) UnregisterCapability(ctx context.Context, params *protocol.UnregistrationParams) (err error)

func (*LspClient) WorkDoneProgressCreate

func (c *LspClient) WorkDoneProgressCreate(ctx context.Context, params *protocol.WorkDoneProgressCreateParams) (err error)

func (*LspClient) WorkspaceFolders

func (c *LspClient) WorkspaceFolders(ctx context.Context) (result []protocol.WorkspaceFolder, err error)

type RenderState

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳