Allow customization of header level of TOC

Instead of forcing the TOC to always be at header level 1, allow the
user to specify via the option g:vimwiki_toc_header_level what level
they want.

This defaults to 1, so if the user does nothing then the old behavior
will remain the same.
This commit is contained in:
Greg Anders
2019-03-13 08:28:22 -06:00
parent 54d1a997d9
commit bb40826def
6 changed files with 26 additions and 9 deletions

View File

@ -329,7 +329,7 @@ function! vimwiki#tags#generate_tags(...) abort
\ .vimwiki#u#escape(vimwiki#lst#default_symbol()).' '
\ .vimwiki#vars#get_syntaxlocal('rxWikiLink').'$\)'
call vimwiki#base#update_listing_in_buffer(lines, 'Generated Tags', links_rx, line('$')+1, 1)
call vimwiki#base#update_listing_in_buffer(lines, 'Generated Tags', links_rx, line('$')+1, 1, 1)
endfunction