Skip to content

Autocomplete only triggers after command start, not on arguments (call label, show image...) #526

@hsandt

Description

@hsandt

Issue

Dynamic resource name parsing for command autocompletion is very useful, but I notice it only works if I press space after entering the command name. It doesn't appear if I start typing an argument, even if I force autocomplete popup display with Ctrl+Space.

In addition, when typing the command and pressing space on the go, the autocomplete popup will show less useful clipboard entries besides the actual useful resource list.

To sum up, an example with call:

Prepare a few labels (start and start_cinematic will be enough for this example)

  1. I type the call (with final space) in one go

=> I only the full list of labels + the parameters screen and expression (they are probably here to give hints on expected parameters, which is useful for beginners - however I see expression twice with a slightly different icon, which seems like a waste, but it may be a structural thing that can't be avoided).

Image

=> OK

Note: people who use Clipboard Manager may get a list of clipboard entries "clip01", "clip02" that get in the way.

Image

You can disable the option clipboard-manager.snippet.enabled to avoid this.

  1. I type call, pause (typically when the autocomplete popup appears, I press Escape to close it, or I click somewhere else then move caret back to after call) and press space.

=> I only the full list of labels + the parameters screen and expression (I see expression twice with a slightly different icon, that seems like a waste, though).

=> OK

Image
  1. I type call (with final space), do something else (escape to close popup or navigate elsewhere and back there), then I press Ctrl+Space

=> just a local dictionary "abc" list of entries:

Image

=> BAD

Again, if you got Clipboard Manager clip snippet enabled you'll see a list of clips:

Image
  1. I type call (with final space), do something else (escape to close popup or navigate elsewhere and back there), then I start typing argument name "sta..." (for start or start_cinematic)

=> I see a bunch of local dictionary words that start with sta. I will, incidentally, also see the wanted start_cinematic but that's only because label names are also registered in the local dictionary.

Image

If using Clipboard Manager clip snippets, you'll just list of clips as in 3.

Suggestion / Fix

It would be great if autocomplete would fill the popup with resource names from any position.

Variant and difficulties

The same can be observed with other commands like show. show is even more problematic because many images use multiple words, such as character emotion or bg school inside. So I'd often type a character name at first and pause (generally copy pasted from another line so the pause is automatic) and then try to autocomplete the next word (emotion) but it doesn't work. I have to enter the character name + emotion first letters and pick the correct autocomplete entry on one go.

If I do so, it's okay:

Image

If I come later and Ctrl+Space, it doesn't work (no relevant resource name shown, only dictionary as previously):

Image

I understand that it may be harder to detect multi-word resources, though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions