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 · 6 comments
Open

a couple of issues #74

ctf0 opened this issue Oct 20, 2022 · 6 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!

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

4 participants