Documentation
¶
Index ¶
- Constants
- Variables
- type Option
- type Server
- func (s *Server) ApplyModelEdit(params *applyModelEditParams) (*applyModelEditResult, error)
- func (s *Server) CodeAction(ctx context.Context, params *protocol.CodeActionParams) ([]protocol.CodeAction, error)
- func (s *Server) CodeLens(ctx context.Context, params *protocol.CodeLensParams) ([]protocol.CodeLens, error)
- func (Server) CodeLensRefresh(ctx context.Context) error
- func (s *Server) CodeLensResolve(ctx context.Context, lens *protocol.CodeLens) (*protocol.CodeLens, error)
- func (Server) ColorPresentation(ctx context.Context, params *protocol.ColorPresentationParams) ([]protocol.ColorPresentation, error)
- func (s *Server) Completion(ctx context.Context, params *protocol.CompletionParams) (*protocol.CompletionList, error)
- func (Server) CompletionResolve(ctx context.Context, params *protocol.CompletionItem) (*protocol.CompletionItem, error)
- func (s *Server) DebugAdvance(params *debugAdvanceParams) (*debugSnapshot, error)
- func (s *Server) DebugBreakpoints(params *debugBreakpointsParams) (*debugSnapshot, error)
- func (s *Server) DebugContinue(params *debugSessionParams) (*debugSnapshot, error)
- func (s *Server) DebugSend(params *debugSendParams) (*debugSnapshot, error)
- func (s *Server) DebugStart(params *debugStartParams) (*debugSnapshot, error)
- func (s *Server) DebugStep(params *debugSessionParams) (*debugSnapshot, error)
- func (s *Server) DebugStop(params *debugSessionParams) (*debugSnapshot, error)
- func (Server) Declaration(ctx context.Context, params *protocol.DeclarationParams) ([]protocol.Location, error)
- func (s *Server) Definition(ctx context.Context, params *protocol.DefinitionParams) ([]protocol.Location, error)
- func (s *Server) DidChange(ctx context.Context, params *protocol.DidChangeTextDocumentParams) error
- func (s *Server) DidChangeConfiguration(ctx context.Context, params *protocol.DidChangeConfigurationParams) error
- func (s *Server) DidChangeWatchedFiles(ctx context.Context, params *protocol.DidChangeWatchedFilesParams) error
- func (s *Server) DidChangeWorkspaceFolders(ctx context.Context, params *protocol.DidChangeWorkspaceFoldersParams) error
- func (s *Server) DidClose(ctx context.Context, params *protocol.DidCloseTextDocumentParams) error
- func (Server) DidCreateFiles(ctx context.Context, params *protocol.CreateFilesParams) error
- func (Server) DidDeleteFiles(ctx context.Context, params *protocol.DeleteFilesParams) error
- func (s *Server) DidOpen(ctx context.Context, params *protocol.DidOpenTextDocumentParams) error
- func (Server) DidRenameFiles(ctx context.Context, params *protocol.RenameFilesParams) error
- func (s *Server) DidSave(ctx context.Context, params *protocol.DidSaveTextDocumentParams) error
- func (Server) DocumentColor(ctx context.Context, params *protocol.DocumentColorParams) ([]protocol.ColorInformation, error)
- func (Server) DocumentHighlight(ctx context.Context, params *protocol.DocumentHighlightParams) ([]protocol.DocumentHighlight, error)
- func (Server) DocumentLink(ctx context.Context, params *protocol.DocumentLinkParams) ([]protocol.DocumentLink, error)
- func (Server) DocumentLinkResolve(ctx context.Context, params *protocol.DocumentLink) (*protocol.DocumentLink, error)
- func (s *Server) DocumentSymbol(ctx context.Context, params *protocol.DocumentSymbolParams) ([]interface{}, error)
- func (s *Server) Documents() *documentsResult
- func (Server) ExecuteCommand(ctx context.Context, params *protocol.ExecuteCommandParams) (interface{}, error)
- func (s *Server) Exit(ctx context.Context) error
- func (s *Server) ExitCode() int
- func (Server) FoldingRanges(ctx context.Context, params *protocol.FoldingRangeParams) ([]protocol.FoldingRange, error)
- func (s *Server) Formatting(ctx context.Context, params *protocol.DocumentFormattingParams) ([]protocol.TextEdit, error)
- func (s *Server) Hover(ctx context.Context, params *protocol.HoverParams) (*protocol.Hover, error)
- func (Server) Implementation(ctx context.Context, params *protocol.ImplementationParams) ([]protocol.Location, error)
- func (Server) IncomingCalls(ctx context.Context, params *protocol.CallHierarchyIncomingCallsParams) ([]protocol.CallHierarchyIncomingCall, error)
- func (s *Server) Initialize(ctx context.Context, params *protocol.InitializeParams) (*protocol.InitializeResult, error)
- func (s *Server) Initialized(ctx context.Context, params *protocol.InitializedParams) error
- func (s *Server) InlayHint(params *inlayHintParams) ([]inlayHint, error)
- func (Server) LinkedEditingRange(ctx context.Context, params *protocol.LinkedEditingRangeParams) (*protocol.LinkedEditingRanges, error)
- func (Server) LogTrace(ctx context.Context, params *protocol.LogTraceParams) error
- func (Server) Moniker(ctx context.Context, params *protocol.MonikerParams) ([]protocol.Moniker, error)
- func (Server) OnTypeFormatting(ctx context.Context, params *protocol.DocumentOnTypeFormattingParams) ([]protocol.TextEdit, error)
- func (Server) OutgoingCalls(ctx context.Context, params *protocol.CallHierarchyOutgoingCallsParams) ([]protocol.CallHierarchyOutgoingCall, error)
- func (Server) PrepareCallHierarchy(ctx context.Context, params *protocol.CallHierarchyPrepareParams) ([]protocol.CallHierarchyItem, error)
- func (s *Server) PrepareRename(ctx context.Context, params *protocol.PrepareRenameParams) (*protocol.Range, error)
- func (s *Server) RangeFormatting(ctx context.Context, params *protocol.DocumentRangeFormattingParams) ([]protocol.TextEdit, error)
- func (s *Server) References(ctx context.Context, params *protocol.ReferenceParams) ([]protocol.Location, error)
- func (s *Server) Rename(ctx context.Context, params *protocol.RenameParams) (*protocol.WorkspaceEdit, error)
- func (s *Server) Render(params *renderParams) (*renderResult, error)
- func (s *Server) RenderDocument(params *renderDocumentParams) (*renderDocumentResult, error)
- func (Server) Request(ctx context.Context, method string, params interface{}) (interface{}, error)
- func (s *Server) Run(ctx context.Context, rwc io.ReadWriteCloser) error
- func (s *Server) SemanticTokensFull(ctx context.Context, params *protocol.SemanticTokensParams) (*protocol.SemanticTokens, error)
- func (Server) SemanticTokensFullDelta(ctx context.Context, params *protocol.SemanticTokensDeltaParams) (interface{}, error)
- func (s *Server) SemanticTokensRange(ctx context.Context, params *protocol.SemanticTokensRangeParams) (*protocol.SemanticTokens, error)
- func (Server) SemanticTokensRefresh(ctx context.Context) error
- func (Server) SetTrace(ctx context.Context, params *protocol.SetTraceParams) error
- func (Server) ShowDocument(ctx context.Context, params *protocol.ShowDocumentParams) (*protocol.ShowDocumentResult, error)
- func (s *Server) Shutdown(ctx context.Context) error
- func (s *Server) SignatureHelp(ctx context.Context, params *protocol.SignatureHelpParams) (*protocol.SignatureHelp, error)
- func (s *Server) StdlibContent(params *stdlibContentParams) (*stdlibContentResult, error)
- func (s *Server) Symbols(ctx context.Context, params *protocol.WorkspaceSymbolParams) ([]protocol.SymbolInformation, error)
- func (Server) TypeDefinition(ctx context.Context, params *protocol.TypeDefinitionParams) ([]protocol.Location, error)
- func (s *Server) Views(params *viewsParams) *viewsResult
- func (Server) WillCreateFiles(ctx context.Context, params *protocol.CreateFilesParams) (*protocol.WorkspaceEdit, error)
- func (Server) WillDeleteFiles(ctx context.Context, params *protocol.DeleteFilesParams) (*protocol.WorkspaceEdit, error)
- func (Server) WillRenameFiles(ctx context.Context, params *protocol.RenameFilesParams) (*protocol.WorkspaceEdit, error)
- func (Server) WillSave(ctx context.Context, params *protocol.WillSaveTextDocumentParams) error
- func (Server) WillSaveWaitUntil(ctx context.Context, params *protocol.WillSaveTextDocumentParams) ([]protocol.TextEdit, error)
- func (Server) WorkDoneProgressCancel(ctx context.Context, params *protocol.WorkDoneProgressCancelParams) error
Constants ¶
const ( // MethodDebugStart renders the view, runs the target in a runtime built from // the workspace as it is now, and answers the initial snapshot. MethodDebugStart = "opensysml/debug/start" // MethodDebugStep advances the session by one step: one token move of an // action, or one event, change or do-round of a state machine. MethodDebugStep = "opensysml/debug/step" // MethodDebugContinue runs until the behavior completes, waits, reaches a // breakpoint or exhausts its budget, holding the clock where it is. MethodDebugContinue = "opensysml/debug/continue" // MethodDebugSend posts a signal to the behavior; the next step delivers it. MethodDebugSend = "opensysml/debug/send" // MethodDebugAdvance moves the runtime's clock forward, dispatching what // falls due on the way. MethodDebugAdvance = "opensysml/debug/advance" // MethodDebugBreakpoints replaces the session's breakpoints with the nodes // named, by render ID. MethodDebugBreakpoints = "opensysml/debug/breakpoints" // MethodDebugStop ends the session and releases its runtime. MethodDebugStop = "opensysml/debug/stop" // MethodDebugChanged notifies the client of a session a document change // moved to new render IDs or ended. MethodDebugChanged = "opensysml/debugChanged" )
The debug service runs the behavior a rendering draws and reports where it stands in that rendering's IDs, so a client can overlay the run on its drawing.
const ( // MethodDocuments lists the document definitions the workspace holds. MethodDocuments = "opensysml/documents" // MethodRenderDocument renders a named document definition as Markdown. MethodRenderDocument = "opensysml/renderDocument" )
The custom methods a document-preview client speaks, alongside the diagram methods in render.go.
const ( EditSetValue = "setValue" EditRename = "rename" EditAddMember = "addMember" EditAddConnection = "addConnection" EditAddSequence = "addSequence" EditDelete = "delete" EditMove = "move" EditSetLayout = "setLayout" EditSetRoute = "setRoute" EditSetCanvas = "setCanvas" EditSetStyle = "setStyle" )
The operation kinds a modelEditOperation names.
const ( // MethodRender renders a view of a document, or an element directly. MethodRender = "opensysml/render" // MethodViews lists the views a document declares. MethodViews = "opensysml/views" // MethodRenderChanged tells a client the renderings of a document are out of // date. It carries no artifact: the client pulls a fresh one. MethodRenderChanged = "opensysml/renderChanged" )
The custom methods a diagram client speaks. They are not in the protocol, so they are dispatched ahead of the library's own handler.
const CrossDocumentCapability = "openSysmlCrossDocumentLayout"
CrossDocumentCapability is the experimental capability a client and the server each advertise when they speak the cross-document diagram contract: renderings naming other documents' declarations and layouts pinned with declaredIn.
const LibraryScheme = "sysml-stdlib"
LibraryScheme is the URI scheme the server gives the bundled standard library: `sysml-stdlib:///<path>`, where the path is the file's path inside the library (`Kernel Libraries/Kernel Semantic Library/Base.kerml`), percent-encoded. A client opens one through the opensysml/stdlibContent request; the documents are read-only.
const MethodApplyModelEdit = "opensysml/applyModelEdit"
MethodApplyModelEdit turns diagram actions into a WorkspaceEdit the client applies to the document and to every other document the edit reached: the server rewrites nothing itself.
const MethodStdlibContent = "opensysml/stdlibContent"
MethodStdlibContent serves the text of a bundled library document by its sysml-stdlib URI, which is how a client opens one.
const RenderFormsCapability = "openSysmlRenderForms"
RenderFormsCapability is the experimental capability whose value lists the forms opensysml/render writes, so a client offers exactly those.
const RenderOverlaysCapability = "openSysmlRenderOverlays"
RenderOverlaysCapability is the experimental capability whose value lists the overlays a render request's `overlay` draws over a requirement rendering.
const RenderPaletteCapability = "openSysmlRenderPalette"
RenderPaletteCapability is the experimental capability the server advertises when a render request's palette colours the result's nodes with fill and border.
const RenderPortsCapability = "openSysmlRenderPorts"
RenderPortsCapability is the experimental capability whose value lists the port displays a render request's `ports` draws an interconnection or mixed rendering's parts with, the first the default; a server without it draws every port.
const RenderStylesCapability = "openSysmlRenderStyles"
RenderStylesCapability is the experimental capability whose value lists the drawing styles a render request's `style` draws the DOT or Mermaid form in, the first the default; a server without it draws the Pilot look alone.
Variables ¶
var ( // ErrDebugSession reports a request naming no live session. ErrDebugSession = errors.New("no such debug session") // ErrDebugTarget reports a target no debugger can run. ErrDebugTarget = errors.New("cannot debug target") // ErrDebugNode reports a breakpoint on a node the rendering does not draw. ErrDebugNode = errors.New("no such node in the session's rendering") // ErrDebugSignal reports a signal the behavior would not take. ErrDebugSignal = errors.New("signal refused") // ErrDebugEnded reports a request on a session that has ended. ErrDebugEnded = errors.New("debug session has ended") // ErrDebugTime reports an advance by something other than a finite duration. ErrDebugTime = errors.New("invalid duration") )
Typed errors the debug requests answer.
Functions ¶
This section is empty.
Types ¶
type Option ¶ added in v0.10.0
type Option func(*Server)
Option configures a Server at construction.
func WithVersion ¶ added in v0.10.0
WithVersion sets the version initialize reports in serverInfo, which is the version of the binary serving: the one its -version flag prints.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the SysML v2 language server. It wraps a single model.Workspace and serves the Language Server Protocol over a jsonrpc2 stream.
func NewServer ¶
NewServer returns a Server bound to ws; without WithVersion it reports an unversioned build.
func (*Server) ApplyModelEdit ¶
ApplyModelEdit answers opensysml/applyModelEdit: the edits that make the document say what the operations ask, or why it cannot. The document is read at the version the client named; any other version is reported stale, since an edit computed against text the client no longer has would land wrong. The other documents a rename, a delete or a layout operation reaches are read at the versions the server holds, which their edits carry; a document read for a target's declaration and left as it was carries its version with no edits, so that the client refuses the edit once that document has moved on too.
func (*Server) CodeAction ¶
func (s *Server) CodeAction(ctx context.Context, params *protocol.CodeActionParams) ([]protocol.CodeAction, error)
CodeAction answers the code actions for a range: the quick fixes attached to its diagnostics and the opt-in identity rewrites of the declaration under it.
func (*Server) CodeLens ¶
func (s *Server) CodeLens(ctx context.Context, params *protocol.CodeLensParams) ([]protocol.CodeLens, error)
CodeLens answers the lenses of a document: a reference count on each definition, resolved on demand, and a Run or Evaluate command on each executable action, state, calc, constraint and requirement declaration that is not a step of another behavior.
func (Server) CodeLensRefresh ¶
func (*Server) CodeLensResolve ¶
func (s *Server) CodeLensResolve(ctx context.Context, lens *protocol.CodeLens) (*protocol.CodeLens, error)
CodeLensResolve fills in a reference-count lens: the references the workspace holds to its definition, shown by the editor's references peek.
func (Server) ColorPresentation ¶
func (Server) ColorPresentation(ctx context.Context, params *protocol.ColorPresentationParams) ([]protocol.ColorPresentation, error)
func (*Server) Completion ¶
func (s *Server) Completion(ctx context.Context, params *protocol.CompletionParams) (*protocol.CompletionList, error)
Completion implements textDocument/completion: members of what a member access names, else the names in scope plus library names and keywords. Prefix filtering is left to the client.
func (Server) CompletionResolve ¶
func (Server) CompletionResolve(ctx context.Context, params *protocol.CompletionItem) (*protocol.CompletionItem, error)
func (*Server) DebugAdvance ¶
DebugAdvance answers opensysml/debug/advance.
func (*Server) DebugBreakpoints ¶
DebugBreakpoints answers opensysml/debug/breakpoints.
func (*Server) DebugContinue ¶
DebugContinue answers opensysml/debug/continue.
func (*Server) DebugStart ¶
DebugStart answers opensysml/debug/start.
func (Server) Declaration ¶
func (*Server) Definition ¶
func (s *Server) Definition(ctx context.Context, params *protocol.DefinitionParams) ([]protocol.Location, error)
Definition returns the declaration location of the reference under the cursor, in a workspace document or a bundled library one.
func (*Server) DidChange ¶
DidChange applies content changes (full-replace or incremental) then updates the workspace document.
NOTE: real transport traffic is intercepted by (*Server).changeHandler, which decodes the raw params with a pointer-valued Range so an omitted range (full-document replace) is distinguishable from an incremental insertion at {0,0}. This typed method is retained to satisfy protocol.Server and for direct unit testing; because protocol.TextDocumentContentChangeEvent.Range is a value type, this path treats a zero Range as an incremental splice at [0,0) and never as a full replace.
func (*Server) DidChangeConfiguration ¶
func (s *Server) DidChangeConfiguration(ctx context.Context, params *protocol.DidChangeConfigurationParams) error
DidChangeConfiguration applies the settings the client pushed. Only the conformance mode and the disabled and enabled lints are read; a payload that mentions none of them changes nothing.
func (*Server) DidChangeWatchedFiles ¶
func (s *Server) DidChangeWatchedFiles(ctx context.Context, params *protocol.DidChangeWatchedFilesParams) error
DidChangeWatchedFiles reindexes model files changed outside the editor. A deletion leaves an open buffer alone; it is still authoritative.
func (*Server) DidChangeWorkspaceFolders ¶
func (s *Server) DidChangeWorkspaceFolders(ctx context.Context, params *protocol.DidChangeWorkspaceFoldersParams) error
DidChangeWorkspaceFolders indexes the model sources a folder added to the session holds, and drops those a removed folder contributed. The file watcher reports changes only, so a newly added folder has to be walked here.
func (*Server) DidClose ¶
DidClose marks the document closed, re-reading its on-disk content first so closing a tab does not unindex names other documents resolve through it. Its markers are withdrawn: only an open document has a set that keeps pace with the workspace.
func (Server) DidCreateFiles ¶
func (Server) DidCreateFiles(ctx context.Context, params *protocol.CreateFilesParams) error
func (Server) DidDeleteFiles ¶
func (Server) DidDeleteFiles(ctx context.Context, params *protocol.DeleteFilesParams) error
func (*Server) DidOpen ¶
DidOpen registers a newly opened document with the workspace. The buffer the editor sends can differ from what was read from disk, so when the open moved the workspace the other open documents are refreshed too; a buffer holding what the folder scan indexed changes nothing they report. A document under none of the session's folders has its directory indexed, so its imports of sibling files resolve. A library document is served from the bundled text the index holds, so opening one changes nothing.
func (Server) DidRenameFiles ¶
func (Server) DidRenameFiles(ctx context.Context, params *protocol.RenameFilesParams) error
func (*Server) DidSave ¶
DidSave refreshes diagnostics for every open document, since an edit to one file changes what the others resolve, and writes the saved document's record.
func (Server) DocumentColor ¶
func (Server) DocumentColor(ctx context.Context, params *protocol.DocumentColorParams) ([]protocol.ColorInformation, error)
func (Server) DocumentHighlight ¶
func (Server) DocumentHighlight(ctx context.Context, params *protocol.DocumentHighlightParams) ([]protocol.DocumentHighlight, error)
func (Server) DocumentLink ¶
func (Server) DocumentLink(ctx context.Context, params *protocol.DocumentLinkParams) ([]protocol.DocumentLink, error)
func (Server) DocumentLinkResolve ¶
func (Server) DocumentLinkResolve(ctx context.Context, params *protocol.DocumentLink) (*protocol.DocumentLink, error)
func (*Server) DocumentSymbol ¶
func (s *Server) DocumentSymbol(ctx context.Context, params *protocol.DocumentSymbolParams) ([]interface{}, error)
DocumentSymbol returns the hierarchical symbol tree for a document, a bundled library one included.
func (*Server) Documents ¶
func (s *Server) Documents() *documentsResult
Documents answers opensysml/documents: the document definitions declared across the workspace, in qualified-name order.
func (Server) ExecuteCommand ¶
func (Server) ExecuteCommand(ctx context.Context, params *protocol.ExecuteCommandParams) (interface{}, error)
func (*Server) Exit ¶
Exit ends the session. It records the status the process owes its client and releases Run, which owns the stream, rather than closing it from under the read loop that dispatched this notification.
func (*Server) ExitCode ¶
ExitCode is the process status LSP 3.17 asks of a served session: 0 when exit followed a shutdown request, 1 when exit arrived without one. A session the client ended by closing the stream instead served to its end, so it is 0.
func (Server) FoldingRanges ¶
func (Server) FoldingRanges(ctx context.Context, params *protocol.FoldingRangeParams) ([]protocol.FoldingRange, error)
func (*Server) Formatting ¶
func (s *Server) Formatting(ctx context.Context, params *protocol.DocumentFormattingParams) ([]protocol.TextEdit, error)
Formatting re-indents the whole document as one edit per changed region, so the editor keeps its undo history, cursor and folds.
func (*Server) Hover ¶
Hover returns type/kind information for the declaration under the cursor, in a workspace document or a bundled library one.
func (Server) Implementation ¶
func (Server) IncomingCalls ¶
func (Server) IncomingCalls(ctx context.Context, params *protocol.CallHierarchyIncomingCallsParams) ([]protocol.CallHierarchyIncomingCall, error)
func (*Server) Initialize ¶
func (s *Server) Initialize(ctx context.Context, params *protocol.InitializeParams) (*protocol.InitializeResult, error)
Initialize advertises the server capabilities this plan implements and records the session's folders, scanned later so the handshake is not delayed.
func (*Server) Initialized ¶
Initialized indexes the session's folders, so cross-file names resolve without the editor having opened every file.
func (*Server) InlayHint ¶ added in v0.10.0
InlayHint answers the hints of a range: the inferred type of each feature declared without one, and the constant each non-literal feature value evaluates to from the model alone. Only the declarations in the range are read, so hints cost nothing until an editor asks for them.
func (Server) LinkedEditingRange ¶
func (Server) LinkedEditingRange(ctx context.Context, params *protocol.LinkedEditingRangeParams) (*protocol.LinkedEditingRanges, error)
func (Server) LogTrace ¶
func (Server) LogTrace(ctx context.Context, params *protocol.LogTraceParams) error
func (Server) OnTypeFormatting ¶
func (Server) OutgoingCalls ¶
func (Server) OutgoingCalls(ctx context.Context, params *protocol.CallHierarchyOutgoingCallsParams) ([]protocol.CallHierarchyOutgoingCall, error)
func (Server) PrepareCallHierarchy ¶
func (Server) PrepareCallHierarchy(ctx context.Context, params *protocol.CallHierarchyPrepareParams) ([]protocol.CallHierarchyItem, error)
func (*Server) PrepareRename ¶
func (s *Server) PrepareRename(ctx context.Context, params *protocol.PrepareRenameParams) (*protocol.Range, error)
PrepareRename reports the range the client should offer for editing, and rejects positions that name nothing renameable before the user types.
func (*Server) RangeFormatting ¶
func (s *Server) RangeFormatting(ctx context.Context, params *protocol.DocumentRangeFormattingParams) ([]protocol.TextEdit, error)
RangeFormatting formats the whole document as Formatting does and returns only the edits on the requested lines, so nothing outside them moves.
func (*Server) References ¶
func (s *Server) References(ctx context.Context, params *protocol.ReferenceParams) ([]protocol.Location, error)
References returns every location naming the symbol under the cursor, in all workspace documents, at whichever segment of a qualified name denotes it. The cursor may sit in a bundled library document; the declaration it names is located there when it is a library one. Uses inside the library itself are not enumerated.
func (*Server) Rename ¶
func (s *Server) Rename(ctx context.Context, params *protocol.RenameParams) (*protocol.WorkspaceEdit, error)
Rename renames the name under the cursor — a declaration's long or short name — where the declaration states it and at every reference across the workspace's documents written with that name, including the qualifier positions of multi-segment names (`A::B` when renaming A). A reference written with the element's other name still resolves afterwards, so it is left as written.
func (*Server) Render ¶
Render answers opensysml/render: the rendering of the view or element asked for, in the form asked for, at the version of the document it was made from: version, node FQNs, ranges and digests all come from the one read of the workspace the rendering was made under.
func (*Server) RenderDocument ¶
RenderDocument answers opensysml/renderDocument: the named document compiled, evaluated and rendered as Markdown, or the typed error stopping it.
func (*Server) Run ¶
Run wires the server to a stdio-style stream and blocks until the connection is done.
The connection is built here rather than with protocol.NewServer because that helper already starts a read loop; a second conn.Go would run two concurrent readers over the same stream and corrupt the framing. runHandler adds back what that helper wrapped around the handler.
func (*Server) SemanticTokensFull ¶
func (s *Server) SemanticTokensFull(ctx context.Context, params *protocol.SemanticTokensParams) (*protocol.SemanticTokens, error)
SemanticTokensFull answers the semantic tokens of a whole document, a bundled library one included.
func (Server) SemanticTokensFullDelta ¶
func (Server) SemanticTokensFullDelta(ctx context.Context, params *protocol.SemanticTokensDeltaParams) (interface{}, error)
func (*Server) SemanticTokensRange ¶
func (s *Server) SemanticTokensRange(ctx context.Context, params *protocol.SemanticTokensRangeParams) (*protocol.SemanticTokens, error)
SemanticTokensRange answers the tokens overlapping a range, the document's tokens filtered: highlighting a name resolves the whole document either way.
func (Server) SemanticTokensRefresh ¶
func (Server) SetTrace ¶
func (Server) SetTrace(ctx context.Context, params *protocol.SetTraceParams) error
func (Server) ShowDocument ¶
func (Server) ShowDocument(ctx context.Context, params *protocol.ShowDocumentParams) (*protocol.ShowDocumentResult, error)
func (*Server) Shutdown ¶
Shutdown prepares the server for exit: the session stays readable, but only the exit notification is still answered (LSP 3.17 §Shutdown Request). Live debug sessions end with it, releasing what they hold.
func (*Server) SignatureHelp ¶
func (s *Server) SignatureHelp(ctx context.Context, params *protocol.SignatureHelpParams) (*protocol.SignatureHelp, error)
SignatureHelp answers the signature of the call the cursor's argument list belongs to: one signature per declaration the call may invoke, each listing the parameters a positional argument binds in order, with the parameter the cursor's argument binds active.
func (*Server) StdlibContent ¶
StdlibContent answers opensysml/stdlibContent with the bundled text of the library document params names, or an error for a URI that names none.
func (*Server) Symbols ¶
func (s *Server) Symbols(ctx context.Context, params *protocol.WorkspaceSymbolParams) ([]protocol.SymbolInformation, error)
Symbols implements workspace/symbol: a flat, query-filtered list of all symbols across every open document.
func (Server) TypeDefinition ¶
func (*Server) Views ¶
func (s *Server) Views(params *viewsParams) *viewsResult
Views answers opensysml/views: the views the document declares, with the rendering kind each states and why an unsupported one cannot be drawn.
func (Server) WillCreateFiles ¶
func (Server) WillCreateFiles(ctx context.Context, params *protocol.CreateFilesParams) (*protocol.WorkspaceEdit, error)
func (Server) WillDeleteFiles ¶
func (Server) WillDeleteFiles(ctx context.Context, params *protocol.DeleteFilesParams) (*protocol.WorkspaceEdit, error)
func (Server) WillRenameFiles ¶
func (Server) WillRenameFiles(ctx context.Context, params *protocol.RenameFilesParams) (*protocol.WorkspaceEdit, error)
func (Server) WillSave ¶
func (Server) WillSave(ctx context.Context, params *protocol.WillSaveTextDocumentParams) error
func (Server) WillSaveWaitUntil ¶
func (Server) WorkDoneProgressCancel ¶
func (Server) WorkDoneProgressCancel(ctx context.Context, params *protocol.WorkDoneProgressCancelParams) error
Source Files
¶
- base.go
- codeaction.go
- codelens.go
- completion.go
- conformance.go
- debug.go
- definition.go
- diagnostics.go
- document.go
- files.go
- formatting.go
- handler.go
- hover.go
- identity.go
- inlayhint.go
- lifecycle.go
- linediff.go
- metadata.go
- modeledit.go
- posmap.go
- references.go
- rename.go
- render.go
- semantictokens.go
- server.go
- signaturehelp.go
- stdlib.go
- symbols.go
- sync.go
- uri.go
- walk.go