Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

### Bugs fixed

- [#3696](https://github.com/clojure-emacs/cider/pull/3696): Don't eagerly complete a candidate if there are other candidates matching `flex` style.

## 1.14.0 (2024-05-30)

### New features
Expand Down
2 changes: 1 addition & 1 deletion cider-completion.el
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ Only affects the `cider' completion category.`"
(unless found-styles
(setq found-styles '(styles basic)))
(unless (member 'flex found-styles)
(setq found-styles (append found-styles '(flex))))
(setq found-styles (apply #'list 'styles 'flex (cdr found-styles))))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you can add here a comment similar to the description of the ticket, so people would understand better the need for this bit of code. Feel free do directly commit the comment if you agree with me it'd be useful.

(add-to-list 'completion-category-overrides (apply #'list 'cider found-styles (when found-cycle
(list found-cycle))))))

Expand Down
2 changes: 1 addition & 1 deletion test/cider-completion-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
(unwind-protect
(progn
(it "adds `flex' and `basic' as a fallback"
(let ((expected-category-overrides '((cider (styles basic flex)))))
(let ((expected-category-overrides '((cider (styles flex basic)))))
(cider-enable-flex-completion)
(expect (member 'flex (assq 'styles (assq 'cider completion-category-overrides)))
:to-be-truthy)
Expand Down