Documentation
¶
Index ¶
- Constants
- type CommandHandler
- type Server
- func (s *Server) CodeLens(conn protocol.Conn, params *protocol.CodeLensParams) ([]*protocol.CodeLens, error)
- func (s *Server) Definition(_ protocol.Conn, params *protocol.TextDocumentPositionParams) (*protocol.Location, error)
- func (s *Server) DidChangeTextDocument(conn protocol.Conn, params *protocol.DidChangeTextDocumentParams) error
- func (s *Server) DidOpenTextDocument(conn protocol.Conn, params *protocol.DidOpenTextDocumentParams) error
- func (s *Server) ExecuteCommand(conn protocol.Conn, params *protocol.ExecuteCommandParams) (interface{}, error)
- func (*Server) Exit(_ protocol.Conn) error
- func (s *Server) Hover(_ protocol.Conn, params *protocol.TextDocumentPositionParams) (*protocol.Hover, error)
- func (s *Server) Initialize(conn protocol.Conn, params *protocol.InitializeParams) (*protocol.InitializeResult, error)
- func (*Server) Shutdown(conn protocol.Conn) error
- func (s *Server) SignatureHelp(_ protocol.Conn, _ *protocol.TextDocumentPositionParams) (*protocol.SignatureHelp, error)
- func (s *Server) Start()
Constants ¶
const ( CommandSubmitTransaction = "cadence.server.submitTransaction" CommandExecuteScript = "cadence.server.executeScript" CommandUpdateAccountCode = "cadence.server.updateAccountCode" CommandCreateAccount = "cadence.server.createAccount" CommandCreateDefaultAccounts = "cadence.server.createDefaultAccounts" CommandSwitchActiveAccount = "cadence.server.switchActiveAccount" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandHandler ¶
CommandHandler represents the form of functions that handle commands submitted from the client using workspace/executeCommand.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) CodeLens ¶
func (s *Server) CodeLens(conn protocol.Conn, params *protocol.CodeLensParams) ([]*protocol.CodeLens, error)
CodeLens is called every time the document contents change and returns a list of actions to be injected into the source as inline buttons.
func (*Server) Definition ¶
func (s *Server) Definition( _ protocol.Conn, params *protocol.TextDocumentPositionParams, ) (*protocol.Location, error)
Definition finds the definition of the type at the given location.
func (*Server) DidChangeTextDocument ¶
func (s *Server) DidChangeTextDocument( conn protocol.Conn, params *protocol.DidChangeTextDocumentParams, ) error
DidChangeTextDocument is called whenever the current document changes. We parse and check the text and publish diagnostics about the document.
func (*Server) DidOpenTextDocument ¶
func (s *Server) DidOpenTextDocument(conn protocol.Conn, params *protocol.DidOpenTextDocumentParams) error
DidOpenTextDocument is called whenever a new file is opened. We parse and check the text and publish diagnostics about the document.
func (*Server) ExecuteCommand ¶
func (s *Server) ExecuteCommand(conn protocol.Conn, params *protocol.ExecuteCommandParams) (interface{}, error)
ExecuteCommand is called to execute a custom, server-defined command.
We register all the commands we support in registerCommands and populate their corresponding handler at server initialization.
func (*Server) Hover ¶
func (s *Server) Hover( _ protocol.Conn, params *protocol.TextDocumentPositionParams, ) (*protocol.Hover, error)
Hover returns contextual type information about the variable at the given location.
func (*Server) Initialize ¶
func (s *Server) Initialize( conn protocol.Conn, params *protocol.InitializeParams, ) ( *protocol.InitializeResult, error, )
func (*Server) Shutdown ¶
Shutdown tells the server to stop accepting any new requests. This can only be followed by a call to Exit, which exits the process.
func (*Server) SignatureHelp ¶
func (s *Server) SignatureHelp( _ protocol.Conn, _ *protocol.TextDocumentPositionParams, ) (*protocol.SignatureHelp, error)
TODO