amp icon indicating copy to clipboard operation
amp copied to clipboard

"No Theme" theme: use terminal default colors

Open NoraCodes opened this issue 3 years ago • 5 comments

I have my terminal set to a nice background/foreground contrast ratio:

Screen Shot 2020-07-29 at 11 37 43 AM

Amp does not look very good with this setup:

Screen Shot 2020-07-29 at 11 38 08 AM

It would be very nice to be able to use those colors in Amp without having to write a custom theme to change fg/bg colors. In other words, I'd like to be able to just use terminal colors, and have my terminal change the colors for me, so that Amp fits in with the rest of my desktop.

NoraCodes avatar Jul 29 '20 16:07 NoraCodes

Hi @NoraCodes, I was looking tor a nice theme for the amp, I'm too didnt want to write one from the scrach, I realy wanted groovbox theme. Even I didnt find one I find this repo full of themes. I know is not what you asking, but it might help you to find a "close enouth" theme which you can modify to your needs.

My- avatar Nov 14 '20 21:11 My-

I too was in this situation @NoraCodes ! And I actually did what @My- suggested (find some themes to modify) I love GruvBox dark too! annoyingly, I use Gruvbox-dark-pale (a washed out, low-contrast version) whilst 90% of utils provide the standard version. Thanks for sharing the repo of themes you found @My- (some nice ones in there). Here is the repo I found: Base16 TextMate it has all the Base16 themes (about 150+) including Gruvbox-dark/light/soft/pale, Nord, Dracula etc etc. Plus its updated more often than the repo @My- found too (the repo owner Chris Kempson is the creator of Base16). Hope that helps you both (and anyone else that finds this issue) 👍 Still... not every theme is there, so perhaps a default theme (one that respects the 16 colors set my our terminal theme) would be a good idea for those who have custom themes like @NoraCodes has. (for now though Nora, I would do like @My- suggested, grab a similar theme from one of the repos, and modify that for use). Base16 TextMate: https://github.com/chriskempson/base16-textmate

nerd190 avatar Feb 23 '21 15:02 nerd190

@NoraCodes thanks for the suggestion! Would you be able to take a screenshot of Vim with a syntax-highlighted buffer open? I think that's the tricky part: fg/bg is fairly straight-forward, but once we get into syntax highlighting, we need to make some decisions about which colors to use. Amp used to have a really simply highlighting system, but after adopting syntect/Sublime grammars, I started delegating all of that logic to the themes.

jmacdonald avatar Mar 02 '21 14:03 jmacdonald

I do think it's totally fine to delegate syntax highlighting to themes; I just want a way to tell Amp to use ANSI Default (i.e. Esc[0m) rather than explicitly setting the background. That could even be a special value in a theme file, that would be fine.

NoraCodes avatar Mar 08 '21 03:03 NoraCodes

I second this suggestion for Esc[0m backgrounds and 16-color themes in general - it would make themeing a ton easier across TUI apps and also allow amp to display over terminals with a semi-transparent background, at least as I understand ANSI escape codes and amp.

However, looking at amp's code, it seems like syntect handles nearly all colors, and an issue which is nearly identical to this was opened on their repo with respect to a different Rust text editor, hired: https://github.com/trishume/syntect/issues/309. That issue contains some code and ideas for solving the problem here.

Currently, I have neither the time nor the familiarity with amp's codebase to implement anything myself, but if anybody wants to do so, and the linked issue is helpful, that would be fantastic! Otherwise I can come back to it when I have more time in a few months.

Additionally, here's the requested screenshot of vim (really neovim) with 16-color syntax highlighting: 2021-04-12-150915_804x960_scrot

Thanks for making an amazing editor!

oldaccountdeadname avatar Apr 12 '21 21:04 oldaccountdeadname