Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
There are global and local options [1]. There are no 'buffer' options. This is a syntax error that yields
Unfortunately, this error is hidden by the try-catch from the call site.
@pmeinhardt Please have a look. Maybe a change to
&l
is sufficient? I could not reproduce your original problem and therefore don't know if this is the right 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.
Filed #215 for better visibility.
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.
Thank you for the catch -- I opened #216 to fix this.
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 @kaihowl ❤️ Unfortunately with the change from #216 the problem re-appeared. 🤔
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.
That is indeed unfortunate.
I can even reproduce this with nerdtree instead of netrw. There already is a condition that should take care of not messing non-editable buffers. Nerdtree for example hijacks the
FileExplorer
event group and instead sets the necessary options, includingbuftype
, as part of a new set of autocommands. These are sequenced after the editorconfig autocommands (or more precisely: they happen later in my setup, yet there is no guarantee of ordering AFAIK). Therefore, thebuftype
appears as editable when editorconfig sees it. The final value is of coursenofile
.I am not an expert on autocommands. Therefore, my proposal for a fix is rather hacky: #217