Closed rchl closed 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.
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.
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.
vscode-eslint has a
probe
setting:validate
option is set to eitheron
,off
, orprobe
validate
is set toprobe
then the server will:validate
toon
so eslint is unconditionally enabled for all files that match the list of our syntaxes/selectors.workspace/configuration
didOpen
hookeslint/probeFailed
message if probing has resulted with settingvalidate
tooff
so that client can cache the result