Documentation
¶
Index ¶
- Constants
- Variables
- type Application
- func (a *Application) GetDocumentContent(uri lsp.URI, fallbackToEmptyString bool) *string
- func (a *Application) HandleShutdown(ctx *common.LSPContext) error
- func (a *Application) Handler() *lsp.Handler
- func (a *Application) ReinitialiseRegistries(providers map[string]provider.Provider, ...)
- func (a *Application) SaveDocumentContent(params *lsp.DidChangeTextDocumentParams, existingContent *string) error
- func (a *Application) SetConnection(conn *jsonrpc2.Conn)
- func (a *Application) Setup()
- func (a *Application) StoreDocumentAndDerivedStructures(uri lsp.URI, parsed *schema.Blueprint, content string) error
- type DocumentDebouncer
Constants ¶
const Name string = "Blueprint Language Server"
Variables ¶
var ConfigSection string = "blueprint-language-server"
var Version string = "0.1.0"
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func NewApplication ¶
func NewApplication( state *languageservices.State, settingsService *languageservices.SettingsService, traceService *lsp.TraceService, functionRegistry provider.FunctionRegistry, resourceRegistry resourcehelpers.Registry, dataSourceRegistry provider.DataSourceRegistry, customVarTypeRegistry provider.CustomVariableTypeRegistry, blueprintLoader container.Loader, completionService *languageservices.CompletionService, diagnosticService *languageservices.DiagnosticsService, signatureService *languageservices.SignatureService, hoverService *languageservices.HoverService, symbolService *languageservices.SymbolService, gotoDefinitionService *languageservices.GotoDefinitionService, findReferencesService *languageservices.FindReferencesService, codeActionService *languageservices.CodeActionService, childResolver *languageservices.ChildBlueprintResolver, builtInProviders map[string]provider.Provider, builtInTransformers map[string]transform.SpecTransformer, frameworkLogger core.Logger, logger *zap.Logger, debouncer *DocumentDebouncer, ) *Application
func (*Application) GetDocumentContent ¶ added in v0.2.0
func (a *Application) GetDocumentContent(uri lsp.URI, fallbackToEmptyString bool) *string
GetDocumentContent retrieves document content from state, optionally returning an empty string if the document is not found.
func (*Application) HandleShutdown ¶ added in v0.2.0
func (a *Application) HandleShutdown(ctx *common.LSPContext) error
HandleShutdown handles the LSP shutdown request, closing the plugin host if active.
func (*Application) Handler ¶
func (a *Application) Handler() *lsp.Handler
func (*Application) ReinitialiseRegistries ¶ added in v0.2.0
func (a *Application) ReinitialiseRegistries( providers map[string]provider.Provider, transformers map[string]transform.SpecTransformer, )
ReinitialiseRegistries updates all registries and services with new providers and transformers.
func (*Application) SaveDocumentContent ¶ added in v0.2.0
func (a *Application) SaveDocumentContent(params *lsp.DidChangeTextDocumentParams, existingContent *string) error
SaveDocumentContent processes text document change events and updates document content in state.
func (*Application) SetConnection ¶ added in v0.2.0
func (a *Application) SetConnection(conn *jsonrpc2.Conn)
SetConnection sets the JSON-RPC connection for sending notifications. This must be called after the connection is established.
func (*Application) Setup ¶
func (a *Application) Setup()
func (*Application) StoreDocumentAndDerivedStructures ¶ added in v0.2.0
func (a *Application) StoreDocumentAndDerivedStructures( uri lsp.URI, parsed *schema.Blueprint, content string, ) error
StoreDocumentAndDerivedStructures stores the document content, parsed blueprint, and derived structures (schema tree, AST) in state.
type DocumentDebouncer ¶ added in v0.2.0
type DocumentDebouncer struct {
// contains filtered or unexported fields
}
DocumentDebouncer provides debouncing for document change events. This reduces redundant parsing during rapid typing.
func NewDocumentDebouncer ¶ added in v0.2.0
func NewDocumentDebouncer(duration time.Duration) *DocumentDebouncer
NewDocumentDebouncer creates a new debouncer with the specified duration.
func (*DocumentDebouncer) Cancel ¶ added in v0.2.0
func (d *DocumentDebouncer) Cancel(uri string)
Cancel cancels any pending debounced call for the given URI.
func (*DocumentDebouncer) CancelAll ¶ added in v0.2.0
func (d *DocumentDebouncer) CancelAll()
CancelAll cancels all pending debounced calls.
func (*DocumentDebouncer) Debounce ¶ added in v0.2.0
func (d *DocumentDebouncer) Debounce(uri string, fn func())
Debounce schedules a function to be called after the debounce duration. If called again for the same URI before the duration elapses, the previous call is cancelled and the timer resets.
func (*DocumentDebouncer) Flush ¶ added in v0.2.0
func (d *DocumentDebouncer) Flush(uri string)
Flush immediately executes any pending debounced call for the given URI.
func (*DocumentDebouncer) HasPending ¶ added in v0.2.0
func (d *DocumentDebouncer) HasPending(uri string) bool
HasPending returns true if there's a pending debounced call for the given URI.
func (*DocumentDebouncer) PendingCount ¶ added in v0.2.0
func (d *DocumentDebouncer) PendingCount() int
PendingCount returns the number of pending debounced calls.