lsp

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAbs

func IsAbs(path string) bool

IsAbs returns true if the given path is absolute

func IsURI

func IsURI(s golsp.DocumentURI) bool

IsURI tells if s denotes an URI

func IsVendorDir

func IsVendorDir(dir string) bool

IsVendorDir tells if the specified directory is a vendor directory.

func Panicf

func Panicf(r interface{}, format string, v ...interface{}) error

Panicf takes the return value of recover() and outputs data to the log with the stack trace appended. Arguments are handled in the manner of fmt.Printf. Arguments should format to a string which identifies what the panic code was doing. Returns a non-nil error if it recovered from a panic.

func PathEqual

func PathEqual(a, b string) bool

PathEqual returns true if both a and b are equal

func PathHasPrefix

func PathHasPrefix(s, prefix string) bool

PathHasPrefix returns true if s is starts with the given prefix

func PathToURI

func PathToURI(path string) golsp.DocumentURI

PathToURI converts given absolute path to file URI

func PathTrimPrefix

func PathTrimPrefix(s, prefix string) string

PathTrimPrefix removes the prefix from s

func UriToPath

func UriToPath(uri golsp.DocumentURI) string

UriToPath converts given file URI to path

func UriToRealPath

func UriToRealPath(uri golsp.DocumentURI) string

UriToRealPath converts the given file URI to the platform specific path

Types

type Handler

type Handler struct {
	jsonrpc2.Handler
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(logger *zap.Logger) Handler

func (Handler) Handle

func (h Handler) Handle(ctx context.Context, conn *jsonrpc2.Conn, req *jsonrpc2.Request)

Handle implements jsonrpc2.Handler

Jump to

Keyboard shortcuts

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