Skip to content
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

Feature request: Cursor colours by mode #21

Closed
dxmh opened this issue Jan 24, 2023 · 0 comments · Fixed by #25
Closed

Feature request: Cursor colours by mode #21

dxmh opened this issue Jan 24, 2023 · 0 comments · Fixed by #25

Comments

@dxmh
Copy link

dxmh commented Jan 24, 2023

Helix has recently added support for coloured cursors depending on mode (i.e. normal, insert, select):

helix-editor/helix#5130

So it's now possible for themes to set primary and non-primary cursor colours for each mode.

I've done some quick local theme overrides to Catppuccin Mocha in order to demo this functionality in the clip below:

cursor-colours.mov

This makes for a really nice editing experience and it would be great to have this functionality as part of this official Catppuccin theme for Helix. 🙂

In case it's helpful, below is the theme override configuration I used for the clip above.


From my NixOS config:

{
  programs.helix.themes = {
    custom = {
      "inherits" = "catppuccin_mocha";
      "ui.statusline.normal" = { fg = "base"; bg = "lavender"; };
      "ui.statusline.insert" = { fg = "base"; bg = "green"; };
      "ui.statusline.select" = { fg = "base"; bg = "yellow"; };
      "ui.cursor.primary.normal" = { fg = "base"; bg = "lavender"; };
      "ui.cursor.primary.insert" = { fg = "base"; bg = "green"; };
      "ui.cursor.primary.select" = { fg = "base"; bg = "yellow"; };
      # The non-primary cursor colours need to be a dimmed version of the above
      "ui.cursor.normal" = { fg = "base"; bg = "#A6ADC8"; };
      "ui.cursor.insert" = { fg = "base"; bg = "#AACCC6"; };
      "ui.cursor.select" = { fg = "base"; bg = "#B6A98B"; };
    };
  };
}

Please note that the colours and combinations were quickly thrown together and are not perfect.

It should be possible to derive something nicer when blending existing palette colours like done here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant