-
Notifications
You must be signed in to change notification settings - Fork 139
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
Add the ability to disable EditorConfig per-buffer #154
Add the ability to disable EditorConfig per-buffer #154
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks very much for this PR! I have left a few comments suggesting changes.
Before merging, I would like two structural changes. Please:
- In plugin/editorconfig.vim, move the check up to line 205, before "Check if any .editorconfig does exist". If
b:EditorConfig_disable
is set, I don't think we need to look for any .editorconfig files. That will make the plugin more responsive onb:EditorConfig_disable
d buffers. - Inside the
if b:EditorConfig_disable
block, please add a modified copy of lines 225-228 to tell the user that the buffer is being skipped (ifg:EditorConfig_verbose
is set). That will make debugging "why doesn't this work???!" failures substantially easier :D .
Much appreciated!
This would allow users to disable EditorConfig for specific filetypes, or create their own rules for disabling.
2eb40e3
to
d2ff151
Compare
Thanks for reviewing! I've pushed a fix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @cxw42's comments and the PR LGTM now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I appreciate for the edits --- looks good to me, and works fine in my (admittedly brief) testing. Thanks very much for contributing, and happy Vimming to you! :)
This PR introduces a buffer-local variable,
b:EditorConfig_disable
, that would allow users to disable EditorConfig for specific filetypes, or create their own rules for disabling.Solves #104.