Charles-Johnson / zia_programming

A language that can program itself
https://zia-lang.org
GNU General Public License v3.0
3 stars 0 forks source link

Autocomplete API #35

Open Charles-Johnson opened 3 years ago

Charles-Johnson commented 3 years ago

Can store the labels of concepts in a trie data structure to suggest labels when e.g. tab is pressed in izia

Charles-Johnson commented 3 years ago

qp-trie-rs has a nice API but doesn't support String keys

Charles-Johnson commented 3 years ago

Could use std::collections::BTreeMap's range method to effectively get the labels prefixed by a given string.

Charles-Johnson commented 3 years ago

As well as autocompleting after user has partially typed an existing label, suggestions could be given based on the syntax surrounding the text cursor to suggest a label whose pairing with one of the neighbouring syntax is an existing concept

Charles-Johnson commented 3 years ago

This will be easier to implement after #52