-
Notifications
You must be signed in to change notification settings - Fork 31
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
Viper support #115
Comments
Thanks to ZharMeny for bringing this matter to my attention in issue 115: <#115>.
Thank you @ZharMeny! I just added preliminary support for it. Unfortunately, they do not let themes configure the colour of the cursor. The green they use is not optimal for our purposes. Anyway, please take a look. My intuition was to remove those coloured backgrounds from the minibuffer. They feel out-of-place there as they can be mistaken for the currently selected completion candidate. |
They seem to expose the configurability through
They indicate what state Viper is currently in (which is normally indicated in the mode-line, that the minibuffer lacks), and removing them may lead to confusion between Emacs state and Viper state. This can be avoided by setting |
From: ZharMeny ***@***.***>
Date: Tue, 6 Aug 2024 03:42:41 -0700
> Unfortunately, they do not let themes configure the colour of the cursor.
They seem to expose the configurability through `viper-*-cursor-color`
variables, anything on that front?
Those are defined as 'defcustom', which means that they are "user
options". I generally avoid modifying those at the theme level, though
here we are justified to take action because the defaults are
problematic.
However, we have a problem. The 'viper-vi-state-cursor-color' is an
internal variable, which captures the original value of the cursor
colour. This means that if we change to another Modus theme, we end up
with an awkward colour again.
You can try this by evaluating the following:
(defun my-modus-themes-viper-cursors (&rest _)
(modus-themes-with-colors
(custom-set-variables
`(viper-replace-overlay-cursor-color ,err)
`(viper-insert-state-cursor-color ,info)
`(viper-emacs-state-cursor-color ,fg-main))))
(add-hook 'enable-theme-functions #'my-modus-themes-viper-cursors)
Then switch to normal mode to see the old default cursor colour. In my
case, I went from a dark theme to a light one and now I cannot see the
cursor.
> My intuition was to remove those coloured backgrounds from the
> minibuffer. They feel out-of-place there as they can be mistaken for
> the currently selected completion candidate.
They indicate what state Viper is currently in (which is normally
indicated in the mode-line, that the minibuffer lacks), and removing
them may lead to confusion between Emacs state and Viper state. This
can be avoided by setting `viper-emacs-state-cursor-color` to some
distinct colour; the definition of that variable has "Magenta"
commented out.
My concern with the added backgrounds is that they can be confusing. If
we can get the cursor colours right, then we should be okay.
…--
Protesilaos Stavrou
https://protesilaos.com
|
This is quite unfortunate, I don't think it would be easy to fix that without modifying Viper itself. Thank you, anyways. |
Thanks to ZharMeny for the feedback in issue 115: <#115>.
I forgot to push the changes the other day. Did it now. Thanks! About the issue with the default cursor, I think it needs to be reported on the Emacs bug tracker. Since you are using viper, do you want to do it? You can add my email in CC: [email protected]. |
Built-in
viper-mode
changes how input text in the minibuffer looks depending on the current input mode, which looks fine with modus-operandi, but quite jarring with modus-vivendi (light background with dark text, while the rest of the screen is dark background with light text), there are also other faces that could benefit from some tweaks.The text was updated successfully, but these errors were encountered: