Skip to content

Commit

Permalink
feat(syntax): highlight a syntax error
Browse files Browse the repository at this point in the history
refer: #2960
  • Loading branch information
lervag committed Jun 1, 2024
1 parent 9665df7 commit cf259f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions autoload/vimtex/syntax/core.vim
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ function! vimtex#syntax#core#init_rules() abort " {{{1
syntax match texSpecialChar "\\[SP@]\ze[^a-zA-Z@]"
syntax match texSpecialChar "\^\^\%(\S\|[0-9a-f]\{2}\)"

syntax match texError "[_^]"

" }}}2
" {{{2 Commands: general

Expand Down
2 changes: 1 addition & 1 deletion test/test-syntax/test-core.tex
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
\begin{document}
Test accents \v! and \v@ here.
Test accents \v! and \v@ here. And errors: _ ^
Line with inline verbatim: \verb+verb+
Line with inline verbatim: \verb*+verb+
Expand Down

0 comments on commit cf259f4

Please sign in to comment.