Invisible characters like <CR> are printed like ^M in vim and in another color. The colorscheme doesn't distinguish text and them currently:
nvim -u NONE:
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
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
Description
Invisible characters like
<CR>
are printed like^M
in vim and in another color. The colorscheme doesn't distinguish text and them currently:nvim -u NONE
:This makes it hard to understand this is a text or a special character.
:hi SpecialKey
says:Neovim version
Terminal and multiplexer
alacritty 0.12.2 with tmux 3.3a
Catppuccin version / branch / rev
branch main, rev e0dd3f9bb1513c98ab4ef9404ea26e18babf858a
Steps to reproduce
nvim -u repro.lua
<c-v><c-m>
)Expected behavior
another color for
<cr>
(^M in visual)Actual behavior
same as text
Repro