Documentation ¶
Overview ¶
Package ls provides test utilities used when testing the Terramate Language Server.
Index ¶
- func DefaultInitializeResult() lsp.InitializeResult
- type Editor
- func (e *Editor) Change(path, content string)
- func (e *Editor) CheckInitialize(workspace string)
- func (e *Editor) Command(cmd lsp.ExecuteCommandParams) (interface{}, error)
- func (e *Editor) Handler(ctx context.Context, reply jsonrpc2.Replier, r jsonrpc2.Request) error
- func (e *Editor) Initialize(workspace string) lsp.InitializeResult
- func (e *Editor) Open(path string)
- type Fixture
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultInitializeResult ¶
func DefaultInitializeResult() lsp.InitializeResult
DefaultInitializeResult is the default server response for the initialization request.
Types ¶
type Editor ¶
type Editor struct { // Requests that arrived at the editor. Requests chan jsonrpc2.Request // contains filtered or unexported fields }
Editor is the editor server.
func (*Editor) CheckInitialize ¶
CheckInitialize sends an initialize request to the language server and checks if the response is the expected default response (See DefaultInitializeResult).
func (*Editor) Command ¶ added in v0.4.4
func (e *Editor) Command(cmd lsp.ExecuteCommandParams) (interface{}, error)
Command invokes the provided command in the LSP server.
func (*Editor) Initialize ¶
func (e *Editor) Initialize(workspace string) lsp.InitializeResult
Initialize sends a initialize request to the language server and return its result.
Click to show internal directories.
Click to hide internal directories.