Documentation
¶
Index ¶
- Constants
- Variables
- func HoverMarkdown(hover analyze.Hover) string
- func Init(ctx context.Context, log zerolog.Logger, config Config) error
- func PathToURI(path string) string
- func ReadMessage(reader *bufio.Reader) ([]byte, error)
- func UriToPath(value string) (string, error)
- type Config
- type Server
- type ServerOpt
Constants ¶
const ( ErrCodeInternal = -32603 ErrCodeJSONUnmarshalReqParams = -32602 )
const (
SkipHidden string = "<.hidden>"
)
Variables ¶
var ( // ErrUnsupportedURIScheme is returned by uriToPath when the URI has a scheme // that the LSP server does not handle (e.g. "git", "untitled"). Callers // that receive this error from a notification handler should silently ignore // the request rather than terminating the server. ErrUnsupportedURIScheme = errors.New("unsupported URI scheme") ErrMessageJsonParse = errors.New("json parse failure") )
var ( ErrFailedToStartTCP = errors.New(name + ": Failed to start TCP server") ErrFailedToStartStdio = errors.New(name + ": Failed to start stdio server") )
Functions ¶
func HoverMarkdown ¶
HoverMarkdown formats the hover information into a markdown string suitable for display in the LSP client - i.e. an IDE
NOTE: more formatting options may be added in the future.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server defines the language server that implements the Language Server Protocol (LSP) for eirctl.
type ServerOpt ¶
type ServerOpt func(*Server)