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

cchars displayed with label highlighting #271

Closed
BertrandSim opened this issue Apr 6, 2021 · 2 comments
Closed

cchars displayed with label highlighting #271

BertrandSim opened this issue Apr 6, 2021 · 2 comments

Comments

@BertrandSim
Copy link

Hello!

I notice that when sneak-label-mode is enabled, concealed cchars are shown with label highlighting.

Here is an example with .tex

image

" vimrc

call plug#begin('~/.vim/plugged')
  Plug 'lervag/vimtex'
  Plug 'justinmk/vim-sneak'
call plug#end()

let g:sneak#label = 1
% tex

$\alpha$ $\beta$
word word word

On the last line, pressing swo highlights α and β, even with set conceallevel=0.


I noticed that there are similar issues. However, those are specific to the Indent Line plugin. In general, this seems to occur with any buffer that uses cchars.
I also noticed that #244 attempted to fix this issue, but the bug still persists.

I had a glance at the code for #244, and my hunch is that getmatches() only picks up groups defined by matchadd() and :match, and does not pick up groups defined by

syntax match {name} {regex} contained conceal cchar={char}
@justinmk
Copy link
Owner

justinmk commented Jul 3, 2021

There's no good way to fix this without causing other problems, AFAIK. #252 is a particular case of a general Vim limitation.

@justinmk
Copy link
Owner

justinmk commented Aug 5, 2023

#303 fixes this for Nvim.

@justinmk justinmk closed this as completed Aug 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants