mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	 ddda5e0a48
			
		
	
	ddda5e0a48
	
	
	
		
			
			Help outlines, invoked by `gO`, displays the help section titles in the location list window. This feature is implemented by setting the buffer lines after opening the window, but this implementation breaks the assumption that the quickfix window texts are consistently constructed by the quickfix list items. I think we can use the conceal feature here. Using conceal here improves interoperability between quickfix plugins, and also simplifies the outline implementation. Originally reported at https://github.com/itchyny/vim-qfedit/issues/12
		
			
				
	
	
		
			32 lines
		
	
	
		
			881 B
		
	
	
	
		
			VimL
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			881 B
		
	
	
	
		
			VimL
		
	
	
	
	
	
| " Vim syntax file
 | |
| " Language:	Quickfix window
 | |
| " Maintainer:	The Vim Project <https://github.com/vim/vim>
 | |
| " Last Change:	2023 Aug 10
 | |
| " Former Maintainer:	Bram Moolenaar <Bram@vim.org>
 | |
| 
 | |
| " Quit when a syntax file was already loaded
 | |
| if exists("b:current_syntax")
 | |
|   finish
 | |
| endif
 | |
| 
 | |
| " A bunch of useful C keywords
 | |
| syn match	qfFileName	"^[^|]*" nextgroup=qfSeparator
 | |
| syn match	qfSeparator	"|" nextgroup=qfLineNr contained
 | |
| syn match	qfLineNr	"[^|]*" contained contains=qfError
 | |
| syn match	qfError		"error" contained
 | |
| 
 | |
| " Hide file name and line number for help outline (TOC).
 | |
| if has_key(w:, 'qf_toc') || get(w:, 'quickfix_title') =~# '\<TOC$'
 | |
|   setlocal conceallevel=3 concealcursor=nc
 | |
|   syn match	Ignore		"^[^|]*|[^|]*| " conceal
 | |
| endif
 | |
| 
 | |
| " The default highlighting.
 | |
| hi def link qfFileName	Directory
 | |
| hi def link qfLineNr	LineNr
 | |
| hi def link qfError	Error
 | |
| 
 | |
| let b:current_syntax = "qf"
 | |
| 
 | |
| " vim: ts=8
 |