Skip to content

Commit

Permalink
feat(syntax): support \nameref
Browse files Browse the repository at this point in the history
refer: #2208
  • Loading branch information
lervag committed Oct 17, 2021
1 parent 4b3ceb9 commit 83abc4e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions autoload/vimtex/syntax/p/hyperref.vim
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"

function! vimtex#syntax#p#hyperref#load(cfg) abort " {{{1
call vimtex#syntax#packages#load('nameref')

syntax match texCmdHyperref '\\autoref\>' nextgroup=texRefOpt,texRefArg
syntax match texCmdHyperref '\\hyperref\>' nextgroup=texRefOpt,texRefArg

Expand Down
13 changes: 13 additions & 0 deletions autoload/vimtex/syntax/p/nameref.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
" VimTeX - LaTeX plugin for Vim
"
" Maintainer: Karl Yngve Lervåg
" Email: karl.yngve@gmail.com
"

function! vimtex#syntax#p#nameref#load(cfg) abort " {{{1
syntax match texCmdNameref '\\[nN]ameref\>' nextgroup=texRefOpt,texRefArg

highlight def link texCmdNameref texCmd
endfunction

" }}}1

0 comments on commit 83abc4e

Please sign in to comment.