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

where to config the underline? #173

Open
chunyang-wen opened this issue Nov 15, 2021 · 8 comments
Open

where to config the underline? #173

chunyang-wen opened this issue Nov 15, 2021 · 8 comments
Labels
config reference Some Advanced Configuration Examples Can be Referenced by other Users help wanted

Comments

@chunyang-wen
Copy link

I am using rainbow with the default configuration. That means: install rainbow with vim-plug and set it

let g:rainbow_active = 1

image

aaa = 1
b = (aaa,)

I want to remove the underline, as it seems that it is not correct.

image

When I call :RainbowToggle, the underline is gone.

I have search google and try to read the vimscript of rainbow, but I found nothing useful.

  • operators config?
  • underline not found
  • cterm: no suspicious clue found
@chunyang-wen chunyang-wen changed the title where to config the underline theme? where to config the underline? Nov 15, 2021
@luochen1990
Copy link
Owner

Maybe you can find something useful in README.md of this repo (search guis and cterms), and from vim help (:h attr-list)

@chunyang-wen
Copy link
Author

I‘d like to remove, not add attribute. I have search *.vim in rainbow, there seems no underline configuration.

@luochen1990
Copy link
Owner

You can read the README about troubleshooting, and use the tool to check which syntax rule is actived.
Could that be spell checking?

@chunyang-wen
Copy link
Author

Yes, it is the spell check. But I found that the configuration is different with the README.

'parentheses_options': 'contains=@Spell'

to turn off the spell checker.

I have add the spell related configuration in vimrc

set spell spelllang=en_us
hi clear SpellBad
hi SpellBad cterm=underline
hi clear SpellRare
hi SpellRare cterm=underline
hi clear SpellCap
hi SpellCap cterm=underline
hi clear SpellLocal
hi SpellLocal cterm=underline

@91khr
Copy link
Contributor

91khr commented Dec 4, 2021

to turn off the spell checker

But the configuration to explicitly turn off spell check in parentheses is 'parentheses_options': 'contains=@NoSpell'. (
And by default rainbow wouldn't modify the spell check option, that is, if you don't turn on the spell check explicitly, rainbow wouldn't turn it on for you.

@CaiJinKen
Copy link

I have same question. How to cancel spell check in the plugin
vimrc:

let g:rainbow_active = 1
nmap <leader>p :RainbowToggle<cr> 

result:
image

@luochen1990
Copy link
Owner

luochen1990 commented Jul 22, 2024

to turn off the spell checker

But the configuration to explicitly turn off spell check in parentheses is 'parentheses_options': 'contains=@NoSpell'. ( And by default rainbow wouldn't modify the spell check option, that is, if you don't turn on the spell check explicitly, rainbow wouldn't turn it on for you.

The trick is , vim, by default, will check if there is any syntax rules about spell checking, if there is @Spell, then top level default will become no spell checking, and if there is @NoSpell, the default rule will become spell checking enabled...

So the solution is define your own top level spell checking default instead of let vim decide it for you.

@luochen1990 luochen1990 added the config reference Some Advanced Configuration Examples Can be Referenced by other Users label Jul 22, 2024
@CaiJinKen
Copy link

I dont think its a good idea to use spell checker in brackets match plugin. I mean the plugin just display brackets with rainbow maybe better, keep it simple, or provide some options to user.
Here is part of my .vimrc configuration maybe useful to others:

" set spell spelllang=en_us                       " turn of spell check

let g:rainbow_active = 1                            " active rainbow
nmap <leader>p :RainbowToggle<cr>     " set key map

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config reference Some Advanced Configuration Examples Can be Referenced by other Users help wanted
Projects
None yet
Development

No branches or pull requests

4 participants