Skip to content

Commit

Permalink
fix keywords of generator-expressions wrongly colored in simple argum…
Browse files Browse the repository at this point in the history
…ents
  • Loading branch information
pboettch committed May 29, 2019
1 parent 33e512b commit a3628eb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmake.vim.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 35,7 @@ syn region cmakeVariableValue start="${" end="}" contained oneline contains=cmak

syn region cmakeEnvironment start="$ENV{" end="}" contained oneline contains=cmakeTodo

syn region cmakeArguments start="(" end=")" contains=ALLBUT,cmakeCommand,cmakeCommandConditional,cmakeCommandRepeat,cmakeCommandDeprecated,cmakeCommandManuallyAdded,cmakeArguments,cmakeTodo
syn region cmakeArguments start="(" end=")" contains=ALLBUT,cmakeGeneratorExpressions,cmakeCommand,cmakeCommandConditional,cmakeCommandRepeat,cmakeCommandDeprecated,cmakeCommandManuallyAdded,cmakeArguments,cmakeTodo

syn case match

Expand Down
2 changes: 1 addition & 1 deletion syntax/cmake.vim
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 35,7 @@ syn region cmakeVariableValue start="${" end="}" contained oneline contains=cmak

syn region cmakeEnvironment start="$ENV{" end="}" contained oneline contains=cmakeTodo

syn region cmakeArguments start="(" end=")" contains=ALLBUT,cmakeCommand,cmakeCommandConditional,cmakeCommandRepeat,cmakeCommandDeprecated,cmakeCommandManuallyAdded,cmakeArguments,cmakeTodo
syn region cmakeArguments start="(" end=")" contains=ALLBUT,cmakeGeneratorExpressions,cmakeCommand,cmakeCommandConditional,cmakeCommandRepeat,cmakeCommandDeprecated,cmakeCommandManuallyAdded,cmakeArguments,cmakeTodo

syn case match

Expand Down
2 changes: 2 additions & 0 deletions test/generator-expression-not-plain-args.cmake
Original file line number Diff line number Diff line change
@@ -0,0 1,2 @@
# not the same highlighting for PUBLIC if simple argument or in generator expression
target_include_directories(target PUBLIC ${CMAKE_CURRENT_BINARY_DIR} $<GENERATOR_EXP PUBLIC>)
6 changes: 6 additions & 0 deletions test/generator-expression-not-plain-args.cmake.html.ref
Original file line number Diff line number Diff line change
@@ -0,0 1,6 @@
<body>
<pre id='vimCodeElement'>
<span class="Comment"># not the same highlighting for PUBLIC if simple argument or in generator expression</span>
<span class="Identifier">target_include_directories</span>(target <span class="ModeMsg">PUBLIC</span> <span class="Type">${</span><span class="Identifier">CMAKE_CURRENT_BINARY_DIR</span><span class="Type">}</span> <span class="WarningMsg">$&lt;GENERATOR_EXP </span><span class="Constant">PUBLIC</span><span class="WarningMsg">&gt;</span>)
</pre>
</body>

0 comments on commit a3628eb

Please sign in to comment.