tmls

package
v0.10.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2024 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package tmls implements a Terramate Language Server (LSP).

Index

Constants

View Source
const (
	ErrUnrecognizedCommand        errors.Kind = "terramate-ls: unknown command"
	ErrCreateStackUnrecognizedArg errors.Kind = "terramate-ls: terramate.createStack: unrecognized argument"
	ErrCreateStackNoArguments     errors.Kind = "terramate-ls: terramate.createStack requires at least 1 argument"
	ErrCreateStackInvalidArgument errors.Kind = "terramate-ls: terramate.createStack: invalid argument"
	ErrCreateStackMissingRequired errors.Kind = "terramate-ls: terramate.createStack: missing required argument"
	ErrCreateStackFailed          errors.Kind = "terramate-ls: terramate.createStack failed"
)

Errors created by the commands handling.

View Source
const MethodExecuteCommand = "workspace/executeCommand"

MethodExecuteCommand is the LSP method name for invoking server commands.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server is the Language Server.

func NewServer

func NewServer(conn jsonrpc2.Conn) *Server

NewServer creates a new language server.

func ServerWithLogger

func ServerWithLogger(conn jsonrpc2.Conn, l zerolog.Logger) *Server

ServerWithLogger creates a new language server with a custom logger.

func (*Server) Handler

func (s *Server) Handler(ctx context.Context, reply jsonrpc2.Replier, r jsonrpc2.Request) error

Handler handles the client requests.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL