oakes / SolidOak

An IDE for Rust
https://sekao.net/solidoak/
The Unlicense
893 stars 60 forks source link

use XDG baasedir spec instead of ~/.dotfile #38

Open flying-sheep opened 8 years ago

flying-sheep commented 8 years ago

xdg_basedir has get_config_home() which you can use to get the correct directory to put config files into on linux.

on windows, it should go into %appdata%.

for backwards compatibility, it should first try to read from the correct location, then from the old ~/.solidoakrc, and use the first one it can find. if it can’t find anything, it should create the config file in the correct location.

oakes commented 8 years ago

Generally I'd do this, but the reason I didn't in this case was to be consistent with Vim, which also does not use that spec. Experienced Vim users would expect it to be in the root of the home dir.

flying-sheep commented 8 years ago

simply allow both then. if the config file in the correct location cannot be found, fall back to ~/.soakrc

oakes commented 8 years ago

Yeah I can do that (actually, that's what I do in my other IDE, Nightcode).

flying-sheep commented 8 years ago

:+1: great, thanks!