Versions in this module Expand all Collapse all v1 v1.6.0 Dec 11, 2025 Changes in this version + const ContentModified + const InternalError + const InvalidParams + const InvalidRequest + const MaxContentLength + const MaxDocumentSize + const MethodNotFound + const ParseError + const RateLimitRequests + const RateLimitWindow + const RequestCancelled + const RequestFailed + const RequestTimeout + const ServerCancelled + const ServerNotInitialized + const UnknownErrorCode + type ClientCapabilities struct + TextDocument TextDocumentClientCapabilities + type CodeAction struct + Command *Command + Diagnostics []Diagnostic + Edit *WorkspaceEdit + IsPreferred bool + Kind CodeActionKind + Title string + type CodeActionContext struct + Diagnostics []Diagnostic + Only []CodeActionKind + type CodeActionKind string + const CodeActionQuickFix + const CodeActionRefactor + const CodeActionSource + const CodeActionSourceOrganize + type CodeActionOptions struct + CodeActionKinds []CodeActionKind + type CodeActionParams struct + Context CodeActionContext + Range Range + TextDocument TextDocumentIdentifier + type Command struct + Arguments []interface{} + Command string + Title string + type CompletionClientCapabilities struct + CompletionItem ... + DynamicRegistration bool + type CompletionContext struct + TriggerCharacter string + TriggerKind CompletionTriggerKind + type CompletionItem struct + Detail string + Documentation interface{} + InsertText string + InsertTextFormat InsertTextFormat + Kind CompletionItemKind + Label string + type CompletionItemKind int + const FunctionCompletion + const KeywordCompletion + const MethodCompletion + const SnippetCompletion + const TextCompletion + type CompletionList struct + IsIncomplete bool + Items []CompletionItem + type CompletionOptions struct + ResolveProvider bool + TriggerCharacters []string + type CompletionParams struct + Context *CompletionContext + type CompletionTriggerKind int + const Invoked + const TriggerCharacter + const TriggerForIncompleteCompletions + type Diagnostic struct + Code interface{} + Message string + Range Range + RelatedInformation []DiagnosticRelatedInformation + Severity DiagnosticSeverity + Source string + type DiagnosticRelatedInformation struct + Location Location + Message string + type DiagnosticSeverity int + const SeverityError + const SeverityHint + const SeverityInformation + const SeverityWarning + type DidChangeTextDocumentParams struct + ContentChanges []TextDocumentContentChangeEvent + TextDocument VersionedTextDocumentIdentifier + type DidCloseTextDocumentParams struct + TextDocument TextDocumentIdentifier + type DidOpenTextDocumentParams struct + TextDocument TextDocumentItem + type DidSaveTextDocumentParams struct + Text string + TextDocument TextDocumentIdentifier + type Document struct + Content string + LanguageID string + Lines []string + URI string + Version int + func (doc *Document) GetWordAtPosition(pos Position) string + type DocumentFormattingParams struct + Options FormattingOptions + TextDocument TextDocumentIdentifier + type DocumentManager struct + func NewDocumentManager() *DocumentManager + func (dm *DocumentManager) Close(uri string) + func (dm *DocumentManager) Get(uri string) (*Document, bool) + func (dm *DocumentManager) GetContent(uri string) (string, bool) + func (dm *DocumentManager) Open(uri, languageID string, version int, content string) + func (dm *DocumentManager) Update(uri string, version int, changes []TextDocumentContentChangeEvent) + type DocumentSymbol struct + Children []DocumentSymbol + Detail string + Kind SymbolKind + Name string + Range Range + SelectionRange Range + type DocumentSymbolParams struct + TextDocument TextDocumentIdentifier + type FormattingOptions struct + InsertFinalNewline bool + InsertSpaces bool + TabSize int + TrimFinalNewlines bool + TrimTrailingWhitespace bool + type Handler struct + func NewHandler(server *Server) *Handler + func (h *Handler) HandleNotification(method string, params json.RawMessage) + func (h *Handler) HandleRequest(method string, params json.RawMessage) (interface{}, error) + type Hover struct + Contents MarkupContent + Range *Range + type HoverClientCapabilities struct + ContentFormat []string + DynamicRegistration bool + type InitializeParams struct + Capabilities ClientCapabilities + InitializationOptions interface{} + ProcessID int + RootPath string + RootURI string + type InitializeResult struct + Capabilities ServerCapabilities + ServerInfo *ServerInfo + type InsertTextFormat int + const PlainTextFormat + const SnippetFormat + type Location struct + Range Range + URI string + type MarkupContent struct + Kind MarkupKind + Value string + type MarkupKind string + const Markdown + const PlainText + type MessageType int + const MessageError + const MessageInfo + const MessageLog + const MessageWarning + type Notification struct + JSONRPC string + Method string + Params json.RawMessage + type ParameterInformation struct + Documentation interface{} + Label interface{} + type Position struct + Character int + Line int + type PublishDiagnosticsClientCapabilities struct + RelatedInformation bool + type PublishDiagnosticsParams struct + Diagnostics []Diagnostic + URI string + Version int + type Range struct + End Position + Start Position + type Request struct + ID interface{} + JSONRPC string + Method string + Params json.RawMessage + type Response struct + Error *ResponseError + ID interface{} + JSONRPC string + Result interface{} + type ResponseError struct + Code int + Data interface{} + Message string + type SaveOptions struct + IncludeText bool + type Server struct + func NewServer(reader io.Reader, writer io.Writer, logger *log.Logger) *Server + func NewStdioServer(logger *log.Logger) *Server + func (s *Server) Documents() *DocumentManager + func (s *Server) Logger() *log.Logger + func (s *Server) MaxDocumentSizeBytes() int + func (s *Server) Run() error + func (s *Server) SendNotification(method string, params interface{}) + func (s *Server) SetShutdown() + type ServerCapabilities struct + CodeActionProvider interface{} + CompletionProvider *CompletionOptions + DocumentFormattingProvider bool + DocumentSymbolProvider bool + HoverProvider bool + SignatureHelpProvider *SignatureHelpOptions + TextDocumentSync *TextDocumentSyncOptions + type ServerInfo struct + Name string + Version string + type ShowMessageParams struct + Message string + Type MessageType + type ShutdownResult struct + type SignatureHelp struct + ActiveParameter int + ActiveSignature int + Signatures []SignatureInformation + type SignatureHelpOptions struct + RetriggerCharacters []string + TriggerCharacters []string + type SignatureInformation struct + Documentation interface{} + Label string + Parameters []ParameterInformation + type SymbolInformation struct + ContainerName string + Kind SymbolKind + Location Location + Name string + type SymbolKind int + const SymbolArray + const SymbolBoolean + const SymbolClass + const SymbolConstant + const SymbolConstructor + const SymbolEnum + const SymbolEnumMember + const SymbolEvent + const SymbolField + const SymbolFile + const SymbolFunction + const SymbolInterface + const SymbolKey + const SymbolMethod + const SymbolModule + const SymbolNamespace + const SymbolNull + const SymbolNumber + const SymbolObject + const SymbolOperator + const SymbolPackage + const SymbolProperty + const SymbolString + const SymbolStruct + const SymbolTypeParam + const SymbolVariable + type TextDocumentClientCapabilities struct + Completion *CompletionClientCapabilities + Hover *HoverClientCapabilities + PublishDiagnostics *PublishDiagnosticsClientCapabilities + Synchronization *TextDocumentSyncClientCapabilities + type TextDocumentContentChangeEvent struct + Range *Range + RangeLength int + Text string + type TextDocumentEdit struct + Edits []TextEdit + TextDocument VersionedTextDocumentIdentifier + type TextDocumentIdentifier struct + URI string + type TextDocumentItem struct + LanguageID string + Text string + URI string + Version int + type TextDocumentPositionParams struct + Position Position + TextDocument TextDocumentIdentifier + type TextDocumentSyncClientCapabilities struct + DidSave bool + DynamicRegistration bool + WillSave bool + WillSaveWaitUntil bool + type TextDocumentSyncKind int + const SyncFull + const SyncIncremental + const SyncNone + type TextDocumentSyncOptions struct + Change TextDocumentSyncKind + OpenClose bool + Save *SaveOptions + type TextEdit struct + NewText string + Range Range + type VersionedTextDocumentIdentifier struct + Version int + type WorkspaceEdit struct + Changes map[string][]TextEdit + DocumentChanges []TextDocumentEdit