Skip to content

Conversation

@q60
Copy link

@q60 q60 commented Apr 8, 2025

basically this pr makes color swatches even more cool adding configuration via editor.lsp.color-swatches-string. i've experimented a bit with longer strings and that's exactly what i need looking at the colors - how they look with different symbols. with some it can be hard to differentiate whether the color is really readable or not

why though? because i really like circles (and helix) and it's time for me to contribute to one of my favorite projects :3

cc @nik-rev

image

try it for yourself w/ different strings/symbols like these: , , ,

i guess this pr should be merged before i begin on working something else about these cute tiny swatches

@nik-rev
Copy link
Contributor

nik-rev commented Apr 8, 2025

nice!

helix has support for color swatches in completion menu too, so helix-term/src/ui/completion.rs should also use this config to be consistent:

.map_or("color".into(), |color| {
    Spans::from(vec![
        Span::raw("color "),
        Span::styled("■", Style::default().fg(color)),
    ])
}),

@nik-rev
Copy link
Contributor

nik-rev commented Apr 8, 2025

I feel like this would be fitting for #12369, to enable customization in the same place as other icons (considering that other completion items could also be customized in that PR)

@RoloEdits
Copy link
Contributor

This is actually already supported there 😄

image
image

My config:
image

@q60
Copy link
Author

q60 commented Apr 8, 2025

nice!

helix has support for color swatches in completion menu too, so helix-term/src/ui/completion.rs should also use this config to be consistent:

.map_or("color".into(), |color| {
    Spans::from(vec![
        Span::raw("color "),
        Span::styled("■", Style::default().fg(color)),
    ])
}),

i've looked at the code and to me there's no sane way of using my approach for completion menu which is a bummer...

I feel like this would be fitting for #12369, to enable customization in the same place as other icons (considering that other completion items could also be customized in that PR)

waow what a pr... there's a bunch of things i want to see in helix

This is actually already supported there 😄

i see, looks cool! as it's currently conceptual and experimenting, what should i do now with my pr?

@RoloEdits
Copy link
Contributor

You can leave it open, as discussion is never a bad thing, and there are still some things to work out, you never know how ideas can evolve or where they come from.

I definitely think a unified solution would be considered over a bunch of ad hoc config options. Its experimental, but I think its making good headway. Feel free to also look over that PR and give any feedback you may have!

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 this pull request may close these issues.

3 participants