Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't seem to properly support VCL snippets #19

Open
nuttmeister opened this issue Oct 11, 2023 · 4 comments
Open

Doesn't seem to properly support VCL snippets #19

nuttmeister opened this issue Oct 11, 2023 · 4 comments

Comments

@nuttmeister
Copy link

nuttmeister commented Oct 11, 2023

Doesn't seem to properly support vcl snippets in the sense that they are not inside a sub xxxx {} bracket.

Will produce unexpected token on the first char be it and if statement or similar.

@nuttmeister nuttmeister changed the title Doesn't properly support VCL snippets Doesn't seem to properly support VCL snippets Oct 11, 2023
@acme
Copy link
Collaborator

acme commented Oct 11, 2023

Thanks for the report. We'll see what we can do.

@broose-goose
Copy link

Any word on this? You could probably make a special rule for NAME.snippet.vcl for special case handling

@corytheboyd-smartsheet
Copy link

Adding my plus one to this. The extension is advertised as supporting snippets, but it doesn't actually support snippets.

@alexkli
Copy link

alexkli commented Nov 1, 2024

Running into this as well. The challenging part is how to tell the extension what vcl subroutine the snippet belongs into, if there are no sub vcl_* statements in the code itself, so that it can autocomplete and lint correctly. There is probably no standard pattern vcl snippet files.

In my case I am currently annotating snippet files with "header" comments:

# type: deliver
# priority: 100
# id: tMPixrYP04Os5DnHevR6B5

unset resp.http.server;

Not sure if this would work for others/the extension though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants