Skip to content

Conversation

@RblSb
Copy link
Member

@RblSb RblSb commented Mar 23, 2025

var innerText = 1;
in<tab> // innerText instead of ininnerText

Basically this should be a switch with a full KeywordKind, but i only added short keyword as most annoying while auto-completing stuff. Some macro to extract all enum fields to array can be used, but maybe this is enough.

I also wonder, do we need a simple do keyword completion? It prevents some do... fields from being autocompleted.

@RblSb RblSb requested a review from kLabz November 15, 2025 03:57
@kLabz
Copy link
Contributor

kLabz commented Nov 16, 2025

Thanks; I cannot test today but will check early next week

I also saw the same behavior with anon object field completion just now, maybe the fix would be similar 🤔

@kLabz
Copy link
Contributor

kLabz commented Nov 17, 2025

lgtm

Well.. it doesn't look great but other solutions wouldn't be better, and it does the job (note that repro isn't too straightforward)

I also wonder, do we need a simple do keyword completion? It prevents some do... fields from being autocompleted.

Probably not. Especially since do is likely not used much.. and in real world use cases you probably don't have it often as a suggestion until you add the o, making it even more useless.

On a side note, having var in that list would have been nice too, but it seems like the snippet is getting in the way anyway, making completion of things like variadic impossible to begin with in cases where the issue would happen 🤔

@RblSb
Copy link
Member Author

RblSb commented Nov 18, 2025

Yeah, i was wondering if i can always replace zero size replace range to length of non-space chars before cursor when completion triggered, but it feels even more error prone. At least this prefix hack will be easier to find after.

Also checked if can find better solution at compiler side, but had no success for now. Probably compiler also cannot easily detect if we are typing download field, or reopen completion after do| and there is no space. There is a lot of hacks in grammar.mly, related to HaxeFoundation/haxe#8669

@RblSb RblSb merged commit a64930e into vshaxe:master Nov 18, 2025
6 checks passed
@RblSb RblSb deleted the dodo branch November 18, 2025 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants