HomePhorge

feat: make the completion candidates type more consistent

Description

feat: make the completion candidates type more consistent

The API for window.set_items took to many variable types. It would
take a table in multiple different formats and a string. Now it will
only take a table in a single format and a string. It will convert the
string into the table format by splitting it on new lines.

The table format is an array of tables that must have a content key
that will be the text that is displayed in the completion window. The
table can have any other data that is ignored.

local items = {
  { content = "Item one" },
  { content = "Item two" }
}

The set_items function will only display the content key in the
completion window, it will not do any sorting or filtering, that must be
done before passing the data to the set_items function.

Details

Provenance
AdeAttwoodAuthored on Sep 2 2022, 7:48 PM
Parents
R1:e25a96c34a4f: Merge pull request #6 from AdeAttwood/experimental-rust
Branches
Unknown
Tags
Unknown

Event Timeline