xi-editor / xi-mac

The xi-editor mac frontend.
Apache License 2.0
3.02k stars 147 forks source link

Populate new config file with defaults #375

Closed jansol closed 5 years ago

jansol commented 5 years ago

Currently when no config file is present and the user hits cmd+, xi-mac appears to do nothing and silently creates an empty config file. Instead, it should create a config file with the current config and open that.

cmyr commented 5 years ago

huh, we actually have a special client_example.toml file in core that is supposed to be copied over in this case. If that isn't happening this is a regression.

jansol commented 5 years ago

Speaking of which, we probably should either a) switch the config file name to something ending in .toml or b) move to NSUserDefaults and a config GUI like a proper macOS application.

cmyr commented 5 years ago

yea, it would be nice if we had something like json-schema so that we could autocomplete config values / provide validation, at least.

mb21 commented 5 years ago

The file ~/Library/Application Support/XiEditor/preferences.xiconfig seems to be created on install or something and it is populated. However, if you remove it and then open the editor preferences, the file is recreated but is indeed empty.

cmyr commented 5 years ago

@mb21 this is being addressed in #471. 🙏