traktor icon indicating copy to clipboard operation
traktor copied to clipboard

Traktor: Implemented autocomplete for SyntaxRichEdit

Open jayrulez opened this issue 1 month ago • 2 comments

https://github.com/apistol78/traktor/commit/1157c2cea76d2b1608a34dc4894ca3d26c4a580d

For this specific change, I don't really like the approach of using a flag.

However, I couldn't find a good way to consume tab and return from the autocomplete popup. If you have a suggestion, then please let me know.

Also, maybe LuaAutocompleteProvider should be moved to the Script editor plugin? I intend to expand this to provide autocomplete from the class registry later.

jayrulez avatar Nov 19 '25 23:11 jayrulez

Really good work! I've started looking through it now, and some minor thoughts

  • Do you think we should extend the ScriptOutlineLua class to provide data to the provider?
  • The suggestion widget should probably be a ToolForm widget.
  • Using AutoWidget as a basis for the list of suggestion would automate scroll bar functionality.

apistol78 avatar Nov 25 '25 14:11 apistol78

Thanks for the feedback.

I implemented the last 2.

For the first 1, sounds like a good idea. So this would be able to give contextual autocomplete suggestions too, if I understand correctly?

I guess I should also rename LuaAutocompleteProvider to AutocompleteProviderLua to match the naming convention now. Before, I was matching against LuaGrammar.

I will have to think about how ScriptOutlineLua should be extended to provide the data. If you have any ideas then please let me know.

jayrulez avatar Nov 25 '25 17:11 jayrulez