Documentation
¶
Index ¶
- Constants
- func GetSemanticTokensLegend() protocol.SemanticTokensLegend
- type CompletionContextType
- type DateFormat
- type DefinitionContext
- type HoverContext
- type InlineCompletionContext
- type InlineCompletionItem
- type InlineCompletionList
- type InlineCompletionParams
- type InlineCompletionTriggerKind
- type PayeeAccountHistoryParams
- type PayeeAccountHistoryResult
- type SemanticTokenEncoder
- type SemanticTokensFullOptions
- type SemanticTokensServerCapabilities
- type Server
- func (s *Server) CodeAction(ctx context.Context, params *protocol.CodeActionParams) ([]protocol.CodeAction, error)
- func (s *Server) CodeLens(_ context.Context, params *protocol.CodeLensParams) ([]protocol.CodeLens, error)
- func (s *Server) CodeLensResolve(_ context.Context, params *protocol.CodeLens) (*protocol.CodeLens, error)
- func (s *Server) Completion(ctx context.Context, params *protocol.CompletionParams) (*protocol.CompletionList, error)
- func (s *Server) CompletionResolve(_ context.Context, item *protocol.CompletionItem) (*protocol.CompletionItem, 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(_ context.Context, _ *protocol.DidChangeConfigurationParams) error
- func (s *Server) DidChangeWatchedFiles(ctx context.Context, params *protocol.DidChangeWatchedFilesParams) error
- func (s *Server) DidClose(ctx context.Context, params *protocol.DidCloseTextDocumentParams) error
- func (s *Server) DidOpen(ctx context.Context, params *protocol.DidOpenTextDocumentParams) error
- func (s *Server) DidSave(ctx context.Context, params *protocol.DidSaveTextDocumentParams) error
- func (s *Server) DocumentHighlight(_ 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 (s *Server) ExecuteCommand(ctx context.Context, params *protocol.ExecuteCommandParams) (any, error)
- func (s *Server) Exit(ctx context.Context) error
- func (s *Server) FoldingRanges(ctx context.Context, params *protocol.FoldingRangeParams) ([]protocol.FoldingRange, error)
- func (s *Server) Format(ctx context.Context, params *protocol.DocumentFormattingParams) ([]protocol.TextEdit, error)
- func (s *Server) GetDocument(uri protocol.DocumentURI) (string, bool)
- func (s *Server) GetResolved(docURI protocol.DocumentURI) *include.ResolvedJournal
- func (s *Server) Hover(ctx context.Context, params *protocol.HoverParams) (*protocol.Hover, error)
- func (s *Server) Initialize(ctx context.Context, params *protocol.InitializeParams) (*protocol.InitializeResult, error)
- func (s *Server) Initialized(_ context.Context, _ *protocol.InitializedParams) error
- func (s *Server) InlineCompletion(_ context.Context, params json.RawMessage) (*InlineCompletionList, error)
- func (s *Server) OnTypeFormatting(ctx context.Context, params *protocol.DocumentOnTypeFormattingParams) ([]protocol.TextEdit, error)
- func (s *Server) PayeeAccountHistory(_ context.Context, params json.RawMessage) (*PayeeAccountHistoryResult, error)
- func (s *Server) PrepareRename(ctx context.Context, params *protocol.PrepareRenameParams) (*protocol.Range, error)
- func (s *Server) RangeFormat(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) RootURI() string
- func (s *Server) SelectionRange(_ 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 (s *Server) SetClient(client protocol.Client)
- func (s *Server) Shutdown(ctx context.Context) error
- func (s *Server) StoreDocument(uri protocol.DocumentURI, content string)
- func (s *Server) WillSaveWaitUntil(_ context.Context, _ *protocol.WillSaveTextDocumentParams) ([]protocol.TextEdit, error)
- func (s *Server) Workspace() *workspace.Workspace
- func (s *Server) WorkspaceSymbol(ctx context.Context, params *protocol.WorkspaceSymbolParams) ([]protocol.SymbolInformation, error)
Constants ¶
View Source
const ( // All indices match the legend order in GetSemanticTokensLegend. TokenTypeAccount = 0 // namespace TokenTypeCommodity = 1 // type TokenTypePayee = 2 // function TokenTypeDate = 3 // number TokenTypeAmount = 4 // number TokenTypeTag = 5 // decorator TokenTypeDirective = 6 // keyword (shared with rules keyword) TokenTypeCode = 7 // string (shared with tagValue) TokenTypeStatus = 8 // operator (shared with standard operator) TokenTypeComment = 9 // comment TokenTypeString = 7 // string (same index as code) TokenTypeOperator = 8 // operator (same index as status) TokenTypeTagValue = 7 // string (same index as code) TokenTypeAccountVirtual = 0 // namespace (same as account; distinguished by abstract modifier) TokenTypeNote = 9 // comment (same index as comment) TokenTypeRulesKeyword = 6 // keyword (same index as directive) TokenTypeRulesRegexp = 10 // regexp TokenTypeRulesParameter = 11 // parameter )
View Source
const ( ModifierDeclaration = 0 ModifierDefinition = 1 ModifierAbstract = 5 )
Variables ¶
This section is empty.
Functions ¶
func GetSemanticTokensLegend ¶
func GetSemanticTokensLegend() protocol.SemanticTokensLegend
Types ¶
type CompletionContextType ¶
type CompletionContextType int
const ( ContextUnknown CompletionContextType = iota ContextAccount ContextPayee ContextCommodity ContextTagName ContextTagValue ContextDate ContextDirective )
type DateFormat ¶
type DefinitionContext ¶
type DefinitionContext int
const ( DefContextUnknown DefinitionContext = iota DefContextAccount DefContextCommodity DefContextPayee )
type HoverContext ¶
type HoverContext int
const ( HoverUnknown HoverContext = iota HoverAccount HoverAmount HoverPayee HoverCommodity HoverDate HoverTag HoverTagValue )
type InlineCompletionContext ¶ added in v0.2.2
type InlineCompletionContext struct {
TriggerKind InlineCompletionTriggerKind `json:"triggerKind"`
}
type InlineCompletionItem ¶ added in v0.2.2
type InlineCompletionList ¶ added in v0.2.2
type InlineCompletionList struct {
Items []InlineCompletionItem `json:"items"`
}
type InlineCompletionParams ¶ added in v0.2.2
type InlineCompletionParams struct {
TextDocument protocol.TextDocumentIdentifier `json:"textDocument"`
Position protocol.Position `json:"position"`
Context InlineCompletionContext `json:"context"`
}
type InlineCompletionTriggerKind ¶ added in v0.2.2
type InlineCompletionTriggerKind int
const ( InlineCompletionTriggerInvoked InlineCompletionTriggerKind = 1 InlineCompletionTriggerAutomatic InlineCompletionTriggerKind = 2 )
type PayeeAccountHistoryParams ¶ added in v0.2.5
type PayeeAccountHistoryParams struct {
TextDocument protocol.TextDocumentIdentifier `json:"textDocument"`
}
type PayeeAccountHistoryResult ¶ added in v0.2.5
type SemanticTokenEncoder ¶
type SemanticTokenEncoder struct {
// contains filtered or unexported fields
}
func NewSemanticTokenEncoder ¶
func NewSemanticTokenEncoder() *SemanticTokenEncoder
func (*SemanticTokenEncoder) Encode ¶
func (e *SemanticTokenEncoder) Encode(line, col, length, tokenType, modifiers uint32) []uint32
func (*SemanticTokenEncoder) Reset ¶
func (e *SemanticTokenEncoder) Reset()
type SemanticTokensFullOptions ¶ added in v0.2.0
type SemanticTokensFullOptions struct {
Delta bool `json:"delta,omitempty"`
}
type SemanticTokensServerCapabilities ¶ added in v0.2.0
type SemanticTokensServerCapabilities struct {
Legend protocol.SemanticTokensLegend `json:"legend"`
Range bool `json:"range,omitempty"`
Full *SemanticTokensFullOptions `json:"full,omitempty"`
}
func GetSemanticTokensCapabilities ¶ added in v0.2.0
func GetSemanticTokensCapabilities() *SemanticTokensServerCapabilities
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) CodeAction ¶
func (s *Server) CodeAction(ctx context.Context, params *protocol.CodeActionParams) ([]protocol.CodeAction, error)
func (*Server) CodeLensResolve ¶ added in v0.2.8
func (*Server) Completion ¶
func (s *Server) Completion(ctx context.Context, params *protocol.CompletionParams) (*protocol.CompletionList, error)
func (*Server) CompletionResolve ¶ added in v0.2.8
func (s *Server) CompletionResolve(_ context.Context, item *protocol.CompletionItem) (*protocol.CompletionItem, error)
func (*Server) Definition ¶
func (*Server) DidChangeConfiguration ¶
func (*Server) DidChangeWatchedFiles ¶ added in v0.2.8
func (*Server) DocumentHighlight ¶ added in v0.2.8
func (s *Server) DocumentHighlight(_ context.Context, params *protocol.DocumentHighlightParams) ([]protocol.DocumentHighlight, error)
func (*Server) DocumentLink ¶ added in v0.2.0
func (s *Server) DocumentLink(ctx context.Context, params *protocol.DocumentLinkParams) ([]protocol.DocumentLink, error)
func (*Server) DocumentSymbol ¶
func (*Server) ExecuteCommand ¶
func (*Server) FoldingRanges ¶ added in v0.2.0
func (s *Server) FoldingRanges(ctx context.Context, params *protocol.FoldingRangeParams) ([]protocol.FoldingRange, error)
func (*Server) GetDocument ¶
func (s *Server) GetDocument(uri protocol.DocumentURI) (string, bool)
func (*Server) GetResolved ¶
func (s *Server) GetResolved(docURI protocol.DocumentURI) *include.ResolvedJournal
func (*Server) Initialize ¶
func (s *Server) Initialize(ctx context.Context, params *protocol.InitializeParams) (*protocol.InitializeResult, error)
func (*Server) Initialized ¶
func (*Server) InlineCompletion ¶ added in v0.2.2
func (s *Server) InlineCompletion(_ context.Context, params json.RawMessage) (*InlineCompletionList, error)
func (*Server) OnTypeFormatting ¶ added in v0.2.8
func (*Server) PayeeAccountHistory ¶ added in v0.2.5
func (s *Server) PayeeAccountHistory(_ context.Context, params json.RawMessage) (*PayeeAccountHistoryResult, error)
func (*Server) PrepareRename ¶ added in v0.2.0
func (*Server) RangeFormat ¶ added in v0.2.8
func (*Server) References ¶
func (*Server) Rename ¶ added in v0.2.0
func (s *Server) Rename(ctx context.Context, params *protocol.RenameParams) (*protocol.WorkspaceEdit, error)
func (*Server) SelectionRange ¶ added in v0.2.8
func (s *Server) SelectionRange(_ 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 ¶ added in v0.2.0
func (*Server) SemanticTokensRange ¶ added in v0.2.0
func (s *Server) SemanticTokensRange(ctx context.Context, params *protocol.SemanticTokensRangeParams) (*protocol.SemanticTokens, error)
func (*Server) StoreDocument ¶
func (s *Server) StoreDocument(uri protocol.DocumentURI, content string)
func (*Server) WillSaveWaitUntil ¶ added in v0.2.8
func (s *Server) WillSaveWaitUntil(_ context.Context, _ *protocol.WillSaveTextDocumentParams) ([]protocol.TextEdit, error)
WillSaveWaitUntil is intentionally a no-op: formatting is handled by textDocument/formatting to respect the editor's formatOnSave setting.
func (*Server) WorkspaceSymbol ¶ added in v0.2.0
func (s *Server) WorkspaceSymbol(ctx context.Context, params *protocol.WorkspaceSymbolParams) ([]protocol.SymbolInformation, error)
Source Files
¶
- code_action.go
- codelens.go
- completion.go
- completion_filter.go
- completion_resolve.go
- definition.go
- folding.go
- highlight.go
- hover.go
- inline_completion.go
- links.go
- on_type_formatting.go
- payee_history.go
- range_formatting.go
- references.go
- rename.go
- selection_range.go
- semantic.go
- server.go
- settings.go
- symbol.go
- workspace_symbol.go
Click to show internal directories.
Click to hide internal directories.