protesilaos / modus-themes

Highly accessible themes for GNU Emacs, conforming with the highest standard for colour contrast between background and foreground values (WCAG AAA).
https://protesilaos.com/emacs/modus-themes
GNU General Public License v3.0
570 stars 30 forks source link

Meow support #116

Open ZharMeny opened 2 months ago

ZharMeny commented 2 months ago

The Meow package^1 is a modal editing... mode, akin to Viper. Meow defines a handful of faces, most of which (not all) inherit from generic faces and colours. You can take a look at how the faces Meow uses look in practice with the tutorial^2.

protesilaos commented 2 months ago

In the file you linked, there is this code block:

<define your meow-setup>
(require 'meow)
(meow-setup)
(meow-global-mode 1)

What is the "meow-setup" supposed to be there? Can you show me a basic configuration?

EDIT: I mean the placeholder on the first line.

protesilaos commented 2 months ago

In the meantime, I am looking at the Meow faces. They seem to be inheriting by faces we already support. So I cannot tell on first sight if anything is obviously wrong. I will need to use the mode for a while to have a better idea.

ZharMeny commented 2 months ago

What is the "meow-setup" supposed to be there? Can you show me a basic configuration?

It should be a function that sets the keybindings for Meow, you can find an example for the QWERTY layout here: https://github.com/meow-edit/meow/blob/0611eba87ae3e86d19e2c4f50988ff2ec935f830/KEYBINDING_QWERTY.org

protesilaos commented 2 months ago

From: ZharMeny @.***> Date: Sun, 11 Aug 2024 03:30:45 -0700

What is the "meow-setup" supposed to be there? Can you show me a basic configuration?

It should be a function that sets the keybindings for Meow, you can find an example for the QWERTY layout here: https://github.com/meow-edit/meow/blob/0611eba87ae3e86d19e2c4f50988ff2ec935f830/KEYBINDING_QWERTY.org

Okay, this will let me test things. Thank you!

-- Protesilaos Stavrou https://protesilaos.com

protesilaos commented 2 months ago

Can you please try this?

;; EARLY PROTOTYPE!!!
(modus-themes-with-colors
  (custom-set-faces
   ;; FIXME 2024-08-11: Waht is a "region cursor" and should it differ
   ;; from the position highlights below?
   `(meow-region-cursor-1 ((,c :inherit (bold modus-themes-reset-soft) :background ,bg-char-0)))
   `(meow-region-cursor-2 ((,c :inherit (bold modus-themes-reset-soft) :background ,bg-char-1)))
   `(meow-region-cursor-3 ((,c :inherit (bold modus-themes-reset-soft) :background ,bg-char-2)))

   `(meow-position-highlight-number-1 ((,c :inherit (bold modus-themes-reset-soft) :background ,bg-char-0)))
   `(meow-position-highlight-number-2 ((,c :inherit (bold modus-themes-reset-soft) :background ,bg-char-1)))
   `(meow-position-highlight-number-3 ((,c :inherit (bold modus-themes-reset-soft) :background ,bg-char-2)))))

If you switch between a light and a dark theme, please evaluate this code again.

I am not familiar with Meow and the documentation of the faces does not help me understand what the intent of each of them is. As such, I am not sure what may be missing here.

The styles I sent you are similar to those of the Avy package. I think we do not need to inherit bold, but I kept it for now.

What do you think? What is missing? What is the "beacon" that Meow uses? Should we change the colours of the various states?

ZharMeny commented 2 months ago

What is the "beacon" that Meow uses?

To enter the Beacon state, select a region (e.g. by pressing l a few times) and then press G to 'grab' the selection and enter meow-beacon-mode; after that you can move around with multiple cursors on different lines mirroring your movements. You can then enter meow-insert-mode, do the edit you want, and cursors on other lines will make the same edit in the places they were in after you exit the Insert mode. meow-tutor explains that and other things Meow can do.

Should we change the colours of the various states?

This should not be necessary as all Meow states are distinct enough to not be easy to mix up:

Although there's nothing wrong with making them even more distinct with colours.