Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunServerOnAddress

func RunServerOnAddress(ctx context.Context, addr string, h func(s *Server)) error

    RunServerOnPort starts an LSP server on the given port and does not exit. This function exists for debugging purposes.

    func RunServerOnPort

    func RunServerOnPort(ctx context.Context, port int, h func(s *Server)) error

      RunServerOnPort starts an LSP server on the given port and does not exit. This function exists for debugging purposes.

      Types

      type Server

      type Server struct {
      	Conn *jsonrpc2.Conn
      	// contains filtered or unexported fields
      }

      func NewClientServer

      func NewClientServer(client protocol.Client) *Server

        NewClientServer

        func NewServer

        func NewServer(stream jsonrpc2.Stream) *Server

          NewServer starts an LSP server on the supplied stream, and waits until the stream is closed.

          func (*Server) CodeAction

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

          func (*Server) CodeLens

          func (*Server) CodeLensResolve

          func (s *Server) CodeLensResolve(context.Context, *protocol.CodeLens) (*protocol.CodeLens, error)

          func (*Server) Completion

          func (s *Server) Completion(ctx context.Context, params *protocol.CompletionParams) (*protocol.CompletionList, error)

          func (*Server) CompletionResolve

          func (*Server) Definition

          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 (*Server) DocumentHighlight

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

          func (*Server) DocumentLinkResolve

          func (s *Server) DocumentLinkResolve(context.Context, *protocol.DocumentLink) (*protocol.DocumentLink, error)

          func (*Server) DocumentSymbol

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

          func (*Server) ExecuteCommand

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

          func (*Server) Exit

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

          func (*Server) FoldingRanges

          func (*Server) Formatting

          func (s *Server) Formatting(ctx context.Context, params *protocol.DocumentFormattingParams) ([]protocol.TextEdit, error)

          func (*Server) Hover

          func (*Server) Initialize

          func (*Server) Initialized

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

          func (*Server) RangeFormatting

          func (s *Server) RangeFormatting(ctx context.Context, params *protocol.DocumentRangeFormattingParams) ([]protocol.TextEdit, error)

          func (*Server) References

          func (*Server) Rename

          func (*Server) Run

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

          func (*Server) Shutdown

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

          func (*Server) SignatureHelp

          func (*Server) TypeDefinition

          func (s *Server) TypeDefinition(ctx context.Context, params *protocol.TextDocumentPositionParams) ([]protocol.Location, error)

          func (*Server) WillSave

          Directories

          Path Synopsis
          Package cmd handles the gopls command line.
          Package cmd handles the gopls command line.
          Package diff implements the Myers diff algorithm.
          Package diff implements the Myers diff algorithm.
          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".
          Package source provides core features for use by Go editors and tools.
          Package source provides core features for use by Go editors and tools.