Documentation ¶
Overview ¶
Package lsp contains some sugar for setting up language server protocol servers for vidar to interact with.
Plugins should usually impelement builtin/language.LanguageHook.
For an example implementation, check out the gopls hook in the official golang plugin.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Conn ¶
type Conn interface { // Call will be used to call language server methods on the connection. Call(ctx context.Context, method string, params, result any) error // Notify will be used to send a notification to the server that requires no // response. Notify(ctx context.Context, method string, params any) error // Reset should reconnect to the language server. // // If the language server was launched by vidar (or any input.Action within // vidar), Reset should shut down the server and launch it again. Reset(context.Context) error // Close should disconnect from the language server. // // If the language server was launched by vidar (or any input.Action within // vidar), Close should shut down the server. Close(context.Context) error }
Conn represents a connection to an LSP server. In addition to standard language server semantics, it needs to be able to reset itself, in case the server is acting up.
Click to show internal directories.
Click to hide internal directories.