term.input.completion.new

term.input.completion

new(config) -> completion, err

Create a new completion instance from a config table

The config table must contain:

Each source module must export a new() constructor.

Provider interface

The module at config.path must return a table with at least search and optionally the methods listed below. All provider methods are injected directly onto the completion object, so inside them self refers to the completion instance — giving access to self:source(), self:provide(), self:set_meta(), etc.

Required:

Optional: