lsp

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2021 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Overview

Package lsp implements LSP for gopls.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server implements the protocol.Server interface.

func NewServer

func NewServer(stream jsonrpc2.Stream) *Server

func (*Server) CodeAction

func (*Server) CodeLens

func (s *Server) CodeLens(ctx context.Context, params *protocol.CodeLensParams) ([]protocol.CodeLens, error)

func (*Server) Definition

func (s *Server) Definition(ctx context.Context, params *protocol.DefinitionParams) (protocol.Definition, error)

func (*Server) Diagnose

func (s *Server) Diagnose()

Diagnose runs various checks over a ttcn3 test suite.

From LSP spec:

Diagnostics are "owned" by the server so it is the server's
responsibility to clear them if necessary.

If a language has a project system (for example C#) diagnostics are not
cleared when a file closes.  When a project is opened all diagnostics
for all files are recomputed (or read from a cache).

When a file changes it is the server’s responsibility to re-compute
diagnostics and push them to the client. If the computed set is empty it
has to push the empty array to clear former diagnostics. Newly pushed
diagnostics always replace previously pushed diagnostics. There is no
merging that happens on the client side.

func (*Server) DidChange

func (s *Server) DidChange(ctx context.Context, params *protocol.DidChangeTextDocumentParams) error

func (*Server) DidChangeConfiguration

func (s *Server) DidChangeConfiguration(context.Context, *protocol.DidChangeConfigurationParams) error

func (*Server) DidChangeWatchedFiles

func (s *Server) DidChangeWatchedFiles(context.Context, *protocol.DidChangeWatchedFilesParams) error

func (*Server) DidChangeWorkspaceFolders

func (s *Server) DidChangeWorkspaceFolders(context.Context, *protocol.DidChangeWorkspaceFoldersParams) error

func (*Server) DidClose

func (s *Server) DidClose(ctx context.Context, params *protocol.DidCloseTextDocumentParams) error

func (*Server) DidOpen

func (s *Server) DidOpen(ctx context.Context, params *protocol.DidOpenTextDocumentParams) error

func (*Server) DidSave

func (s *Server) DidSave(ctx context.Context, params *protocol.DidSaveTextDocumentParams) error
func (s *Server) DocumentLink(ctx context.Context, params *protocol.DocumentLinkParams) ([]protocol.DocumentLink, error)

func (*Server) DocumentSymbol

func (s *Server) DocumentSymbol(context.Context, *protocol.DocumentSymbolParams) ([]interface{}, error)

func (*Server) ExecuteCommand

func (s *Server) ExecuteCommand(ctx context.Context, params *protocol.ExecuteCommandParams) (interface{}, error)

func (*Server) Exit

func (s *Server) Exit(ctx context.Context) error

func (*Server) Fatal

func (s *Server) Fatal(ctx context.Context, msg string)

func (*Server) FoldingRange

func (*Server) Hover

func (*Server) Info

func (s *Server) Info(ctx context.Context, msg string)

func (*Server) Initialize

func (s *Server) Initialize(ctx context.Context, params *protocol.ParamInitialize) (*protocol.InitializeResult, error)

func (*Server) Initialized

func (s *Server) Initialized(ctx context.Context, params *protocol.InitializedParams) error

func (*Server) Log

func (s *Server) Log(ctx context.Context, msg string)

func (*Server) LogTrace

func (*Server) NonstandardRequest

func (s *Server) NonstandardRequest(ctx context.Context, method string, params interface{}) (interface{}, error)

func (*Server) Output

func (s *Server) Output(level log.Level, msg string) error

func (*Server) PrepareRename

func (*Server) References

func (*Server) Rename

func (*Server) ResolveCodeLens

func (s *Server) ResolveCodeLens(context.Context, *protocol.CodeLens) (*protocol.CodeLens, error)
func (s *Server) ResolveDocumentLink(context.Context, *protocol.DocumentLink) (*protocol.DocumentLink, error)

func (*Server) SemanticTokensFullDelta

func (s *Server) SemanticTokensFullDelta(context.Context, *protocol.SemanticTokensDeltaParams) (interface{}, error)

func (*Server) Serve

func (s *Server) Serve(ctx context.Context) error

func (*Server) SetTrace

func (s *Server) SetTrace(ctx context.Context, params *protocol.SetTraceParams) error

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

func (*Server) WillSave

func (*Server) WorkDoneProgressCancel

func (s *Server) WorkDoneProgressCancel(context.Context, *protocol.WorkDoneProgressCancelParams) error

type Status

type Status struct {
	Executable string
	Version    string
	PID        int
	Suite      struct {
		Root  string
		Files []string
	}
}

func NewStatus

func NewStatus(suite *ntt.Suite) *Status

Directories

Path Synopsis
Invoke with //go:generate helper/helper -t Server -d protocol/tsserver.go -u lsp -o server_gen.go invoke in internal/lsp
Invoke with //go:generate helper/helper -t Server -d protocol/tsserver.go -u lsp -o server_gen.go invoke in internal/lsp
Package jsonrpc2 is a minimal implementation of the JSON RPC 2 spec.
Package jsonrpc2 is a minimal implementation of the JSON RPC 2 spec.
servertest
Package servertest provides utilities for running tests against a remote LSP server.
Package servertest provides utilities for running tests against a remote LSP server.
Package protocol contains the structs that map directly to the wire format of the "Language Server Protocol".
Package protocol contains the structs that map directly to the wire format of the "Language Server Protocol".

Jump to

Keyboard shortcuts

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