ls

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: MIT Imports: 10 Imported by: 1

README

go-ls

🚧 This is Work in Progess, don't use it!

License

MIT © Josa Gesell

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandFn added in v0.2.0

type CommandFn func(ctx RequestContext, args []interface{}) error

type RequestContext

type RequestContext struct {
	Server  Server
	Context context.Context
}

type RootHandler

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

func NewRootHandler added in v0.2.0

func NewRootHandler(server *Server) RootHandler

func (*RootHandler) Initialize

func (*RootHandler) Shutdown

func (h *RootHandler) Shutdown(fn func(RequestContext) error)

type Server

type Server struct {
	VerboseLogging bool

	State *files.State

	Root         RootHandler
	TextDocument TextDocumentHandler
	Workspace    WorkspaceHandler
	// contains filtered or unexported fields
}

func New

func New() *Server

func (*Server) LogRequest

func (s *Server) LogRequest(ctx context.Context, req *jrpc2.Request)

func (*Server) LogResponse

func (s *Server) LogResponse(ctx context.Context, resp *jrpc2.Response)

func (*Server) Start

func (s *Server) Start()

func (*Server) StartAndWait

func (s *Server) StartAndWait() error

func (*Server) Wait

func (s *Server) Wait() error

type TextDocumentHandler

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

func (*TextDocumentHandler) CodeAction

func (*TextDocumentHandler) CodeLens

func (h *TextDocumentHandler) CodeLens(func(RequestContext))

func (*TextDocumentHandler) ColorPresentation

func (h *TextDocumentHandler) ColorPresentation(func(RequestContext))

func (*TextDocumentHandler) Completion

func (*TextDocumentHandler) Declaration

func (h *TextDocumentHandler) Declaration(func(RequestContext))

func (*TextDocumentHandler) Definition

func (h *TextDocumentHandler) Definition(func(RequestContext))

func (*TextDocumentHandler) DidChange

func (*TextDocumentHandler) DidClose

func (*TextDocumentHandler) DidOpen

func (*TextDocumentHandler) DocumentColor

func (h *TextDocumentHandler) DocumentColor(func(RequestContext))

func (*TextDocumentHandler) DocumentHighlight

func (h *TextDocumentHandler) DocumentHighlight(func(RequestContext))
func (h *TextDocumentHandler) DocumentLink(func(RequestContext))

func (*TextDocumentHandler) DocumentSymbol

func (*TextDocumentHandler) FoldingRange

func (*TextDocumentHandler) Formatting

func (*TextDocumentHandler) Hover

func (*TextDocumentHandler) Implementation

func (h *TextDocumentHandler) Implementation(func(RequestContext))

func (*TextDocumentHandler) OnTypeFormatting

func (h *TextDocumentHandler) OnTypeFormatting(func(RequestContext))

func (*TextDocumentHandler) PrepareRename

func (h *TextDocumentHandler) PrepareRename(func(RequestContext))

func (*TextDocumentHandler) PublishDiagnostics

func (h *TextDocumentHandler) PublishDiagnostics(ctx context.Context, vs lsp.PublishDiagnosticsParams) error

func (*TextDocumentHandler) RangeFormatting

func (h *TextDocumentHandler) RangeFormatting(func(RequestContext))

func (*TextDocumentHandler) References

func (h *TextDocumentHandler) References(func(RequestContext))

func (*TextDocumentHandler) RegisterChangesListener added in v0.2.0

func (h *TextDocumentHandler) RegisterChangesListener()

func (*TextDocumentHandler) Rename

func (h *TextDocumentHandler) Rename(func(RequestContext))

func (*TextDocumentHandler) SignatureHelp

func (h *TextDocumentHandler) SignatureHelp(func(RequestContext))

func (*TextDocumentHandler) TypeDefinition

func (h *TextDocumentHandler) TypeDefinition(func(RequestContext))

func (*TextDocumentHandler) WillSaveWaitUntil

func (h *TextDocumentHandler) WillSaveWaitUntil(func(RequestContext))

type WorkspaceHandler

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

func NewWorkspaceHandler added in v0.2.0

func NewWorkspaceHandler(server *Server) WorkspaceHandler

func (*WorkspaceHandler) DidChangeConfiguration

func (h *WorkspaceHandler) DidChangeConfiguration(func(RequestContext))

func (*WorkspaceHandler) DidChangeWatchedFiles

func (h *WorkspaceHandler) DidChangeWatchedFiles(func(RequestContext))

func (*WorkspaceHandler) ExecuteCommand

func (h *WorkspaceHandler) ExecuteCommand(fn func(RequestContext, lsp.ExecuteCommandParams) error)

func (*WorkspaceHandler) RegisterCommand added in v0.2.0

func (h *WorkspaceHandler) RegisterCommand(command string, fn CommandFn)

func (*WorkspaceHandler) Symbol

func (h *WorkspaceHandler) Symbol(func(RequestContext))

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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