.config/nvim/lua/config/autocmds.lua

changeset 1080
83c9f8460bde
parent 1078
aa4c1aa529a5
child 1082
098f661195c1
equal deleted inserted replaced
1079:b59861305252 1080:83c9f8460bde
57 -- simplify noisy :ltag output 57 -- simplify noisy :ltag output
58 if string.match(vim.w.quickfix_title, "^ltag") then 58 if string.match(vim.w.quickfix_title, "^ltag") then
59 -- Hide ctags regex anchors 59 -- Hide ctags regex anchors
60 fn.matchadd("Conceal", [[\m|\zs\^\\V\|\\$\ze|]]) 60 fn.matchadd("Conceal", [[\m|\zs\^\\V\|\\$\ze|]])
61 61
62 -- highlight match in line. if tagname begins with / the rest is a \V 62 -- highlight match in line. if tagname begins with / the rest is a \v
63 -- regex. match must be between vertical bars, so its the 2nd column. 63 -- regex. match must be between vertical bars, so its the 2nd column.
64 local tagmatch = string.gsub(vim.fn.gettagstack().items[1].tagname, "^/", "\\V", 1) 64 local tagmatch = string.gsub(vim.fn.gettagstack().items[1].tagname, "^/", "\\v", 1)
65 fn.matchadd("Underlined", [[\m|.*\zs]] .. tagmatch .. [[\m\ze.*|]]) 65 fn.matchadd("Underlined", [[\m|.*\zs]] .. tagmatch .. [[\m\ze.*|]])
66 end 66 end
67 67
68 -- easy close 68 -- easy close
69 vim.keymap.set("n", "q", "<C-w>q", { buffer = true }) 69 vim.keymap.set("n", "q", "<C-w>q", { buffer = true })

mercurial