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

Separate config files for user/environment specific settings #48

Open
likeadeckofcards opened this issue Jan 31, 2019 · 3 comments
Open

Comments

@likeadeckofcards
Copy link

Has there been any exploration into allowing multiple files based on naming convention that would allow users to override settings for their specific environment and can be ignored by VCS so the settings are not sent to other users on the project.

Ex.
.editorconfig - defaults
local.editorconfig or .editorconfig.local for user specific

@craigbarnes
Copy link

craigbarnes commented May 6, 2019

I've thought about something like this, but I'm not sure if your use case is the same as mine. I sometimes write my own notes, todo files, build configs, etc. in git repo directories and they're always matched by the [*] rule, even though they're never intended to be checked into the repo.

I'm thinking of adding something like this to my editorconfig implementation (and possibly contributing it to editorconfig-core-c too). A more complete description of your use case would help inform what the implementation should look like.

@likeadeckofcards
Copy link
Author

@craigbarnes The idea here is that the organization has a format that would be in a base config to force all of the code into the same format. However, some people like to view their code slightly different than the format provided by the base config. This config we would not want to be added to any kind of repo to prevent user specific settings from being distributed to the rest of the organization.

@craigbarnes
Copy link

craigbarnes commented May 8, 2019

some people like to view their code slightly different than the format provided by the base config

Slightly different how? With different indent settings?

The implementation I had in mind was to allow a second config file in each directory that would take precedence over .editorconfig. It'd be exactly equivalent to just appending the contents to the bottom of .editorconfig, but with the benefit of not changing the git index if .editorconfig is a tracked file.

The only way I could see it working for your use case though, is if the base config and your overrides both agree on using indent_style = tab and you only want to change the display width of tabs (tab_width).

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