Closed davidwarrington closed 2 years ago
Thanks for all the help and discussions to get it/us here!
I've actually never used this command. I will need to have a look and see what might be causing it. I am about to publish a patch, tell me it works. I was using a matching prefix in snippets, but I am not sure if they are related to this?
@davidwarrington can you see if the patch release #103 fixes this?
That update doesn't seem to do it.
I've had a quick scan of the project files and stumbled across this in liquid.language-configuration.json
which I think is the cause:
{
"comments": {
"lineComment": "{% #",
"blockComment": [
"{%- comment -%}",
"{%- endcomment -%}",
"{% comment %}",
"{% endcomment %}"
]
},
// ...
}
I know very little about VSCode extensions so I'm hoping I'm wrong, or that there is a workaround, but from a very quick scan it looks like lineComment
doesn't support > 1 entry. Also I guess technically the line comment you're using here is still a block comment as it doesn't force the entire line to become a comment.
I've tried modifying my install of this extension by removing lineComment
and reducing the blockComment
option to two items such as below which seems to work, however it I'm not sure why removing lineComment
is necessary when a multiline block is highlighted. Also doing something like below would be enforcing either a whitespace-controlled or no-whitespace-controlled opinion.
{
"comments": {
"blockComment": [
"{%- comment -%}",
"{%- endcomment -%}",
]
},
}
Also just on a personal level I'd really love to default to the inline comments but it's more hassle than it's usually worth if my editor isn't automating writing it for me for multiline comments.
Having a quick Google I also see there's this issue microsoft/vscode#64659 I can see there is some demand for more flexibility here, but no responses.
That's the one. I'll PR
First off - congratulations on getting this over the line!
Onto the issue:
Using the shortcut
cmd + /
to create a liquid comment, only the opening tag is added to the beginning of each the area.https://user-images.githubusercontent.com/9138568/192863429-c833c119-5292-4cd1-bb26-31c055f40138.mov
It's happening in every file I try, but in case it helps, here's the code I'm testing in the video