Hi there ! I need help and got some questions on how to make a lua autocomplete like this:
Any message may help !
Hi there ! I need help and got some questions on how to make a lua autocomplete like this:
Are you talking about just the autocomplete part, or the whole editor? Your title and description are conflicting.
it’s a bit both haha, but I think the autocomplete is the part I can’t understand right now
I mean it depends on how complex we’re talking. If you mean basic barebones autocomplete, you can have a list of symbols (all the globals and variables in that scope) which you update each time you query it, and then based on the current sequence of characters at the end, you can create a table of any symbols that match that sequence of characters at the beginning.
Then, you send that off to wherever you handle the UI, which would have a frame (preferably scrolling frame) with a UIListLayout to the right of the cursor, and it will create a new frame for each auto-completable symbol… you get the gist.
You can track which one the user selects with the arrow keys/mouse, and then when tab is pressed, just insert the remaining characters of the selected symbol at the cursor.
I’m open to help with anything else!
I will try this thank you ! For now I make you the solution of this post xd
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.