Documentation
¶
Overview ¶
Package lsp implements `sonde lsp`, a Language Server Protocol server over stdio for .hurl and .sonde files: diagnostics, completion, hover and formatting. It never sends HTTP requests and reads files only inside the workspace folders.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrExitWithoutShutdown = errors.New("lsp: exit without shutdown")
ErrExitWithoutShutdown is returned by Run when the client sent exit without shutdown first; the process should exit with status 1.
Functions ¶
This section is empty.
Types ¶
type CompletionItem ¶
type CompletionItem struct {
Label string `json:"label"`
Kind int `json:"kind,omitempty"`
Detail string `json:"detail,omitempty"`
Documentation *MarkupContent `json:"documentation,omitempty"`
SortText string `json:"sortText,omitempty"`
FilterText string `json:"filterText,omitempty"`
InsertText string `json:"insertText,omitempty"`
InsertTextFormat int `json:"insertTextFormat,omitempty"`
TextEdit *TextEdit `json:"textEdit,omitempty"`
Tags []int `json:"tags,omitempty"`
}
CompletionItem is one completion proposal.
type Diagnostic ¶
type Diagnostic struct {
Range Range `json:"range"`
Severity int `json:"severity"`
Code string `json:"code,omitempty"`
Source string `json:"source"`
Message string `json:"message"`
Tags []int `json:"tags,omitempty"`
}
Diagnostic is one problem in a document.
type Hover ¶
type Hover struct {
Contents MarkupContent `json:"contents"`
Range *Range `json:"range,omitempty"`
}
Hover is the result of textDocument/hover.
type MarkupContent ¶
MarkupContent is hover or documentation text.
type Options ¶
type Options struct {
// Version is reported in serverInfo.
Version string
// Environ is the process environment: SONDE_ENV selects the default
// environment and HURL_VARIABLE_*/SONDE_VARIABLE_* define variables.
Environ config.Env
}
Options configures a Server.
type Position ¶
Position is a zero-based line and a character offset counted in the negotiated position encoding.