mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
[nvim] properly display wavy underlines under spelling mistakes now that I have enabled all termcap features of kitty
This commit is contained in:
parent
b15a03c3f9
commit
851a494eb0
2 changed files with 11 additions and 6 deletions
|
@ -137,10 +137,15 @@
|
|||
hi! link ctrlsfMatch Search
|
||||
hi! link ctrlsfLnumMatch ctrlsfMatch
|
||||
|
||||
call s:hi('SpellBad', 'bg', '', 'undercurl', 0x8)
|
||||
call s:hi('SpellLocal', 'bg', '', 'undercurl', 0xC)
|
||||
call s:hi('SpellCap', 'bg', '', 'undercurl', 0xD)
|
||||
call s:hi('SpellRare', 'bg', '', 'undercurl', 0xE)
|
||||
let s:is_kitty = $TERM ==# 'xterm-kitty'
|
||||
let s:spell_fg = s:is_kitty ? '' : 'bg'
|
||||
let s:spell_bg = s:is_kitty ? 'NONE' : ''
|
||||
let s:spell_attr = s:is_kitty ? 'undercurl' : ''
|
||||
call s:hi('SpellBad', s:spell_fg, s:spell_bg, s:spell_attr, 0x8)
|
||||
call s:hi('SpellLocal', s:spell_fg, s:spell_bg, s:spell_attr, 0xC)
|
||||
call s:hi('SpellCap', s:spell_fg, s:spell_bg, s:spell_attr, 0xD)
|
||||
call s:hi('SpellRare', s:spell_fg, s:spell_bg, s:spell_attr, 0xE)
|
||||
unlet s:is_kitty s:spell_fg s:spell_bg s:spell_attr
|
||||
|
||||
call s:hi('Sneak', 'bg', 0xB, 'bold', '')
|
||||
hi! link SneakScope Visual
|
||||
|
|
|
@ -44,9 +44,9 @@ endif
|
|||
let l:cmd = a:cmd
|
||||
if &modified
|
||||
let l:answer = confirm("Save changes?", "&Yes\n&No\n&Cancel")
|
||||
if l:answer is# 1 " Yes
|
||||
if l:answer ==# 1 " Yes
|
||||
write
|
||||
elseif l:answer is# 2 " No
|
||||
elseif l:answer ==# 2 " No
|
||||
let l:cmd .= '!'
|
||||
else " Cancel/Other
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue