catppuccin / nvim

🍨 Soothing pastel theme for (Neo)vim
MIT License
5.7k stars 257 forks source link

SpecialKey is highlighted the same way as text #546

Closed ArtAndreev closed 1 year ago

ArtAndreev commented 1 year ago

Description

Invisible characters like <CR> are printed like ^M in vim and in another color. The colorscheme doesn't distinguish text and them currently:

image

nvim -u NONE:

image

This makes it hard to understand this is a text or a special character.

:hi SpecialKey says:

:hi SpecialKey
SpecialKey     xxx guifg=#cdd6f4
:hi Normal
Normal         xxx guifg=#cdd6f4 guibg=#1e1e2e

Neovim version

NVIM v0.9.1
Build type: Release
LuaJIT 2.1.0-beta3

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.9.1/share/nvim"

Run :checkhealth for more info

Terminal and multiplexer

alacritty 0.12.2 with tmux 3.3a

Catppuccin version / branch / rev

branch main, rev e0dd3f9bb1513c98ab4ef9404ea26e18babf858a

Steps to reproduce

  1. nvim -u repro.lua
  2. insert carriage return (in insert mode <c-v><c-m>)

Expected behavior

another color for <cr> (^M in visual)

Actual behavior

same as text

Repro

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "catppuccin/nvim",
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("catppuccin")
-- add anything else here
ArtAndreev commented 1 year ago

Thank you! Looks good!

image