sublimelsp / LSP-eslint

ESLint support for Sublime LSP plugin
MIT License
36 stars 5 forks source link

No support for "probe" setting #36

Closed rchl closed 4 years ago

rchl commented 4 years ago

vscode-eslint has a probe setting:

"eslint.probe": {
    "scope": "resource",
    "type": "array",
    "items": {
        "type": "string"
    },
    "default": [
        "javascript",
        "javascriptreact",
        "typescript",
        "typescriptreact",
        "html",
        "vue",
        "markdown"
    ],
    "description": "An array of language ids for which the extension should probe if support is installed."
},
rchl commented 4 years ago

To make this work we would need access to languageId from the on_workspace_configuration handler.

We also don't have the equivalent of didOpen hook so that we could decide whether we notify the server about the file or not. But we could live without that for now and just support the languages that are enabled in the languages array.

rwols commented 4 years ago

So if I understand correctly, #37 will take care of probing files when ST starts, but we don't have a solution yet for when the user opens a view.

rchl commented 4 years ago

That's not correct. It will handle "probe" in either case.

We are computing the value for the validate setting from workspace/configuration request so it will handle it in all cases.

The didOpen part I was referring to has to do with the fact that in VSCode, eslint registers itself to handle all types of files and it will filter out those that it doesn't care about from didOpen hook. We, on the other hand, define a limited set of "syntaxes" we support so we don't have to filter out any "unwanted" files.