Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SpecialKey is highlighted the same way as text #546

Closed
ArtAndreev opened this issue Jul 17, 2023 · 1 comment · Fixed by #547
Closed

SpecialKey is highlighted the same way as text #546

ArtAndreev opened this issue Jul 17, 2023 · 1 comment · Fixed by #547
Labels
bug Something isn't working

Comments

@ArtAndreev
Copy link
Contributor

ArtAndreev commented Jul 17, 2023

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 e0dd3f9

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 ArtAndreev added the bug Something isn't working label Jul 17, 2023
@ArtAndreev
Copy link
Contributor Author

Thank you! Looks good!

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant