continue
continue copied to clipboard
Use XDG directory on Linux.
Description
Fixes #558.
I personally think that polluting the home directory with dotfiles is a pretty lazy and bad practice.
This PR currently only addresses said problem on Linux, by making Continue follow the XDG Base Directory specification.
This change is backwards compatible and only affects new setups, ~/.continue is still used if it already exists.
I didn't do anything about other platforms yet, Windows and macOS continues to use ~/.continue just like before.
Checklist
- [x] The base branch of this PR is
dev, rather thanmain - [x] The relevant docs, if any, have been updated or created
On Windows, LOCALAPPDATA can be used to retrieve ~\AppData\Local, where app data is stored. Perhaps, u'd like to add it in your PR, otherwise I can file a PR once this is accepted.
I hate seeing dotfiles in my homefolder too
Agreed, especially because it's constantly conflicting with .config's autocomplete. This is so infuriating.
@alula your current code doesn't work per the spec.
You're checking for XDG_DATA_DIR when you should be checking XDG_DATA_HOME
@alula your current code doesn't work per the spec. You're checking for
XDG_DATA_DIRwhen you should be checkingXDG_DATA_HOME
Good catch, I have changed it from XDG_CONFIG_DIR last minute before commiting 😅
An improvement to this would be to place config files in XDG_CONFIG_HOME.
Also, documentation should be updated to avoid people being confused when they can't find ~/.continue while having these environment variables set.
Opening the config file via the plugin in Intellij seems to create/open files in ~/.continue/
I've updated the IntelliJ plugin and other places too, now my question: how the former ~.continue/ directory present in maaaany places in the documentation be called from now?
I skipped adding relevant logic to the Rust code as it seems to be broken and not used yet.
Hey all, apologies for the late review here. After thinking about it for a bit, we're going to stick with ~/.continue, the primary reason being that we're often fighting not software bugs, but difficulties in making sure to guide users down the right path when they are customizing Continue. Moving the relevant files to a path that will vary per user is a real opportunity for confusion.
I appreciate the work that went into this though, so if there were interest in doing something like some easter egg flag that would have the directory stored instead at the XDG path that might be fine. Yes, it would still be complex, but I figure for the handful of users that care deeply about this that might be okay
This PR contains some fixes that make CONTINUE_GLOBAL_DIR work correctly and removes few hardcoded paths. Should I open another one without the change that makes default directory different?