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

Support yofi.toml as config filename #162

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Support yofi.toml as config filename #162

wants to merge 3 commits into from

Conversation

jdek
Copy link

@jdek jdek commented May 24, 2024

Allows editors to more easily syntax highlight. Didn't open an issue beforehand since this feature is so minor.

@l4l
Copy link
Owner

l4l commented May 26, 2024

Thanks for your contribution, however I would really prefer avoiding that patch as the config path becomes more obscure, e.g having both yofi.config & yofi.toml leads to a troubles in figuring out which one is used. I agree the toml extension would be clearer choice but having two implicit defaults or changing one completely lacks of good motivation so far.

Besides, I suppose 99% of editors allows to specify language/syntax for arbitrary file extensions, doesn't it?

@jdek
Copy link
Author

jdek commented May 26, 2024

The intention would be to deprecate yofi.config, and then support only yofi.toml after the next major version (1.0.0). To reduce the confusion inside the deprecation period, we could add a warning message similar to what Alacritty and other programs did when moving their configuration files to a more canonical names. This will inform the user exactly which config file being used until the deprecation period ends, when this can be removed again.

The motivation of this patch is to remove the obscurity of using a well-defined configuration format but not its file extension. Whilst most editors do allow you to manually specify the filetype, it requires extra input from the user: It would be nice if things 'just worked'.

jdek added 3 commits May 27, 2024 03:56
Allows text-editors to recognise syntax without extra input from the
user.
Prints a warning if yofi.config is loaded, please migrate your
configurations by renaming yofi.config -> yofi.toml.
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

Successfully merging this pull request may close these issues.

2 participants