Skip to content

Commit

Permalink
feat(syntax): allow to create custom environment regions
Browse files Browse the repository at this point in the history
Adds option g:vimtex_syntax_custom_envs in the same spirit as the
corresponding g:vimtex_syntax_custom_cmds.

refer: #2745
  • Loading branch information
lervag committed Jul 12, 2023
1 parent 4121fdd commit 0911525
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions autoload/vimtex/options.vim
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ function! vimtex#options#init() abort " {{{1
call s:init_option('vimtex_syntax_conceal_disable', 0)
call s:init_option('vimtex_syntax_custom_cmds', [])
call s:init_option('vimtex_syntax_custom_cmds_with_concealed_delims', [])
call s:init_option('vimtex_syntax_custom_envs', [])
call s:init_option('vimtex_syntax_nested', {
\ 'aliases' : {
\ 'C' : 'c',
Expand Down
4 changes: 4 additions & 0 deletions autoload/vimtex/syntax/core.vim
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,10 @@ function! vimtex#syntax#core#init_custom() abort " {{{1
for l:item in g:vimtex_syntax_custom_cmds_with_concealed_delims
call vimtex#syntax#core#new_cmd_with_concealed_delims(l:item)
endfor

for l:item in g:vimtex_syntax_custom_envs
call vimtex#syntax#core#new_env(l:item)
endfor
endfunction

" }}}1
Expand Down

0 comments on commit 0911525

Please sign in to comment.