tmls

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: MPL-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package tmls implements a Terramate Language Server (LSP) providing: - Go to Definition: Navigate to symbol definitions including globals, lets, and stack attributes - Find References: Locate all references to a symbol across the workspace - Rename Symbol: Rename symbols with workspace-wide refactoring support - Import Resolution: Follows import chains for global variable resolution

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

func RunServer added in v0.15.1

func RunServer(opts ...Option)

RunServer runs the server as a standalone binary. It should be invoked from main directly, as it will parse arguments and set up global logging.

Types

type Option added in v0.15.1

type Option func(*Server)

Option type for the language server.

func WithHCLOptions added in v0.15.1

func WithHCLOptions(hclOpts ...hcl.Option) Option

WithHCLOptions sets the HCL parser options.

func WithLogger added in v0.15.1

func WithLogger(l zerolog.Logger) Option

WithLogger sets a custom logger.

type Server

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

Server is the Language Server.

func NewServer

func NewServer(conn jsonrpc2.Conn, opts ...Option) *Server

NewServer creates a new language server.

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