module

Icr::Completion::Completer

Pure token-completion logic: what to insert at the cursor and which candidates remain ambiguous. The editor renders the result.

Constants

KEYWORDS = ["def", "end", "class", "module", "struct", "enum", "require", "include", "puts", "pp", "p", "print", "exit", "record", "property"] of ::String

Class methods

complete(buffer : String, cursor : Int32, index : Index) : Tuple(String, Array(String))

Two shapes are completed: "MyMath.sq|" → self-methods + constants of the type MyMath "MyMa|" → type names (+ a few keywords) Returns {insert, candidates}: insert is the remainder of the candidates' common prefix beyond the typed fragment ("" when the prefix adds nothing); candidates is the filtered list to show.

Source