Skip to content

Commit

Permalink
Remove incorrect error highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
laniakea64 committed Oct 17, 2024
1 parent f08fa6b commit 41e3b58
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
8 changes: 3 additions & 5 deletions syntax/just.vim
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ syn match justFunction "\h\k*" contained

syn match justPreBodyComment "\v%(\s|\\\n)*#%([^!].*)?\n%(\t+| +)@=" transparent contained contains=justComment
\ nextgroup=@justBodies skipnl
syn match justPreBodyCommentError "\v^%(%(\\\n)@3<!#|(\\\n)@3<!%( +\t+|\t+ +)#).*$" contained

syn region justBacktick start=/`/ end=/`/
syn region justBacktick start=/```/ end=/```/
Expand Down Expand Up @@ -144,11 +143,11 @@ syn match justRecipeSubsequentDeps '\V&&' contained
syn match justRecipeNoDeps '\v:%(\s|\\\n)*\n|:#@=|:%(\s|\\\n)+#@='
\ transparent contained
\ contains=justRecipeColon
\ nextgroup=justPreBodyComment,justPreBodyCommentError,@justBodies
\ nextgroup=justPreBodyComment,@justBodies
syn region justRecipeDeps start="\v:%(\s|\\\n)*%([a-zA-Z_(]|\&\&)" skip='\\\n' end="\v#@=|\\@1<!\n"
\ transparent contained
\ contains=justFunction,justRecipeColon,justRecipeSubsequentDeps,justRecipeParamDep
\ nextgroup=justPreBodyComment,justPreBodyCommentError,@justBodies
\ nextgroup=justPreBodyComment,@justBodies

syn region justRecipeParamDep contained transparent
\ matchgroup=justRecipeDepParamsParen
Expand Down Expand Up @@ -205,7 +204,7 @@ syn region justConditionalBracesInInterp start="\v\{\{@!" end="\v\}@=" transpare
syn match justLineLeadingSymbol "\v^%(\\\n)@3<!\s+\zs%(\@-|-\@|\@|-)"

syn match justLineContinuation "\\$"
\ containedin=ALLBUT,justComment,justCommentInBody,justShebang,@justRawStrings,justPreBodyCommentError,justRecipeAttrArgError,justShellExpandRawDefaultValue
\ containedin=ALLBUT,justComment,justCommentInBody,justShebang,@justRawStrings,justRecipeAttrArgError,justShellExpandRawDefaultValue

syn region justBody
\ start=/\v^\z( +|\t+)%(#!)@!\S/
Expand Down Expand Up @@ -355,7 +354,6 @@ hi def link justOptionalFile Conditional
hi def link justParameterError Error
hi def link justParameterOperator Operator
hi def link justParamExport Statement
hi def link justPreBodyCommentError Error
hi def link justRawString String
hi def link justRawStrRegexRepl String
hi def link justRecipeAt Special
Expand Down
5 changes: 5 additions & 0 deletions tests/cases/tricky.html
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,8 @@
<span class="Number">&Tab;echo recipe</span>
<span class="Number">&Tab;</span><span class="Comment"># echo </span><span class="Delimiter">{{</span><span class="Normal"> </span><span class="Identifier">foo</span><span class="Normal"> </span><span class="Delimiter">}}</span><span class="Comment"> </span><span class="Special">{{{{</span><span class="Comment">test \</span>
<span class="Number">&Tab;echo recipe</span>

<span class="Comment"># documented recipe 1</span>
<span class="Function">documented1</span><span class="Operator">:</span>
<span class="Comment"># documented recipe 2</span>
<span class="Function">documented2</span><span class="Operator">:</span>
5 changes: 5 additions & 0 deletions tests/cases/tricky.just
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,8 @@ ignored-comments-in-recipe foo='Foo':
echo recipe
# echo {{ foo }} {{{{test \
echo recipe
# documented recipe 1
documented1:
# documented recipe 2
documented2:

0 comments on commit 41e3b58

Please sign in to comment.