htmlhint / vscode-htmlhint

VS Code integration of HTMLHint, an HTML linter.
https://marketplace.visualstudio.com/items?itemName=HTMLHint.vscode-htmlhint
MIT License
16 stars 4 forks source link

a couple of issues #74

Open ctf0 opened 1 year ago

ctf0 commented 1 year ago

REF: https://github.com/htmlhint/vscode-htmlhint/tree/main/htmlhint#settings

coliff commented 1 year ago

Thanks for reporting these issues!

ctf0 commented 1 year ago

both of the issues are solved on my branch yes, as for does it work https://marketplace.visualstudio.com/items?itemName=ctf0.htmlhint the installation count says it all especially that this is all what i've added

michael-nok commented 1 year ago

@coliff Could you please include just the activationEvents changes provided by @ctf0 to allow for more startup options?

rubensa commented 1 year ago

Any work on this? I'm trying to validate some html inside markdown documents.

I think that the:

    "activationEvents": [
        "onFileSystem:file"
    ],

is needed so the extension can be activated for other files than HTML (so it can be used for markdown files if I specify markdown inside htmlhint.documentSelector configuration) .

The other change I can see is the addition of:

                "htmlhint.documentSelector": {
                    "items": {
                        "type": "string"
                    }
                }

that I don't know if it is really necessary.

rubensa commented 1 year ago

@coliff For the htmlhint.configFile part @ctf0 added the htmlhint.optionsFile configuration.

In htmlhint-server/src/server.ts he added optionsFile to the Settings interface:

interface Settings {
    htmlhint: {
        enable: boolean;
        options: any;
        optionsFile: string;
    },
    [key: string]: any;
}

and the code to load the configuration if the option is specified inside getConfiguration:

    else if (settings.htmlhint && settings.htmlhint.optionsFile) {
        options = loadConfigurationFile(settings.htmlhint.optionsFile)
    }
coliff commented 1 year ago

sorry for the delay on this... I'd been testing that change locally and hope to get an update with this change out soon. thanks!

rubensa commented 3 months ago

@coliff Sorry to bother you but it's been more than a year since you said you where testing the change locally. Any news on this?

inosik commented 2 months ago

Is there no other way to achieve what you intend other than onFileSystem:file? I'm trying to set up VS Code as my editor for Git and HTMLHint has an activation time of over 500 ms.

coliff commented 2 weeks ago

Is there no other way to achieve what you intend other than onFileSystem:file? I'm trying to set up VS Code as my editor for Git and HTMLHint has an activation time of over 500 ms.

I don't think that change impacts activation time much. The latest version of the extension (1.0.5) has an activation time of 120ms on my Windows 11 laptop, and the first version (1.0.0) has an extension time of 110ms so it's nearly identical.

inosik commented 2 weeks ago

Just to be sure, are you talking about this value?

Code_2024-09-26_08-10-24

This seems to be the sum of the time needed to load the extension and the time to actually activate it. The loading time is typically much higher for HTMLHint. Here's a snippet of the output of the "Developer: Startup Performance" command:

Extension Eager Load Code Call Activate Finish Activate Event By
HTMLHint.vscode-htmlhint false 671 30 0 onFileSystem:file HTMLHint.vscode-htmlhint

But I think I'll investigate this further when I have the time and come back to you if I have something actionable.

coliff commented 2 weeks ago

yes, but I have a very fast, relatively new Laptop which perhaps skews things somewhat 😅 image