bufls

package
v0.0.0-...-8e42e5e Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "0.0.1-dev"

Version is the CLI version of bufls.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine interface {
	Definition(context.Context, Location) (Location, error)
}

Engine is a Protobuf language server engine.

This is used by both the Handler that speaks the LSP, as well as the bufls sub-commands (e.g. 'bufls definition').

func NewEngine

func NewEngine(
	logger *zap.Logger,
	container appflag.Container,
	moduleConfigReader bufwire.ModuleConfigReader,
	moduleFileSetBuilder bufmodulebuild.ModuleFileSetBuilder,
	imageBuilder bufimagebuild.Builder,
) Engine

NewEngine returns a new Protobuf language server engine.

type Handler

type Handler interface {
	protocol.Server
}

Handler is a Protobuf language server handler.

For details, see https://github.com/golang/tools/tree/master/internal/lsp/protocol/typescript

func NewHandler

func NewHandler(logger *zap.Logger, engine Engine) Handler

NewHandler returns a new Handler.

type Location

type Location interface {
	fmt.Stringer

	// Path is the unnormalized path of this location.
	Path() string
	// Line is the line number of the location.
	Line() int
	// Column is the column number of the location.
	Column() int
}

Location is a source code location.

func ParseLocation

func ParseLocation(location string) (Location, error)

ParseLocation parses a <filename>:<line>:<column> into a Location.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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