Fork me on GitHub
#emacs
<
2023-10-12
>
magnars06:10:42

I'm using Vertico and Orderless with orderless-prefixes so was hoping to match matvaretabellen.ingest with query mat in or , but it seems like . is not treated as a word boundary in this case. Any ideas what I'm doing wrong, or how I can fix it?

mpenet06:10:01

you need to escape the .

mpenet06:10:57

oh nevermind you mentioned prefixes, no clue then

magnars07:10:25

Turns out this is only the case in my CIDER REPL, for some reason. I'll investigate further.

djm09:10:03

I don’t think CIDER and orderless play nicely together. Are you aware of the issues described in https://github.com/oantolin/orderless/issues/89 and https://github.com/clojure-emacs/cider/issues/3019 ?

magnars09:10:15

Interesting! Thank you 🙏

vemv10:10:36

https://github.com/clojure-emacs/cider/commit/7e68df2bf930f9ea577ffa76172a0b00ff391fe3 hopefully made things clearer than they were before. They way forward to actually use orderless would be to pick up this snippet, or some variation https://github.com/clojure-emacs/cider/issues/3019#issuecomment-1029553163 and productionize it

Benjamin09:10:26

works super nice for me:

(defun mm/cider-complete-at-point ()
  "Complete the symbol at point."
  (when (and (cider-connected-p)
             (not (cider-in-string-p)))
    (when-let*
        ((bounds
          (bounds-of-thing-at-point
           'symbol))
         (beg (car bounds))
         (end (cdr bounds))
         (completion
          (append
           (cider-complete
            (buffer-substring beg end))
           (get-text-property
            (point)
            'cider-locals))))
      (list
       beg
       end
       (completion-table-dynamic
        (lambda (_) completion))))))

(advice-add 'cider-complete-at-point :override #'mm/cider-complete-at-point)