Skip to content
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

Migrate ~/.continue/config.py to XDG_CONFIG_HOME or ~/.config/continue/config.py #558

Open
1 of 2 tasks
klauern opened this issue Oct 16, 2023 · 9 comments
Open
1 of 2 tasks
Labels
area:configuration Relates to configuration options kind:enhancement Indicates a new feature request, imrovement, or extension

Comments

@klauern
Copy link

klauern commented Oct 16, 2023

Validations

  • 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

@sestinj
Copy link
Contributor

sestinj commented Oct 17, 2023

@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.

@klauern
Copy link
Author

klauern commented Oct 17, 2023

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.

@LangLangBart
Copy link
Contributor

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

@mhkeller
Copy link
Contributor

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

@JohanAR
Copy link

JohanAR commented Jun 2, 2024

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).

@dosubot dosubot bot added area:configuration Relates to configuration options kind:enhancement Indicates a new feature request, imrovement, or extension and removed enhancement labels Jul 8, 2024
@CaptaiNiveau
Copy link

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 ^^

@KenMacD
Copy link

KenMacD commented Sep 4, 2024

The worst part of ~/.continue is that it starts with the prefix ~/.con. I didn't realize that I used it, but I often type ~/.con<TAB> in moving towards a programs config. Now I get an auto-complete choice between .config and .continue.

@alula alula mentioned this issue Sep 13, 2024
2 tasks
@ShayBox
Copy link

ShayBox commented Sep 18, 2024

I think the above change makes the most sense, it supports the original location if it exists, otherwise uses the new location if it doesn't, and you can move it back manually if you want it in your home folder.

@cboettig
Copy link

I would also love to see continue use XDG_CONFIG_HOME. it's worth noting that VSCode itself support XDG standards.

Thanks for an amazing extension, I am using this in my large classrooms. Being able to override the default config path would greatly streamline the deployment of the configuration to all students.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:configuration Relates to configuration options kind:enhancement Indicates a new feature request, imrovement, or extension
Projects
None yet
Development

No branches or pull requests