-
-
Notifications
You must be signed in to change notification settings - Fork 27
Issue with cider complete #89
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
Comments
The issue can be fixed by using a style dispatcher which adds a ^ before the first component. Alternatively combine the basic completion style with orderless. |
Will check thanks |
(defun mm/cider-style-dispatcher
(component idx count)
(when
(eq idx 0)
(concat "^" component)))
(setq
orderless-style-dispatchers
'(mm/cider-style-dispatcher))
tried like this but it did not do the trick yet. Adding 'basic to completion styles does help though. |
If basic works then the orderless style dispatcher you wrote should work too. Please check if you use the newest version etc and if indeed orderless passes the first component to the completion function instead of the empty string as it did before. |
Yea cider-complete still get's called with empty string on commit 62f71c3. |
Yea cider-complete still get's called with empty string on commit
62f71c3
Your dispatcher is incorrect. It must return a pair of orderless style
and transformed pattern.
~~~
;; Dispatcher
(defun orderless-prefix-dispatch (component idx _total)
(and (= idx 0)
`(orderless-regexp . ,(concat "^" (regexp-quote component)))))
;; Configure
(setq orderless-style-dispatchers '(orderless-prefix-dispatch)
completion-styles '(orderless)
completion-category-defaults nil
completion-category-overrides nil)
;; Check
(completing-read "Prompt: "
(completion-table-dynamic (lambda (input)
(list input))))
~~~
|
Nice thanks a lot. I achieved the above with something along those lines:
|
Ok, I just had a basic as a fallback style. |
Using basic as fallback is perfectly fine for dynamic tables. |
I think the current recommendation in the documentaton to use |
I did the following trick, which is a little dirty, but works quite well: clojure-emacs/cider#3019 (comment) |
Uh oh!
There was an error while loading. Please reload this page.
Hi,
my issue is for completing when the prefix is "foo/" (with
/
in the name). Somehoworderless-filter
only decides to call the completing function with the empty string but never with "foo/" which would yield the correct completions.Do you know why and can you help me fix this in some way?
Thanks for the awesome package.
If you need a repro I can check if I can make a minimal one.
The text was updated successfully, but these errors were encountered: