Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tab completion doesn't work with :dynamic-collection #946

Closed
xendk opened this issue Apr 5, 2017 · 4 comments
Closed

Tab completion doesn't work with :dynamic-collection #946

xendk opened this issue Apr 5, 2017 · 4 comments

Comments

@xendk
Copy link

xendk commented Apr 5, 2017

I've tried making use of ivy-read for opening the file of a class in PHP, using ede-php-autoload. ede-php-autoload-complete-type-name will take the prefix of a namespace/class, and provide completions, so I figured I should combine it with :dynamic-collection in order to reevaluate the candidates as one narrows down the selection.

It doesn't seem to work with tab completion, which is rather unfortunate. Am I missing something?

@abo-abo
Copy link
Owner

abo-abo commented Apr 6, 2017

Can you provide a minimal working code example so that I can debug it?

@xendk
Copy link
Author

xendk commented Apr 6, 2017

(defun xen-test ()
  (interactive)
  (ivy-read
   "Test: "
   #'xen-test-cantidates
   :dynamic-collection t
   :action (lambda (x) (message "%S" x))
   :history 'xen-test-history
   :require-match t
   :sort t
   :caller 'xen-test))

(defun xen-test-cantidates (str)
  (list "PrefixA" "PrefixB" "PrefixC"))

Running xen-test and typing "Pre" and pressing tab, I'd expect it to expand to "Prefix" but nothing happens. Pressing tab again selects "PrefixA".

@abo-abo abo-abo closed this as completed in fee9810 Apr 6, 2017
@abo-abo
Copy link
Owner

abo-abo commented Apr 6, 2017

Thanks, please test.

@xendk
Copy link
Author

xendk commented Apr 7, 2017

👍 Works like a charm.

BTW, thanks for ivy, avy, swiper and hydra.

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

No branches or pull requests

2 participants