Foundry.CompletionProvider

g Foundry.CompletionProvider Foundry.CompletionProvider Foundry.Contextual Foundry.Contextual Foundry.Contextual->Foundry.CompletionProvider GObject.GInterface GObject.GInterface Json.Serializable Json.Serializable GObject.GInterface->Json.Serializable GObject.Object GObject.Object GObject.Object->Foundry.Contextual Json.Serializable->Foundry.Contextual

Subclasses:

Foundry.LspCompletionProvider

Methods

Inherited:

Foundry.Contextual (4), GObject.Object (37), Json.Serializable (8)

Structs:

GObject.ObjectClass (5)

complete (request)

dup_document ()

get_plugin_info ()

is_trigger (iter, ch)

refilter (request, model)

Virtual Methods

Inherited:

GObject.Object (7), Json.Serializable (5)

do_complete (request)

do_is_trigger (iter, ch)

do_refilter (request, model)

Properties

Inherited:

Foundry.Contextual (1)

Name

Type

Flags

Short Description

document

Foundry.TextDocument

r/w/co

plugin-ifo

Peas.PluginInfo

r/w/co

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

Foundry.Contextual

r

Class Details

class Foundry.CompletionProvider(**kwargs)
Bases:

Foundry.Contextual

Abstract:

Yes

Structure:

Foundry.CompletionProviderClass

Abstract base class for providing code completion suggestions.

Foundry.CompletionProvider provides the core interface for code completion functionality including suggestion generation and context-aware completions. Concrete implementations handle specific languages and provide specialized completion logic for different programming contexts and editor states.

complete(request)
Parameters:

request (Foundry.CompletionRequest) – a [class`Foundry`.CompletionRequest]

Returns:

[class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] of [class`Foundry`.CompletionProposal] or rejects with error.

Return type:

Dex.Future

Asynchronously generate a list of completion items.

dup_document()
Return type:

Foundry.TextDocument

get_plugin_info()
Returns:

a [class`Peas`.PluginInfo]

Return type:

Peas.PluginInfo

is_trigger(iter, ch)
Parameters:
Return type:

bool

refilter(request, model)
Parameters:
Returns:

[class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] of [class`Foundry`.CompletionProposal] or rejects with error.

Return type:

Dex.Future

Asynchronously refilter model or provides an alternate result set.

do_complete(request) virtual
Parameters:

request (Foundry.CompletionRequest) – a [class`Foundry`.CompletionRequest]

Returns:

[class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] of [class`Foundry`.CompletionProposal] or rejects with error.

Return type:

Dex.Future

Asynchronously generate a list of completion items.

do_is_trigger(iter, ch) virtual
Parameters:
Return type:

bool

do_refilter(request, model) virtual
Parameters:
Returns:

[class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] of [class`Foundry`.CompletionProposal] or rejects with error.

Return type:

Dex.Future

Asynchronously refilter model or provides an alternate result set.

Property Details

Foundry.CompletionProvider.props.document
Name:

document

Type:

Foundry.TextDocument

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Foundry.CompletionProvider.props.plugin_ifo
Name:

plugin-ifo

Type:

Peas.PluginInfo

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY