Triumph-Tech / magnus-vscode

Triumph Tech’s Magnus Editor is a full-featured remote editor for Rock RMS.
https://www.triumph.tech
MIT License
10 stars 1 forks source link

VS Code auto close tags not working #5

Closed mikedotmundy closed 1 year ago

mikedotmundy commented 1 year ago

I'm not entirely sure if this is a bug or if it is just me not knowing how to enable certain functions, but I have noticed that VS Code does not auto close tags as I'm typing.

With Lava, for example, if I type {% if myInteger == 1 %} I would expect it to auto-populate {% endif %}, and that is not happening.

With HTML... if I type <div class="row">, I would expect it to auto populate </div>, and that is not happening.

I have the "Language" set to Lava in VS Code. Let me know if I'm just missing a simple setting somewhere.

garrettjohnson commented 1 year ago

Hi Mike,

I think this issue is probably better suited for the https://github.com/garrettjohnson/vscode-lava-syntax repo since that is the plugin providing the Lava language. I have an experimental branch that enables more of the native VSCode HTML features, like automatically closing HTML tags. However, I haven't invested time in automatically closing Lava tags.

I can definitely look into supporting a "auto-close" option, but in the meantime you could try the included snippets which automatically close tags. You can activate them by typing if, case, for, entity, assign, etc and then using the arrow keys and the return key to expand the snippet.

Let me know if that helps your workflow, or if you have any other ideas, and I'll publish the HTML tag update tonight.

jonedmiston commented 1 year ago

Closing as it's related to a different plugin.

mikedotmundy commented 1 year ago

@garrettjohnson Yes, this helps me a lot! Thank you. I also updated Lava extension to v1.1.15 this morning and it seems to be working great. Thank you for the work you put into this!