continue icon indicating copy to clipboard operation
continue copied to clipboard

Migrate `~/.continue/config.py` to XDG_CONFIG_HOME or `~/.config/continue/config.py`

Open klauern opened this issue 2 years ago • 8 comments

Validations

  • [X] I believe this is a way to improve. I'll try to join the Continue Discord for questions
  • [ ] I'm not able to find an open issue that requests the same enhancement

Problem

I see the default of ~/.continue/config.py is used to store the configuration settings, but a lot of tools have started moving their configs to follow the XDG Base configuration: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

From that spec, config files usually go in ~/.config/<app>/<whatever> as a convention, which keeps a user's $HOME directory clean.

Solution

No response

klauern avatar Oct 16 '23 19:10 klauern

@klauern What if we offered an option of where to place .continue? Just a VS Code or command line option where you could set the directory?

I see the reasoning for keeping the home directory clean, though this is also the most obvious place to put something so it has the benefit of being easy for our users to find, something I'm not sure I want to change by default.

sestinj avatar Oct 17 '23 03:10 sestinj

I think a configuration option is fine, but I also believe that defaulting to OS-specific locations like the XDG standard is more commonplace than you might think: https://dotfiles-matter.click/.

I noticed that ~/Library/Application Support on my Mac (and ~/.config) have a lot of settings already compared to a few years ago. So while a configuration option provides flexibility, having a sensible default like ~/.config/continue/config.py aligns with modern practices, keeps $HOME clean, and caters to a growing community preference.

Just thought it’s worth bringing up, especially as this project is still relatively new and has seen changes in config.py structure as well. I wasn't thinking the placement of the config would be as big of a shift as rebuilding it from scratch would be.

klauern avatar Oct 17 '23 20:10 klauern

I would maintain the status quo in the ~ directory, but I am also open to moving it under ~/.config. In my opinion, there is no need for an option. Just a decision.

As developers we sometimes feel that providing options for everything is a good thing, you can never have too many choices, right? Ultimately these choices end up being technical ones, choices that the average end user has no interest in. It’s our duty as developers to make smart design decisions and avoid putting the weight of technical choices on our end users.

Source: In Open Source, Learn to Decide

LangLangBart avatar Oct 19 '23 16:10 LangLangBart

It was a little confusing to me

  1. why there were settings that were not exposed via the extension’s vscode interface
  2. why the extension wrote files outside of its own folder in ~/.vscode/extensions

When I delete the extension from vscode, do these other folders remain?

My vote would be to keep everything within .vscode. If that’s not possible for some reason then I would say going inside of ~/.config is better than making a ~/.continue folder

mhkeller avatar Oct 19 '23 17:10 mhkeller

Are there some people who use continue.dev in multiple editors, so they would want to share settings between them?

I guess the full bells-and-whistles solution could be to ask the user when installing a plugin what they want to do. And if they choose to have settings shared between IDEs, then follow the XDG base directory specification on Linux, and the equivalent standards for Mac/Windows. This would of course also include splitting the contents of ~/.continue into user configuration, data, state and cache.

But since that would be a lot of work, IMO the second best solution would be to just move everything to $XDG_CONFIG_HOME/continue.dev/ with fallback to ~/.config/continue.dev/ if the environment var isn't set (on Linux).

JohanAR avatar Jun 02 '24 08:06 JohanAR

I'm not doing so atm, but I may use continue in neovim and Rider (and maybe other IDEs in the future), so a global config is welcome. However, my home folder is full dotfolders that don't adhere to the xdg specifications which I'm trying to change bit by bit. This would definitely be an appreciated change ^^

CaptaiNiveau avatar Aug 13 '24 13:08 CaptaiNiveau