I'm tryin' over here... Aug 30 -- autoComplete

Updates on the progress of this project
Post Reply
User avatar
OpenXTalkPaul
Posts: 1485
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

I'm tryin' over here... Aug 30 -- autoComplete

Post by OpenXTalkPaul »

Anniversary of the end of LC CE is in two days (started working on OXT about two weeks after ;-) ).
Still trying to work on putting out this release milestone...
Very busy so I haven't been on here much lately as a result.

One thing I've been looking at along the way is trying to figure out how they've implemented autocomplete 'over there', specifically the user customizable "snippets". In my opinion those are things every IDE in 2022 should have as a baseline features. At a minimum some sort of 'scripters scrapbook' (yes, I'm aware of stacks of the past going by that name), where stack authors could store short or one-liner sort of scripts that could be inserted into the script editor by some means, would be nice.

But a quick retrospective look into the evolution of the script editor produced a very surprising result! It turns out that the autoComplete functions were actually in the LiveCode Community Edition in version 8! . See it for yourself at around line 3468 of "revSEEditorBehavior.livecodescript" in LCC v8.1.10! Diff-checking shows those handlers were later removed from LCC ver 9 and then became a commercial-only feature moving forward (with the exceptions of basic brackets and quotes completion). How much forward did they move it? I don't know, but we can certainly work with the LC CE 8 versions since it's GPLv3. SO... I think the release following the one I'm currently working on, we need to get autoCompletes re-integrated into the FOSS version!

I have a few ideas on how I would do it differently. For one I really don't like the fact that their snippets editor's "snippets" are stored in the revPreferences stack, which I've had to reset many times in the past and doing so means you've lost all of your custom snippets., and you can't really edit them in a text / code editor since revPreferences is in stack file format. I would add a way to save the scriptEditor selections to "snippet" files (json text) in the IDE user customization directory, and add a way to insert snippets with or without the autocomplete handling (I'm thinking adding access from the editors contextual menu). I could probably even do it in a way that maintains some compatibility with LC Ltd. products (LC's autoComplete "snippets" are just arrays with a few keys). I also think the way their autoComplete popup list works is (as the kids say) 'janky', so if we could get it to work/feel like the Atom editor's autocomplete that would be great!

Anyway I thought finding that Open-Source version autoComplete was an exciting discovery so I took some time to share.
... back to work ...
User avatar
richmond62
Posts: 2617
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: I'm tryin' over here... Aug 30 -- autoComplete

Post by richmond62 »

Frankly, autocomplete does LESS than NOTHING for me as:

1. I can think for myself.

2. NEVER has autocomplete offered what I want.

OR, put more directly:

I think autocomplete is a crock of brown stuff.
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 2617
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: I'm tryin' over here... Aug 30 -- autoComplete

Post by richmond62 »

You're tryin' . . . I think we know that, and part of the problem in my case at least, is that you are wildly eccentric and creative in a different way to the way I am wildly eccentric and creative.

AND if you dare to use the 'N' word [=normal] that will be the end of everything. 8-)

Love, [that's "LOVE"] Richmond.
https://richmondmathewson.owlstown.net/
User avatar
OpenXTalkPaul
Posts: 1485
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: I'm tryin' over here... Aug 30 -- autoComplete

Post by OpenXTalkPaul »

Well it seems my find was overblown as well, they moved those handlers to a different script file in 9.x but they are still in there. Anyway they're the hooks for autocomplete in there. I think libHunspell builder lib could be used as syntax sugestion provider (I made an xTalk dictionary for it) in addition to introspection and snippets.

AutoComplete can be extremely useful if you use aLotOfReallyLongVariableNames and the autocomplete pulls matches mostly from introspection and/or a syntax list... all that other stuff like as-you-type-completion of control structures seems neat an all, but a bit of a waste of effort to me.
But Most code editors I've used in the last 10 years have had some sort of autocomplete features.

I would probably find it even more useful to be able to quickly add script selections to a database of script clippings that I later insert from a context menu into any script that I'm working on. Utility handlers such as a 'function getThisStacksFolderPath tFile ...etc.' would be just a right-click away.

Anyway, I'm much less excited about that now that it's late in the day.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests