Documentation
¶
Index ¶
- func Hover(ctx context.Context, workspace, path string, pos Position) (string, error)
- func IsInstallable(languageID, workspace string) bool
- func ServerOverrides() map[string]config.LSPServerConfig
- func SetServerOverrides(overrides map[string]config.LSPServerConfig)
- type CallHierarchyCall
- type CallHierarchyItem
- type CodeAction
- type Diagnostic
- type FileEdit
- type InstallOption
- type InstallScope
- type LanguageStatus
- type Location
- type Position
- type Range
- type ResolvedServer
- type Symbol
- type TextEdit
- type WorkspaceStatus
- type WorkspaceSymbol
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsInstallable ¶ added in v1.3.76
IsInstallable returns true if the language has at least one install option whose command is a real install (not just an error message).
func ServerOverrides ¶ added in v1.3.76
func ServerOverrides() map[string]config.LSPServerConfig
ServerOverrides returns the currently configured server overrides.
func SetServerOverrides ¶ added in v1.3.76
func SetServerOverrides(overrides map[string]config.LSPServerConfig)
SetServerOverrides configures custom LSP server binary paths and arguments. Pass the config.LSPServers map (or nil to clear overrides).
Types ¶
type CallHierarchyCall ¶ added in v1.1.45
type CallHierarchyCall struct {
From CallHierarchyItem
To CallHierarchyItem // only populated for outgoing calls
FromRanges []Range
}
CallHierarchyCall represents a caller or callee in the call hierarchy.
func IncomingCalls ¶ added in v1.1.45
func IncomingCalls(ctx context.Context, workspace string, item CallHierarchyItem) ([]CallHierarchyCall, error)
IncomingCalls returns callers of the given call hierarchy item. Uses item.Path to re-acquire the LSP session for the file's language.
func OutgoingCalls ¶ added in v1.1.45
func OutgoingCalls(ctx context.Context, workspace string, item CallHierarchyItem) ([]CallHierarchyCall, error)
OutgoingCalls returns callees of the given call hierarchy item.
type CallHierarchyItem ¶ added in v1.1.45
type CallHierarchyItem struct {
Name string
Kind int
Detail string
Path string
Range Range
// contains filtered or unexported fields
}
CallHierarchyItem represents a call hierarchy item returned by the LSP server.
func PrepareCallHierarchy ¶ added in v1.1.45
func PrepareCallHierarchy(ctx context.Context, workspace, path string, pos Position) ([]CallHierarchyItem, error)
PrepareCallHierarchy prepares call hierarchy items for the symbol at pos.
type CodeAction ¶
func CodeActions ¶
type Diagnostic ¶
func Diagnostics ¶
func Diagnostics(ctx context.Context, workspace, path string) ([]Diagnostic, error)
type InstallOption ¶ added in v1.1.26
type InstallOption struct {
ID string
Label string
Binary string
Command string
Recommended bool
Scope InstallScope
}
func GetInstallOptions ¶ added in v1.3.76
func GetInstallOptions(languageID, workspace string) []InstallOption
GetInstallOptions returns the available install options for a language ID. Returns nil if the language is not recognized or has no install path.
type InstallScope ¶ added in v1.3.76
type InstallScope string
InstallScope indicates the installation scope.
const ( ScopeUser InstallScope = "user" // Installed to user's home directory ScopeGlobal InstallScope = "global" // System-wide installation ScopeProject InstallScope = "project" // Installed inside the project directory )
type LanguageStatus ¶
type Location ¶
func Definition ¶
func Implementation ¶ added in v1.1.45
Implementation finds implementations of the symbol at pos using textDocument/implementation.
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 WorkspaceStatus ¶
type WorkspaceStatus struct {
Workspace string
Languages []LanguageStatus
}
func DetectWorkspaceStatus ¶
func DetectWorkspaceStatus(workspace string) WorkspaceStatus
type WorkspaceSymbol ¶
func WorkspaceSymbols ¶
func WorkspaceSymbols(ctx context.Context, workspace, query string) ([]WorkspaceSymbol, error)