support loading local .opencode/config.json config file name#4766
support loading local .opencode/config.json config file name#4766Alb-O wants to merge 2 commits into
.opencode/config.json config file name#4766Conversation
|
ugh I almost wanna kill config.json entirely it just adds confusion |
|
Oh, didn't know that was the sentiment. I would prefer config.json but up to you guys :) |
|
well we kinda screwed ourselves but originally it used to be: ~/.config/opencode/config.json but in your project it was only Then we supported opencode.json in all locations And now we are here hahaha |
|
I kind of agree with @rekram1-node here. Personally, I think As a result, when I use the On the other hand, most of the time I only have one |
|
I'm not sure we're on the same page at all, why is it confusing to support multiple fallback config filenames? If you prefer |
|
im exaggerating but it's just annoying when people ask for help and I say can you show me your opencode.json and then they say oh I have .jsonc is that not supported, etc etc its really not a big deal it's just annoying how often it confuses people |
|
Yeah I get that, I think this actually exposes a more general problem with programs that support multiple configuration files/locations/merging etc. The user needs a way to see what opencode sees as the definitive post-processed config, e.g. a 'print-config' functionality, which would also be used as the source of truth when helping users with debugging |
|
@Alb-O This exists, try When multiple config files are allowed I always have immediate questions like "What happens if more than one of these config files exist, which takes precedence?", so it does always at least add one more thing I need to spend some time thinking about. |
|
Ah didn't see that, nice. Welp, didn't really expect this sentiment towards |
f8ee907 to
6a9856d
Compare
The
config.jsonfilename is supported in the global XDG config path, but not from project-specific path (.opencode/config.json). This PR simply allowsconfig.jsonto be supported inside.opencodedirs.The name
opencode.jsonmakes sense when only having the json file in the root, but looks a little silly when it's in:.opencode/opencode.json