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

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

Comments

Projects
None yet
2 participants
@xendk

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

This comment has been minimized.

Show comment
Hide comment
@abo-abo

abo-abo Apr 6, 2017

Owner

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

Owner

abo-abo commented Apr 6, 2017

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

@xendk

This comment has been minimized.

Show comment
Hide comment
@xendk

xendk 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".

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 in fee9810 Apr 6, 2017

@abo-abo

This comment has been minimized.

Show comment
Hide comment
@abo-abo

abo-abo Apr 6, 2017

Owner

Thanks, please test.

Owner

abo-abo commented Apr 6, 2017

Thanks, please test.

@xendk

This comment has been minimized.

Show comment
Hide comment
@xendk

xendk Apr 7, 2017

👍 Works like a charm.

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

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