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

a couple of issues #74

Open
ctf0 opened this issue Oct 20, 2022 · 11 comments
Open

a couple of issues #74

ctf0 opened this issue Oct 20, 2022 · 11 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@ctf0
Copy link

ctf0 commented Oct 20, 2022

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

@coliff coliff added bug Something isn't working help wanted Extra attention is needed labels Oct 20, 2022
@coliff
Copy link
Member

coliff commented Oct 28, 2022

Thanks for reporting these issues!

  • On that first issue, is the solution to change the activationEvents to onFileSystem:file like you did on your fork? Does that work as expected with no problems?
  • For the second do you have a suggested fix for htmlhint.configFile?

@ctf0
Copy link
Author

ctf0 commented Oct 28, 2022

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
Copy link

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

@rubensa
Copy link

rubensa commented May 17, 2023

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
Copy link

rubensa commented May 17, 2023

@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
Copy link
Member

coliff commented May 17, 2023

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
Copy link

rubensa commented Jul 1, 2024

@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
Copy link

inosik commented Aug 1, 2024

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
Copy link
Member

coliff commented Sep 26, 2024

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
Copy link

inosik commented Sep 26, 2024

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
Copy link
Member

coliff commented Sep 26, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants