langserver

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateInstance

func CreateInstance(service server.Service, opts *jrpc2.ServerOptions) (*instance.ServerInstance, error)

CreateInstance will instantiate a JSON-RPC server

Types

type LanguageServer

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

LanguageServer contains definitions of JSON-RPC options, context, and logger to be used when instantiating a new language server

func New

func New(ctx context.Context, sessionFactory session.Factory) *LanguageServer

New instantiates a language server to be used in a JSON-RPC context

func (*LanguageServer) SetLogger

func (s *LanguageServer) SetLogger(logger *log.Logger)

SetLogger will overwrite the current logger of the language server instance

func (*LanguageServer) StartAndWait

func (s *LanguageServer) StartAndWait(reader io.Reader, writer io.WriteCloser) error

StartAndWait will start a new language server

func (*LanguageServer) StartTCP

func (s *LanguageServer) StartTCP(addr string) error

StartTCP will start a language server in TCP mode

Directories

Path Synopsis
uri
Package textdocument is a slim wrapper around lsp.TextDocumentItem that contains useful methods such as PositionAt See: https://github.com/microsoft/vscode-languageserver-node/blob/master/textDocument/src/main.ts
Package textdocument is a slim wrapper around lsp.TextDocumentItem that contains useful methods such as PositionAt See: https://github.com/microsoft/vscode-languageserver-node/blob/master/textDocument/src/main.ts

Jump to

Keyboard shortcuts

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