mirror of
https://github.com/chenasraf/vim-matchup.git
synced 2026-05-18 01:38:57 +00:00
@@ -1086,7 +1086,8 @@ function! s:add_matches(corrlist, ...) " {{{1
|
||||
endif
|
||||
|
||||
if exists('s:ns_id')
|
||||
if strlen(l:corr.match) == 0
|
||||
if strlen(l:corr.match) == 0 && !matchup#ts_engine#get_option(
|
||||
\ bufnr('%'), 'disable_virtual_text')
|
||||
call nvim_buf_set_extmark(0, s:ns_id,
|
||||
\ l:corr.lnum - 1, l:corr.cnum - 1, {
|
||||
\ 'virt_text': [['◀ ' . a:corrlist[0].match, l:group]],
|
||||
|
||||
@@ -320,10 +320,11 @@ local function opt_tbl_for_lang(opt, lang)
|
||||
end
|
||||
|
||||
function M.get_option(bufnr, opt_name)
|
||||
local config = configs.get_module('matchup')
|
||||
local config = configs.get_module('matchup') or {}
|
||||
local lang = parsers.get_buf_lang(bufnr)
|
||||
if (opt_name == 'include_match_words'
|
||||
or opt_name == 'additional_vim_regex_highlighting') then
|
||||
or opt_name == 'additional_vim_regex_highlighting'
|
||||
or opt_name == 'disable_virtual_text') then
|
||||
return opt_tbl_for_lang(config[opt_name], lang)
|
||||
end
|
||||
error('invalid option ' .. opt_name)
|
||||
|
||||
Reference in New Issue
Block a user