refactor(qf): move syntax code for qf-toc to qf.lua #34879

This commit is contained in:
Phạm Bình An
2025-07-12 08:13:20 +07:00
committed by GitHub
parent 8c6ea76ebc
commit f1babb322b
2 changed files with 8 additions and 6 deletions

8
runtime/syntax/qf.lua Normal file
View File

@@ -0,0 +1,8 @@
--- Hide file name and line number for filetype outline (TOC)
local w = vim.w
local qf_toc_title_regex = vim.regex [[\<TOC$\|\<Table of contents\>]]
if w.qf_toc or (w.quickfix_title and qf_toc_title_regex:match_str(w.quickfix_title)) then
vim.wo.conceallevel = 3
vim.wo.concealcursor = 'nc'
vim.cmd [[syn match Ignore "^[^|]*|[^|]*| " conceal]]
end