nex3 / perspective-el

Perspectives for Emacs.
MIT License
880 stars 71 forks source link

Marginalia annotation not working with `persp-switch-to-buffer*` #169

Closed ahmed-shariff closed 2 years ago

ahmed-shariff commented 2 years ago

I am using selectrum for completion. Since perspective generates a list as a candidate list for completing-read, when using persp-switch-to-buffer* marginalia's annotations don't work. According to https://github.com/minad/marginalia/issues/48 :

buffer completion category the problem should be fixed and you will get the usual marginalia buffer annotations which work for switch-to-buffer!

Though I have not clue what this means.

gcv commented 2 years ago

I gave it a shot. Can you try the https://github.com/nex3/perspective-el/tree/add-metadata-to-persp-switcher branch?

ahmed-shariff commented 2 years ago

sweet, thanx alot. This seems to work. I'll open a new issue if I run into anything else related to this.

gcv commented 2 years ago

Patch merged into master and should reach MELPA in a couple of hours.

ahmed-shariff commented 2 years ago

For reference for anyone looking for a solution with consult

     (consult-customize consult--source-buffer :hidden t :default nil)

     (defvar consult--source-perspective
       (list :name     "Perspective"
             :narrow   ?s
             :category 'buffer
             :state    #'consult--buffer-state
             :default  t
             :items    #'persp-get-buffer-names))

     (push consult--source-perspective consult-buffer-sources)