Documentation
¶
Index ¶
- func ToDocURI(uri string) protocol.DocumentURI
- type Document
- type DocumentManager
- type ReadWriteCloser
- type Server
- 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 (s *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 (s *Server) Declaration(ctx context.Context, params *protocol.DeclarationParams) (*protocol.Or_textDocument_declaration, error)
- func (s *Server) Definition(ctx context.Context, params *protocol.DefinitionParams) ([]protocol.Location, error)
- func (s *Server) Diagnostic(ctx context.Context, params *protocol.DocumentDiagnosticParams) (*protocol.DocumentDiagnosticReport, error)
- func (s *Server) DiagnosticWorkspace(ctx context.Context, params *protocol.WorkspaceDiagnosticParams) (*protocol.WorkspaceDiagnosticReport, 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) DidChangeNotebookDocument(ctx context.Context, params *protocol.DidChangeNotebookDocumentParams) 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 (s *Server) DidCloseNotebookDocument(ctx context.Context, params *protocol.DidCloseNotebookDocumentParams) error
- func (s *Server) DidCreateFiles(ctx context.Context, params *protocol.CreateFilesParams) error
- func (s *Server) DidDeleteFiles(ctx context.Context, params *protocol.DeleteFilesParams) error
- func (s *Server) DidOpen(ctx context.Context, params *protocol.DidOpenTextDocumentParams) error
- func (s *Server) DidOpenNotebookDocument(ctx context.Context, params *protocol.DidOpenNotebookDocumentParams) error
- func (s *Server) DidRenameFiles(ctx context.Context, params *protocol.RenameFilesParams) error
- func (s *Server) DidSave(ctx context.Context, params *protocol.DidSaveTextDocumentParams) error
- func (s *Server) DidSaveNotebookDocument(ctx context.Context, params *protocol.DidSaveNotebookDocumentParams) error
- func (s *Server) DocumentColor(ctx context.Context, params *protocol.DocumentColorParams) ([]protocol.ColorInformation, error)
- func (s *Server) DocumentHighlight(ctx context.Context, params *protocol.DocumentHighlightParams) ([]protocol.DocumentHighlight, error)
- func (s *Server) DocumentLink(ctx context.Context, params *protocol.DocumentLinkParams) ([]protocol.DocumentLink, error)
- func (s *Server) DocumentSymbol(ctx context.Context, params *protocol.DocumentSymbolParams) ([]any, error)
- func (me *Server) Documents() *DocumentManager
- func (s *Server) ExecuteCommand(ctx context.Context, params *protocol.ExecuteCommandParams) (any, error)
- func (s *Server) Exit(ctx context.Context) error
- func (s *Server) FoldingRange(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 (s *Server) Implementation(ctx context.Context, params *protocol.ImplementationParams) ([]protocol.Location, error)
- func (s *Server) IncomingCalls(ctx context.Context, params *protocol.CallHierarchyIncomingCallsParams) ([]protocol.CallHierarchyIncomingCall, error)
- func (s *Server) Initialize(ctx context.Context, params *protocol.ParamInitialize) (*protocol.InitializeResult, error)
- func (s *Server) Initialized(ctx context.Context, params *protocol.InitializedParams) error
- func (s *Server) InlayHint(ctx context.Context, params *protocol.InlayHintParams) ([]protocol.InlayHint, error)
- func (s *Server) InlineCompletion(ctx context.Context, params *protocol.InlineCompletionParams) (*protocol.Or_Result_textDocument_inlineCompletion, error)
- func (s *Server) InlineValue(ctx context.Context, params *protocol.InlineValueParams) ([]protocol.InlineValue, error)
- func (s *Server) LinkedEditingRange(ctx context.Context, params *protocol.LinkedEditingRangeParams) (*protocol.LinkedEditingRanges, error)
- func (s *Server) Moniker(ctx context.Context, params *protocol.MonikerParams) ([]protocol.Moniker, error)
- func (s *Server) OnTypeFormatting(ctx context.Context, params *protocol.DocumentOnTypeFormattingParams) ([]protocol.TextEdit, error)
- func (s *Server) OutgoingCalls(ctx context.Context, params *protocol.CallHierarchyOutgoingCallsParams) ([]protocol.CallHierarchyOutgoingCall, error)
- func (s *Server) PrepareCallHierarchy(ctx context.Context, params *protocol.CallHierarchyPrepareParams) ([]protocol.CallHierarchyItem, error)
- func (s *Server) PrepareRename(ctx context.Context, params *protocol.PrepareRenameParams) (*protocol.PrepareRenameResult, error)
- func (s *Server) PrepareTypeHierarchy(ctx context.Context, params *protocol.TypeHierarchyPrepareParams) ([]protocol.TypeHierarchyItem, error)
- func (s *Server) Progress(ctx context.Context, params *protocol.ProgressParams) error
- func (s *Server) RangeFormatting(ctx context.Context, params *protocol.DocumentRangeFormattingParams) ([]protocol.TextEdit, error)
- func (s *Server) RangesFormatting(ctx context.Context, params *protocol.DocumentRangesFormattingParams) ([]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) Resolve(ctx context.Context, params *protocol.InlayHint) (*protocol.InlayHint, error)
- func (s *Server) ResolveCodeAction(ctx context.Context, params *protocol.CodeAction) (*protocol.CodeAction, error)
- func (s *Server) ResolveCodeLens(ctx context.Context, params *protocol.CodeLens) (*protocol.CodeLens, error)
- func (s *Server) ResolveCompletionItem(ctx context.Context, params *protocol.CompletionItem) (*protocol.CompletionItem, error)
- func (s *Server) ResolveDocumentLink(ctx context.Context, params *protocol.DocumentLink) (*protocol.DocumentLink, error)
- func (s *Server) ResolveWorkspaceSymbol(ctx context.Context, params *protocol.WorkspaceSymbol) (*protocol.WorkspaceSymbol, error)
- func (s *Server) SelectionRange(ctx context.Context, params *protocol.SelectionRangeParams) ([]protocol.SelectionRange, error)
- func (s *Server) SemanticTokensFull(ctx context.Context, params *protocol.SemanticTokensParams) (*protocol.SemanticTokens, error)
- func (s *Server) SemanticTokensFullDelta(ctx context.Context, params *protocol.SemanticTokensDeltaParams) (any, error)
- func (s *Server) SemanticTokensRange(ctx context.Context, params *protocol.SemanticTokensRangeParams) (*protocol.SemanticTokens, error)
- func (me *Server) SetCallbackClient(client protocol.Client)
- func (s *Server) SetTrace(ctx context.Context, params *protocol.SetTraceParams) 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) Subtypes(ctx context.Context, params *protocol.TypeHierarchySubtypesParams) ([]protocol.TypeHierarchyItem, error)
- func (s *Server) Supertypes(ctx context.Context, params *protocol.TypeHierarchySupertypesParams) ([]protocol.TypeHierarchyItem, error)
- func (s *Server) Symbol(ctx context.Context, params *protocol.WorkspaceSymbolParams) ([]protocol.SymbolInformation, error)
- func (s *Server) TextDocumentContent(ctx context.Context, params *protocol.TextDocumentContentParams) (*string, error)
- func (s *Server) TypeDefinition(ctx context.Context, params *protocol.TypeDefinitionParams) ([]protocol.Location, error)
- func (s *Server) WillCreateFiles(ctx context.Context, params *protocol.CreateFilesParams) (*protocol.WorkspaceEdit, error)
- func (s *Server) WillDeleteFiles(ctx context.Context, params *protocol.DeleteFilesParams) (*protocol.WorkspaceEdit, error)
- func (s *Server) WillRenameFiles(ctx context.Context, params *protocol.RenameFilesParams) (*protocol.WorkspaceEdit, error)
- func (s *Server) WillSave(ctx context.Context, params *protocol.WillSaveTextDocumentParams) error
- func (s *Server) WillSaveWaitUntil(ctx context.Context, params *protocol.WillSaveTextDocumentParams) ([]protocol.TextEdit, error)
- func (s *Server) WorkDoneProgressCancel(ctx context.Context, params *protocol.WorkDoneProgressCancelParams) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToDocURI ¶
func ToDocURI(uri string) protocol.DocumentURI
Types ¶
type Document ¶
type Document struct { URI string LanguageID protocol.LanguageKind Version int32 Content string AST *parser.ParsedTemplateFile }
Document represents a text document with its metadata
type DocumentManager ¶
type DocumentManager struct {
// contains filtered or unexported fields
}
DocumentManager handles document operations
func NewDocumentManager ¶
func NewDocumentManager() *DocumentManager
func (*DocumentManager) Delete ¶
func (m *DocumentManager) Delete(uri string)
func (*DocumentManager) Get ¶
func (m *DocumentManager) Get(uri protocol.DocumentURI) (*Document, bool)
func (*DocumentManager) GetNoFallback ¶
func (m *DocumentManager) GetNoFallback(uri protocol.DocumentURI) (*Document, bool)
func (*DocumentManager) Store ¶
func (m *DocumentManager) Store(uri protocol.DocumentURI, doc *Document)
type ReadWriteCloser ¶
type ReadWriteCloser struct {
// contains filtered or unexported fields
}
ReadWriteCloser combines an io.ReadCloser and io.WriteCloser into a single io.ReadWriteCloser
func NewReadWriteCloser ¶
func NewReadWriteCloser(r io.ReadCloser, w io.WriteCloser) *ReadWriteCloser
NewReadWriteCloser creates a new ReadWriteCloser from separate read and write closers
func (*ReadWriteCloser) Close ¶
func (rwc *ReadWriteCloser) Close() error
Close closes both the reader and writer
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents an LSP server instance
func (*Server) CodeAction ¶
func (s *Server) CodeAction(ctx context.Context, params *protocol.CodeActionParams) ([]protocol.CodeAction, error)
func (*Server) ColorPresentation ¶
func (s *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)
func (*Server) Declaration ¶
func (s *Server) Declaration(ctx context.Context, params *protocol.DeclarationParams) (*protocol.Or_textDocument_declaration, error)
func (*Server) Definition ¶
func (*Server) Diagnostic ¶
func (s *Server) Diagnostic(ctx context.Context, params *protocol.DocumentDiagnosticParams) (*protocol.DocumentDiagnosticReport, error)
func (*Server) DiagnosticWorkspace ¶
func (s *Server) DiagnosticWorkspace(ctx context.Context, params *protocol.WorkspaceDiagnosticParams) (*protocol.WorkspaceDiagnosticReport, error)
func (*Server) DidChangeConfiguration ¶
func (*Server) DidChangeNotebookDocument ¶
func (*Server) DidChangeWatchedFiles ¶
func (*Server) DidChangeWorkspaceFolders ¶
func (*Server) DidCloseNotebookDocument ¶
func (*Server) DidCreateFiles ¶
func (*Server) DidDeleteFiles ¶
func (*Server) DidOpenNotebookDocument ¶
func (*Server) DidRenameFiles ¶
func (*Server) DidSaveNotebookDocument ¶
func (*Server) DocumentColor ¶
func (s *Server) DocumentColor(ctx context.Context, params *protocol.DocumentColorParams) ([]protocol.ColorInformation, error)
func (*Server) DocumentHighlight ¶
func (s *Server) DocumentHighlight(ctx context.Context, params *protocol.DocumentHighlightParams) ([]protocol.DocumentHighlight, error)
func (*Server) DocumentLink ¶
func (s *Server) DocumentLink(ctx context.Context, params *protocol.DocumentLinkParams) ([]protocol.DocumentLink, error)
func (*Server) DocumentSymbol ¶
func (*Server) Documents ¶
func (me *Server) Documents() *DocumentManager
func (*Server) ExecuteCommand ¶
func (*Server) FoldingRange ¶
func (s *Server) FoldingRange(ctx context.Context, params *protocol.FoldingRangeParams) ([]protocol.FoldingRange, error)
func (*Server) Formatting ¶
func (*Server) Implementation ¶
func (*Server) IncomingCalls ¶
func (s *Server) IncomingCalls(ctx context.Context, params *protocol.CallHierarchyIncomingCallsParams) ([]protocol.CallHierarchyIncomingCall, error)
func (*Server) Initialize ¶
func (s *Server) Initialize(ctx context.Context, params *protocol.ParamInitialize) (*protocol.InitializeResult, error)
func (*Server) Initialized ¶
func (*Server) InlineCompletion ¶
func (s *Server) InlineCompletion(ctx context.Context, params *protocol.InlineCompletionParams) (*protocol.Or_Result_textDocument_inlineCompletion, error)
func (*Server) InlineValue ¶
func (s *Server) InlineValue(ctx context.Context, params *protocol.InlineValueParams) ([]protocol.InlineValue, error)
func (*Server) LinkedEditingRange ¶
func (s *Server) LinkedEditingRange(ctx context.Context, params *protocol.LinkedEditingRangeParams) (*protocol.LinkedEditingRanges, error)
func (*Server) OnTypeFormatting ¶
func (*Server) OutgoingCalls ¶
func (s *Server) OutgoingCalls(ctx context.Context, params *protocol.CallHierarchyOutgoingCallsParams) ([]protocol.CallHierarchyOutgoingCall, error)
func (*Server) PrepareCallHierarchy ¶
func (s *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.PrepareRenameResult, error)
func (*Server) PrepareTypeHierarchy ¶
func (s *Server) PrepareTypeHierarchy(ctx context.Context, params *protocol.TypeHierarchyPrepareParams) ([]protocol.TypeHierarchyItem, error)
func (*Server) RangeFormatting ¶
func (*Server) RangesFormatting ¶
func (*Server) References ¶
func (*Server) Rename ¶
func (s *Server) Rename(ctx context.Context, params *protocol.RenameParams) (*protocol.WorkspaceEdit, error)
func (*Server) ResolveCodeAction ¶
func (s *Server) ResolveCodeAction(ctx context.Context, params *protocol.CodeAction) (*protocol.CodeAction, error)
func (*Server) ResolveCodeLens ¶
func (*Server) ResolveCompletionItem ¶
func (s *Server) ResolveCompletionItem(ctx context.Context, params *protocol.CompletionItem) (*protocol.CompletionItem, error)
func (*Server) ResolveDocumentLink ¶
func (s *Server) ResolveDocumentLink(ctx context.Context, params *protocol.DocumentLink) (*protocol.DocumentLink, error)
func (*Server) ResolveWorkspaceSymbol ¶
func (s *Server) ResolveWorkspaceSymbol(ctx context.Context, params *protocol.WorkspaceSymbol) (*protocol.WorkspaceSymbol, error)
func (*Server) SelectionRange ¶
func (s *Server) SelectionRange(ctx context.Context, params *protocol.SelectionRangeParams) ([]protocol.SelectionRange, error)
func (*Server) SemanticTokensFull ¶
func (s *Server) SemanticTokensFull(ctx context.Context, params *protocol.SemanticTokensParams) (*protocol.SemanticTokens, error)
func (*Server) SemanticTokensFullDelta ¶
func (*Server) SemanticTokensRange ¶
func (s *Server) SemanticTokensRange(ctx context.Context, params *protocol.SemanticTokensRangeParams) (*protocol.SemanticTokens, error)
func (*Server) SetCallbackClient ¶
func (*Server) SignatureHelp ¶
func (s *Server) SignatureHelp(ctx context.Context, params *protocol.SignatureHelpParams) (*protocol.SignatureHelp, error)
func (*Server) Subtypes ¶
func (s *Server) Subtypes(ctx context.Context, params *protocol.TypeHierarchySubtypesParams) ([]protocol.TypeHierarchyItem, error)
func (*Server) Supertypes ¶
func (s *Server) Supertypes(ctx context.Context, params *protocol.TypeHierarchySupertypesParams) ([]protocol.TypeHierarchyItem, error)
func (*Server) Symbol ¶
func (s *Server) Symbol(ctx context.Context, params *protocol.WorkspaceSymbolParams) ([]protocol.SymbolInformation, error)
func (*Server) TextDocumentContent ¶
func (*Server) TypeDefinition ¶
func (*Server) WillCreateFiles ¶
func (s *Server) WillCreateFiles(ctx context.Context, params *protocol.CreateFilesParams) (*protocol.WorkspaceEdit, error)
func (*Server) WillDeleteFiles ¶
func (s *Server) WillDeleteFiles(ctx context.Context, params *protocol.DeleteFilesParams) (*protocol.WorkspaceEdit, error)
func (*Server) WillRenameFiles ¶
func (s *Server) WillRenameFiles(ctx context.Context, params *protocol.RenameFilesParams) (*protocol.WorkspaceEdit, error)
func (*Server) WillSaveWaitUntil ¶
func (*Server) WorkDoneProgressCancel ¶
Directories
¶
Path | Synopsis |
---|---|
protocol
|
|
generator
The generate command generates Go declarations from VSCode's description of the Language Server Protocol.
|
The generate command generates Go declarations from VSCode's description of the Language Server Protocol. |
The semtok package provides an encoder for LSP's semantic tokens.
|
The semtok package provides an encoder for LSP's semantic tokens. |
Click to show internal directories.
Click to hide internal directories.