Skip to content

Commit

Permalink
feat(syntax): support import command
Browse files Browse the repository at this point in the history
refer: #3098
  • Loading branch information
lervag committed Feb 19, 2025
1 parent 29fa6c1 commit 56d5312
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions autoload/vimtex/syntax/p/import.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
" vimtex - LaTeX plugin for Vim
"
" Maintainer: Karl Yngve Lervåg
" Email: [email protected]
"

function! vimtex#syntax#p#import#load(cfg) abort " {{{1
syntax match texCmdImport "\%#=1\\\%(sub\)\?import\>"
\ nextgroup=texImportFileArg skipwhite skipnl

call vimtex#syntax#core#new_arg('texImportFileArg', #{
\ contains: '@NoSpell,texCmd,texComment',
\ next: 'texFileArg',
\})

highlight def link texCmdImport texCmdInput
highlight def link texImportFileArg texFileArg
endfunction

" }}}1

0 comments on commit 56d5312

Please sign in to comment.