ttax00/code-yew-server

Ctrl + / creates html <-- --> comments that are not supported in yew

voidpumpkin opened this issue · 3 comments

First of all, love this extension and I hope to contribute in the future. You are AWESOME!

The bug:

Given

    let test = html! {
        <div></div>
    };

If I ctrl + / on the line with the div, it will become:

    let test = html! {
        <!-- <div></div> -->
    };

Yew will not parse this:
image

What would be the intended IDEAL design for this?
I would assume we at yew hopefully should implement support for html comments?

ttax00 commented

I think yew has gone with the default // rust comment as it is thrown out before the macro even get processed. Seen here in this issue: yewstack/yew#2910

I'm not sure if this is due to the language configuration from javascriptreact since its the base for syntax highlighting, and vscode might pull comment config from there or it was due to some feature API i've implemented. I'll look into it when i have some more time this weekend :)

ttax00 commented

Update

I think I've solved the issue, now that ctrl + / will creates a // line comment instead of the default for html. Will merge this into main branch soon. Unless I missed something, do let me know 😄

image

@TechTheAwesome Looks great. Thx a lot!
I'm not sure if I will have time to test it soon, so I'll just wait when its released.