carvel-dev / vscode-ytt

Visual Studio Code extension for working with ytt yaml files
Apache License 2.0
17 stars 1 forks source link

Multiline function args higlighted incorrectly #2

Open pnsantos opened 4 years ago

pnsantos commented 4 years ago

When I do:

#@ lib = struct.make(
#@   arg1=arg1,
#@   arg2=arg2
#@ )

the last three lines are being highlighted as if they were comments.

Using version 0.0.2 and vscode 1.45.1 (linux)

ewrenn8 commented 4 years ago

This is because the function call end matcher in starlark grammar looks for ), so the #@'s are being interpreted as starlark comments in the arguments to the function. I am not sure there is a great to fix this; I will think on it some more.

schmurfy commented 3 years ago

the same happen for:

#@ apps = [
#@  "first",
#@  "second"
#@ ]