Open alanz opened 4 years ago
There are two cases here
Examples of invalid config are trying to enable/disable lenses that do not exist.
A related issue would be if there is a config file specified, but it does not exist.
I think the logic for that should be
The current search logic includes tagging a non-absolute path onto all the possible config file locations. I think this is too loose, and likely to result in unexpected and hard to debug results.
Describe the bug
The logic for loading
erlang_ls.config
files is to take a list of locations, attempt to load from them in order, until one succeeds.It does not distinguish between a file not existing, and one existing but having a YAML syntax error in it.
So making a typo in your config can cause it to load a completely different config file.
Expected behavior
I would expect it to report a diagnostic for the first config file it finds, if it has a syntax error in it.
Context
erlang_ls
version (tag/sha): 8ff322fddcf162ed0af494704fd9fd31b3ed3268