-
-
Notifications
You must be signed in to change notification settings - Fork 309
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
zls cannot locate zls.json file #410
Comments
zls uses https://github.com/ziglibs/known-folders to fetch locations for configuration. below is the code that checks both the local configuration and global configuration folders for the file Lines 1701 to 1726 in 80f0983
looking at known-folders shows global config to be defined as .global_configuration = XdgFolderSpec{ .env = .{ .name = "XDG_CONFIG_DIRS", .user_dir = false, .suffix = null }, .default = "/etc" }, so unless you have the XDG_CONFIG_DIRS environment variable set to something it should default to /etc |
hey thanks for the quick response, i see the env var you mentioned is indeed set, so if I understand correctly if this env var is unset zls will look for the config in
|
Yea looking at known-folders's code it will check for the the environment variable and if not found will fallback to the default, in the case of global configuration they have the env variable as I dont know enough about XDG to know if that is correct, if you dont think it is quite right raise an issue over there. |
Fix ZLS config not found crash #410
hi, i was installing zls on a new machine and noticed this problem. this is what I did
built zls from source and than ran the configuration wizard. The config wizard successfully wrote the config to
/etc/zls.json
after that I copied the zls binary that was built in zls-out directory to
/usr/local/bin
then i installed the vscode extension for zls and set the following option in settings
and restarted zls from vscode and I get this in the logs
does zls not look for the config in the
/etc
directory?The text was updated successfully, but these errors were encountered: