lsp

package
v1.1.41 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hover

func Hover(ctx context.Context, workspace, path string, pos Position) (string, error)

Types

type CodeAction

type CodeAction struct {
	Title   string
	Kind    string
	Command string
	Edits   []FileEdit
}

func CodeActions

func CodeActions(ctx context.Context, workspace, path string, rng Range) ([]CodeAction, error)

type Diagnostic

type Diagnostic struct {
	Severity int
	Message  string
	Range    Range
	Source   string
}

func Diagnostics

func Diagnostics(ctx context.Context, workspace, path string) ([]Diagnostic, error)

type FileEdit

type FileEdit struct {
	Path  string
	Edits []TextEdit
}

func RenameEdits

func RenameEdits(ctx context.Context, workspace, path string, pos Position, newName string) ([]FileEdit, error)

type InstallOption added in v1.1.26

type InstallOption struct {
	ID          string
	Label       string
	Binary      string
	Command     string
	Recommended bool
}

type LanguageStatus

type LanguageStatus struct {
	ID             string
	DisplayName    string
	Available      bool
	Binary         string
	InstallHint    string
	InstallOptions []InstallOption
	Evidence       []string
}

type Location

type Location struct {
	Path  string
	Range Range
}

func Definition

func Definition(ctx context.Context, workspace, path string, pos Position) ([]Location, error)

func References

func References(ctx context.Context, workspace, path string, pos Position) ([]Location, error)

type Position

type Position struct {
	Line      int
	Character int
}

type Range

type Range struct {
	Start Position
	End   Position
}

type ResolvedServer

type ResolvedServer struct {
	LanguageID  string
	DisplayName string
	Binary      string
	Args        []string
	InstallHint string
}

func ResolveServerForFile

func ResolveServerForFile(workspace, path string) (ResolvedServer, bool)

func ResolveServerForWorkspace

func ResolveServerForWorkspace(workspace string) (ResolvedServer, bool)

type Symbol

type Symbol struct {
	Name string
	Kind int
	Range
}

func DocumentSymbols

func DocumentSymbols(ctx context.Context, workspace, path string) ([]Symbol, error)

type TextEdit

type TextEdit struct {
	Range   Range
	NewText string
}

type WorkspaceStatus

type WorkspaceStatus struct {
	Workspace string
	Languages []LanguageStatus
}

func DetectWorkspaceStatus

func DetectWorkspaceStatus(workspace string) WorkspaceStatus

type WorkspaceSymbol

type WorkspaceSymbol struct {
	Name string
	Kind int
	Path string
	Range
}

func WorkspaceSymbols

func WorkspaceSymbols(ctx context.Context, workspace, query string) ([]WorkspaceSymbol, error)

Jump to

Keyboard shortcuts

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