-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
Filtering capabilities for preview? #186
Comments
I suggest you disable previews for the commands where they disrupt you. Besides that we could thing about using some filtering/exclusion lists.
For now my recommendation is to disable previews where they don't work for you. |
This sounds great! I agree on both cases --
1. How do I add exclusions? This sounds perfect
2. I agree. I wonder if exwm can do anything about this.
|
This feature does not exist yet, at least not in a simple form. You can pull it off by overwriting the :preview function in the
This is hard, since this is a restriction of the X window system. I am really not familiar with ugly X internals. I guess an EXWM for wayland will fix this ;) |
@WorldsEndless One obvious interim solution I should have mentioned - you can set preview-keys per command as documented in the README. This allows you to use automatic preview for most commands but manual preview for the commands which are critical in your setup. By setting a manual preview key, preview behaves more like an action. |
Ah -- (use-package consult
:straight (consult :type git :host github :repo "minad/consult")
:bind (("C-c s" . consult-outline)
("C-x j j" . consult-bookmark)
("M-s l" . consult-line)
("C-h k" . tsa/consult-descbinds)
("M-y" . consult-yank-pop)
("<help> a" . consult-apropos))
:custom
(consult-config `((consult-bookmark :preview-key nil)
(consult-buffer :preview-key ,(kbd "M-p"))))
:config
(fset 'multi-occur #'consult-multi-occur)) |
I am glad this fixes this solution is satisfactory for you, since I didn't feel inclined to implement additional support for special preview filters on top. Why are you not using a preview key for consult-bookmark? Note that you can also use multiple preview keys, e.g. S-up S-down and bind these keys to selectrum-next-candidate etc. |
Note for future visitors of this issue - consult-buffer has configurable consult-buffer-sources now. This means it is possible to create multiple buffer sources with different preview behavior. In the case of EXWM it makes sense to create two buffer sources, one for the non-X buffers with preview and one for the X-buffers without preview. See also #204. |
I have several cases where consult's auto-preview brings performance-wrecking effects. Yet I still want to use consult as it provides various things that raw Selectrum doesn't cover. Consider my examples:
1-
consult-bookmark
. My bookmarks may be many things: buffers, PDFs, web pages, etc. But the one that really had an issue was mypasswords.org.gpg
file. If not recently opened, it pops up a password entry even for preview, which makes for a confusing disruption to flow.2-
consult-buffer
. Because I'm on exwm and many of my buffers are exwm ones which cannot be shared, the moment I pass over one of them with consult, it steals the exwm buffer (e.g. a browser instance) from the monitor that was looking at it. So I use a different solution.I don't have high hopes for a solution, because I think my usecases simply disagree with Consult's fundamental philsophy; but I thought I'd bring it up in case there's anything to be done, or if this helps prompt any ideas.
The text was updated successfully, but these errors were encountered: