-
-
Notifications
You must be signed in to change notification settings - Fork 172
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
helix: primary cursor should be differentiated #688
Comments
Thanks for this excellent bug report! Currently, Stylix delegates Helix' theming to https://github.com/tinted-theming/base16-helix: Lines 4 to 6 in a2d66f2
Consider patching the upstream theme and then submitting a Stylix PR to update the |
I was wondering how to make the effect. If it helps, I found out how to set the things you want! programs.helix.settings.theme = "my-stylix";
home.file.".config/helix/themes/my-stylix.toml".source = toml.generate "my-stylix.toml" {
# Get the default values fro the stylix config
inherits = "stylix";
# Enter your patches here
# This will become the cursor of the selections
"ui.cursor" = {
fg = "base0B"; # usually it is base0A, but that will be the primary now
modifiers = [ "reversed" ];
};
# This is the color of the primary cursor, i.e., the one you always see
"ui.cursor.primary" = {
fg = "base0A";
modifiers = [ "reversed" ];
};
# Similar thing with the selection color
# Also, you can play with setting the fg to *background*
# And putting the color in the bg variable ;)
# This will become the color of the selections
"ui.selection" = {
fg = "base03"; # It would be base02, but that is the primary now
};
# This is the color of the primary/inline selection where the primary cursor is now
"ui.selection.primary "= {
fg = "base02";
};
# This one is a bonus: the matching element (like a bracket) will be underlined
# I somehow lose track which cursor is mine and which is just a highlight...
"ui.cursor.match" = {
fg = "base0A";
modifiers = [ "underlined" ];
};
}; This will suffice for now, but some of there changes could be implemented upstream too. Maybe I will take a look at it, but since I am not well versed in theming, I am not sure how good the coloring would be 😂 |
In helix, you can have multiple cursors operating on different selections in a file. You can cycle between them and remove selections. At any one time, one of the selections is considered to be primary and you can use keybindings to keep or dismiss it.
For example:
(Dracula_at_night)
(Ayu_dark)
Both these themes give the ability to differentiate between primary and secondary selections (with varying subtlety). They both rely on
ui.cursor
andui.cursor.primary
, andui.selection
andui.selection.primary
being visually distinct.In stylix's helix config
ui.cursor
is defined andui.cursor.primary
is not. Also,ui.selection
andui.selection.primary
are both defined as base02.Here's what that looks like with the stylix config:
(Stylix)
The text was updated successfully, but these errors were encountered: