rebelot / kanagawa.nvim

NeoVim dark colorscheme inspired by the colors of the famous painting by Katsushika Hokusai.
MIT License
3.94k stars 162 forks source link

Doom Emacs #127

Open jakobneufeld opened 1 year ago

jakobneufeld commented 1 year ago

Hi all, I am using kanagawa on nvim and I wanted to use it with doom Emacs too. The question is, that if you just place the kanagawa.el (the file in the extra folder) in the themes folder, the theme looks weird, and the colors are messed up. How am I supposed to use kanagawa with doom emacs?

Any help is appreciated

Jaeyong-Cho commented 1 year ago

Hi,

I encountered the same issue in terminal emacs and resolved it by using xterm-24bit colors because kanagawa-theme.el only supports GUI/24 color.

  1. Write terminfo-24bit.src file
    # Use colon separators.
    xterm-24bit|xterm with 24-bit direct color mode,
    use=xterm-256color,
    setb24=\E[48:2:%p1%{65536}%/%d:%p1%{256}%/%{255}%&%d:%p1%{255}%&%dm,
    setf24=\E[38:2:%p1%{65536}%/%d:%p1%{256}%/%{255}%&%d:%p1%{255}%&%dm,
    # Use semicolon separators.
    xterm-24bits|xterm with 24-bit direct color mode,
    use=xterm-256color,
    setb24=\E[48;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%dm,
    setf24=\E[38;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%dm,
  2. Run: tic -x -o ~/.terminfo terminfo-24bit.src
  3. Run emacs with xterm-24bit colors: TERM=xterm-24bit emacs -nw

See also https://stackoverflow.com/questions/14672875/true-color-24-bit-in-terminal-emacs/50577683#50577683 https://www.gnu.org/software/emacs/manual/html_node/efaq/Colors-on-a-TTY.html