languageserver

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2026 License: Apache-2.0 Imports: 23 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const Name string = "Blueprint Language Server"

Variables

View Source
var ConfigSection string = "blueprint-language-server"
View Source
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL