Documentation
¶
Index ¶
- Constants
- Variables
- func FromConfigMap(in map[string]config.LSPServer) map[string]ServerSpec
- func Report(edited string, editedDiags []Diagnostic, siblings map[string][]Diagnostic) string
- type Diagnostic
- type Location
- type Manager
- func (m *Manager) Close()
- func (m *Manager) Definition(ctx context.Context, path string, line, col int) ([]Location, error)
- func (m *Manager) DocumentSymbols(ctx context.Context, path string) ([]Symbol, error)
- func (m *Manager) Hover(ctx context.Context, path string, line, col int) (string, error)
- func (m *Manager) References(ctx context.Context, path string, line, col int) ([]Location, error)
- func (m *Manager) Statuses() []Status
- func (m *Manager) WaitDiagnostics(ctx context.Context, path string) string
- func (m *Manager) WorkspaceSymbols(ctx context.Context, path, dir, query string) ([]Symbol, error)
- type ServerSpec
- type Status
- type Symbol
Constants ¶
View Source
const ( SeverityError = 1 SeverityWarning = 2 SeverityInfo = 3 SeverityHint = 4 )
Variables ¶
View Source
var ErrNoServer = errors.New("no language server is configured for this file type")
ErrNoServer reports a file no configured language server handles.
Functions ¶
func FromConfigMap ¶
func FromConfigMap(in map[string]config.LSPServer) map[string]ServerSpec
func Report ¶
func Report(edited string, editedDiags []Diagnostic, siblings map[string][]Diagnostic) string
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(specs map[string]ServerSpec) *Manager
func (*Manager) Definition ¶ added in v0.107.13
Definition returns where the symbol at path:line:col is defined.
func (*Manager) DocumentSymbols ¶ added in v0.107.13
DocumentSymbols returns the outline of path.
func (*Manager) Hover ¶ added in v0.107.13
Hover returns the type information and documentation for the symbol at path:line:col.
func (*Manager) References ¶ added in v0.107.13
References returns every usage of the symbol at path:line:col, its declaration included.
func (*Manager) WaitDiagnostics ¶
func (*Manager) WorkspaceSymbols ¶ added in v0.107.13
WorkspaceSymbols searches symbols by name. path picks the language server (any file of the project); without it every running server whose root contains dir is asked.
type ServerSpec ¶
Click to show internal directories.
Click to hide internal directories.