Quramy / tsuquyomi

A Vim plugin for TypeScript
http://www.vim.org/scripts/script.php?script_id=5151
1.39k stars 72 forks source link

Display importable modules when there are several candidates #280

Closed pocke closed 5 years ago

pocke commented 5 years ago

Problem

TsuImport does not display candidates, so I cannot know the candidates without completion.

I didn't know the existence of the completion, so I've given up using the feature with multiple candidates until I've known the completion by reading Tsuquyomi source code. I guess other people also give up it. And completion candidates are not displayed if wildmenu setting is disabled. So I think displaying the candidates is better.

Screenshot

When ./a and ./a2 are available.

before

190207205949

after

190207205926

Quramy commented 5 years ago

If you type TAB key, tsuquyomi completes importable module name. Does it help you?

pocke commented 5 years ago

Thank you for your comment. I know the TAB feature, but I think the feature is not enough especially for a user who does not know the feature. There are two reasons.

First, if a user does not know TAB, displaying candidates is really helpful. And I think it will be an opportunity to notice TAB feature.

Second, if a user does not enable wildmenu setting, it is helpful to show the list of the candidates. Because Vim does not display candidates without wildmenu. For example

with wildmenu wildmenu

without wildmenu nowildmenu

Quramy commented 5 years ago

@pocke Sorry for my late reploy :bow:

the Reasons you commented above are so reasonable and this change LGTM 👍

Thanks 😄