catppuccin icon indicating copy to clipboard operation
catppuccin copied to clipboard

nano

Open ahmadnassri opened this issue 1 year ago • 3 comments

Link to repository

http://github.com/ahmadnassri/catppuccin-nano/

Screenshots

Image

Any additional comments?

I used my best judgement to align the style guide colors to the limited options of nano colors (see color-map.json) ... feedback more than welcome o the color choices.

I'm also happy to continue maintianing / support after it's been transferred.

Submission Guidelines

  • [x] I have read and followed Catppuccin's submission guidelines.

ahmadnassri avatar Mar 08 '25 22:03 ahmadnassri

hey, thanks for the submission!

i think you've done a good job of this considering the severe limitations you're working under. the syntax highlighting is very different from most of our code editor ports, however it's understandable given how it is being generated.

in an ideal world we'd want to edit those *.nanorc syntax files individually to get as close to the style guide as possible, but that feels like a huge ask up front. i'd personally be fine with adopting this with the syntax highlighting as-is. we can always think about possibilities for improvement later on.

that aside, i only really have two concerns with this port:

  1. the styling of the ui elements surrounding the editor (line numbers, shortcuts) leave something to be desired. the shortcuts bar along the bottom is very low contrast, i'm concerned it may be unreadable for some people:

Image

Image

frappe also has a completely different frame to the others; that bluish purple as opposed to the grey on latte, macchiato, and mocha.

i'm aware these might be limitations of nano, but if there's anything we can do to improve contrast & consistency there i'd be happier!

  1. in the distributed .nanorc file you've set some unrelated (i presume) options like tabsize and autoindent. as an org we've been moving away from shipping those kinds of settings and instead erring on the side of visual configuration only.

to make it clear that users don't have to replace their entire configuration to use this port, it might be worth rewording the instructions slightly to something like this:

add the contents of dist/<flavor>/.nanorc to the end of your nano config file: cat ~/.nano/dist/<flavor>/.nanorc >> ~/.nanorc

and then include a comment at the top of the generated .nanorc files like # catppuccin <flavor> to visually separate it from prior user config such as line numbers.

i hope that makes sense, please let me know your thoughts.

backwardspy avatar Mar 09 '25 21:03 backwardspy

another thought i had while testing; if you don't include the theme files then nano seems to make decent use of your terminal colours:

Image

Image

do you think it's worth relying more heavily on those instead of redefining all the syntax files?

backwardspy avatar Mar 09 '25 22:03 backwardspy

the styling of the ui elements surrounding the editor (line numbers, shortcuts) leave something to be desired. the shortcuts bar along the bottom is very low contrast, i'm concerned it may be unreadable for some people:

this is the area I would need some help with, as I'm not a designer / don't have a good eye for those things ... (also see below regarding mapping)

frappe also has a completely different frame to the others; that bluish purple as opposed to the grey on latte, macchiato, and mocha.

this is where the mapping logic comes into play:

the nano config:

set numbercolor normal,brightblack

the mapping:

normal => text
brightblack => surface2

so those colors are following the same values, and they will look different per flavor.

I tried to follow the Style Guide as best as I could. but again, this is where a better design / ux eye than mine is more than welcome to advise on best approach.

another thought i had while testing; if you don't include the theme files then nano seems to make decent use of your terminal colours:

that's true, ultimately the colors in nano will be translated to terminal colors:

https://github.com/madnight/nano/blob/494dac55dd26215c0d12f7e1939f42c4e4c463a1/src/rcfile.c#L1026-L1045

that said, not all these colors are represented in different terminal themes, e.g. catppuccin's Windows Terminal is limited to just the basic colors: https://github.com/catppuccin/windows-terminal/blob/4d8bb2f00fb86927a98dd3502cdec74a76d25d7b/mocha.json#L10-L17

in the distributed .nanorc file you've set some unrelated (i presume) options like tabsize and autoindent. as an org we've been moving away from shipping those kinds of settings and instead erring on the side of visual configuration only.

yes, you are coorrect, and I had thought I removed those before committing, I will fix.

ahmadnassri avatar Mar 11 '25 13:03 ahmadnassri