unblevable / quick-scope

Lightning fast left-right movement in Vim
MIT License
1.42k stars 54 forks source link

Underline not working #76

Closed 1aryanpro closed 2 years ago

1aryanpro commented 2 years ago

The plugin isn't underlining the characters however I am getting colors for both the primary and secondary highlights. Here is my config for Quick-scope:

" Trigger a highlight in the appropriate direction when pressing these keys:
let g:qs_highlight_on_keys = ['f', 'F', 't', 'T']

highlight QuickScopePrimary guifg='#00C7DF' gui=underline ctermfg=155 cterm=underline
highlight QuickScopeSecondary guifg='#afff5f' gui=underline ctermfg=81 cterm=underline

let g:qs_hi_priority = 9

I also tried to set the priority higher but that didn't change anything. The underlines from other plugins like Coc are working and I haven't had any problem with those.

bradford-smith94 commented 2 years ago

My own config uses underline and it still works for me.

On further testing I've realized that my config uses the autocmd configuration I recommended in the Readme cusomize-colors section. When I switch to just having highlight lines as you have shown then the underline does not work.

I'm not sure why only the underline seems to be effected, but based on the fix I'd say something (likely another plugin) may be messing with colorscheme related setting causing it to lose the highlight. I think changing your config to the autocmd version should fix it though.

augroup qs_colors
  autocmd!
  autocmd ColorScheme * highlight QuickScopePrimary guifg='#00C7DF' gui=underline ctermfg=155 cterm=underline
  autocmd ColorScheme * highlight QuickScopeSecondary guifg='#afff5f' gui=underline ctermfg=81 cterm=underline
augroup END

(Like mentioned if the Readme, if you set a colorscheme <colorsname> anywhere in your config make sure this block comes before that).