langserver

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeTextEdits

func ComputeTextEdits(unformatted string, formatted string) []lsp.TextEdit

ComputeTextEdits computes text edits that are required to change the `unformatted` to the `formatted` text. Blatantly stolen from https://github.com/sourcegraph/go-langserver/blob/master/langserver/format.go

func Run

func Run(ctx context.Context, stream jsonrpc2.Stream, opts ...interface{}) error

Types

type LangServer

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

func (*LangServer) CodeAction

func (ls *LangServer) CodeAction(ctx context.Context, params *lsp.CodeActionParams) ([]lsp.CodeAction, error)

func (*LangServer) CodeLens

func (ls *LangServer) CodeLens(ctx context.Context, params *lsp.CodeLensParams) ([]lsp.CodeLens, error)

func (*LangServer) CodeLensResolve

func (ls *LangServer) CodeLensResolve(ctx context.Context, params *lsp.CodeLens) (*lsp.CodeLens, error)

func (*LangServer) ColorPresentation

func (ls *LangServer) ColorPresentation(ctx context.Context, params *lsp.ColorPresentationParams) ([]lsp.ColorPresentation, error)

func (*LangServer) Completion

func (ls *LangServer) Completion(ctx context.Context, params *lsp.CompletionParams) (*lsp.CompletionList, error)

func (*LangServer) CompletionResolve

func (ls *LangServer) CompletionResolve(ctx context.Context, params *lsp.CompletionItem) (*lsp.CompletionItem, error)

func (*LangServer) Definition

func (ls *LangServer) Definition(ctx context.Context, params *lsp.TextDocumentPositionParams) ([]lsp.Location, error)

func (*LangServer) Diagnose

func (s *LangServer) Diagnose(ctx context.Context, uri lsp.DocumentURI, text string)

func (*LangServer) DidChange

func (ls *LangServer) DidChange(ctx context.Context, params *lsp.DidChangeTextDocumentParams) error

func (*LangServer) DidChangeConfiguration

func (ls *LangServer) DidChangeConfiguration(ctx context.Context, params *lsp.DidChangeConfigurationParams) error

func (*LangServer) DidChangeWatchedFiles

func (ls *LangServer) DidChangeWatchedFiles(ctx context.Context, params *lsp.DidChangeWatchedFilesParams) error

func (*LangServer) DidChangeWorkspaceFolders

func (ls *LangServer) DidChangeWorkspaceFolders(ctx context.Context, params *lsp.DidChangeWorkspaceFoldersParams) error

func (*LangServer) DidClose

func (ls *LangServer) DidClose(ctx context.Context, params *lsp.DidCloseTextDocumentParams) error

func (*LangServer) DidOpen

func (ls *LangServer) DidOpen(ctx context.Context, params *lsp.DidOpenTextDocumentParams) error

func (*LangServer) DidSave

func (ls *LangServer) DidSave(ctx context.Context, params *lsp.DidSaveTextDocumentParams) error

func (*LangServer) DocumentColor

func (ls *LangServer) DocumentColor(ctx context.Context, params *lsp.DocumentColorParams) ([]lsp.ColorInformation, error)

func (*LangServer) DocumentHighlight

func (ls *LangServer) DocumentHighlight(ctx context.Context, params *lsp.TextDocumentPositionParams) ([]lsp.DocumentHighlight, error)
func (ls *LangServer) DocumentLink(ctx context.Context, params *lsp.DocumentLinkParams) ([]lsp.DocumentLink, error)

func (*LangServer) DocumentLinkResolve

func (ls *LangServer) DocumentLinkResolve(ctx context.Context, params *lsp.DocumentLink) (*lsp.DocumentLink, error)

func (*LangServer) DocumentSymbol

func (ls *LangServer) DocumentSymbol(ctx context.Context, params *lsp.DocumentSymbolParams) ([]lsp.DocumentSymbol, error)

func (*LangServer) ExecuteCommand

func (ls *LangServer) ExecuteCommand(ctx context.Context, params *lsp.ExecuteCommandParams) (interface{}, error)

func (*LangServer) Exit

func (ls *LangServer) Exit(ctx context.Context) error

func (*LangServer) FoldingRanges

func (ls *LangServer) FoldingRanges(ctx context.Context, params *lsp.FoldingRangeRequestParam) ([]lsp.FoldingRange, error)

func (*LangServer) Formatting

func (ls *LangServer) Formatting(ctx context.Context, params *lsp.DocumentFormattingParams) ([]lsp.TextEdit, error)

func (*LangServer) Hover

func (ls *LangServer) Hover(ctx context.Context, params *lsp.TextDocumentPositionParams) (*lsp.Hover, error)

func (*LangServer) Implementation

func (ls *LangServer) Implementation(ctx context.Context, params *lsp.TextDocumentPositionParams) ([]lsp.Location, error)

func (*LangServer) Initialize

func (ls *LangServer) Initialize(ctx context.Context, params *lsp.InitializeParams) (*lsp.InitializeResult, error)

func (*LangServer) Initialized

func (ls *LangServer) Initialized(ctx context.Context, params *lsp.InitializedParams) error

func (*LangServer) OnTypeFormatting

func (ls *LangServer) OnTypeFormatting(ctx context.Context, params *lsp.DocumentOnTypeFormattingParams) ([]lsp.TextEdit, error)

func (*LangServer) RangeFormatting

func (ls *LangServer) RangeFormatting(ctx context.Context, params *lsp.DocumentRangeFormattingParams) ([]lsp.TextEdit, error)

func (*LangServer) References

func (ls *LangServer) References(ctx context.Context, params *lsp.ReferenceParams) ([]lsp.Location, error)

func (*LangServer) Rename

func (ls *LangServer) Rename(ctx context.Context, params *lsp.RenameParams) ([]lsp.WorkspaceEdit, error)

func (*LangServer) Shutdown

func (ls *LangServer) Shutdown(ctx context.Context) error

func (*LangServer) SignatureHelp

func (ls *LangServer) SignatureHelp(ctx context.Context, params *lsp.TextDocumentPositionParams) (*lsp.SignatureHelp, error)

func (*LangServer) Symbols

func (*LangServer) TypeDefinition

func (ls *LangServer) TypeDefinition(ctx context.Context, params *lsp.TextDocumentPositionParams) ([]lsp.Location, error)

func (*LangServer) WillSave

func (ls *LangServer) WillSave(ctx context.Context, params *lsp.WillSaveTextDocumentParams) error

func (*LangServer) WillSaveWaitUntil

func (ls *LangServer) WillSaveWaitUntil(ctx context.Context, params *lsp.WillSaveTextDocumentParams) ([]lsp.TextEdit, error)

type StdioStream

type StdioStream struct {
	Log bool
	// contains filtered or unexported fields
}

func NewStdioStream

func NewStdioStream() *StdioStream

func (*StdioStream) Read

func (s *StdioStream) Read(ctx context.Context) ([]byte, error)

ReadObject implements ObjectCodec.

func (*StdioStream) Write

func (s *StdioStream) Write(ctx context.Context, data []byte) error

Jump to

Keyboard shortcuts

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