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

Micro puts stuff into $XDG_CONFIG_HOME that doesn't belong there #3176

Open
bartekpacia opened this issue Mar 14, 2024 · 3 comments
Open

Micro puts stuff into $XDG_CONFIG_HOME that doesn't belong there #3176

bartekpacia opened this issue Mar 14, 2024 · 3 comments

Comments

@bartekpacia
Copy link
Contributor

bartekpacia commented Mar 14, 2024

From what I understand, XDG_CONFIG_HOME is for configuration files, like settings.json and bindings.json.

However in my case micro misuses that directory to place some other autogenerated files in there:

$ tree -a ~/.config/micro
micro
├── backups
│   └── %Users%bartek%projects%cg-t01-g12%blah
├── bindings.json
├── buffers
└── settings.json

3 directories, 3 files

I think stuff like backups and buffers doesn't belong to XDG_DATA_HOME. Instead they should be in $XDG_STATE_HOME (or maybe $XDG_DATA_HOME?).

Specifications

Micro version

$ micro --version
Version: 2.0.13
Commit hash: 68d88b57
Compiled on October 21, 2023

OS

$ sw_vers
ProductName:		macOS
ProductVersion:		14.4
BuildVersion:		23E214

Terminal

iTerm2 (build 3.5.0beta19)

@bartekpacia bartekpacia changed the title Zed puts stuff into $XDG_CONFIG_HOME that doesn't belong there Micro puts stuff into $XDG_CONFIG_HOME that doesn't belong there Mar 14, 2024
@JoeKar
Copy link
Collaborator

JoeKar commented Mar 15, 2024

Currently there is no logic to take a different default as XDG_CONFIG_HOME, but this is at least manually configurable via backupdir (see: options.md)

@bartekpacia
Copy link
Contributor Author

bartekpacia commented Mar 15, 2024

I'll be happy to contribute this if only I get a buy in from a maintainer:)

@JoeKar
Copy link
Collaborator

JoeKar commented Mar 15, 2024

Please give it a shot. We're happy about every helping hand.

Somewhere here it's good to start:
https://github.com/zyedidia/micro/blob/master/internal/buffer/backup.go#L72-L75

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants