-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
fix: Suppress extra indent after the end of field and function chains #13975
Conversation
92925c1
to
992bafa
Compare
I think we can define these rules statically here instead? https://github.com/rust-lang/rust-analyzer/blob/master/editors/code/language-configuration.json |
Oh, I forgot to mention that I tried to add it in the language config file first, but because the onEnter rules are dynamically (re)loaded to include/exclude the comment onEnter rules, the static configuration file isn't used (or at least, that's my best guess as to what's happening). |
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.
Sounds reasonable that this might override the static configuration there
@bors delegate+
@bors delegate+ |
✌️ @DropDemBits can now approve this pull request |
Configuration reload doesn't happen often anyway, and there will always be a set of onEnter rules to load
@bors r+ |
☀️ Test successful - checks-actions |
fix: Indent after pressing enter on a blank line Regressed after #13975 (whoops).
(spurred on by #4182 (comment))
Caveat that this doesn't work for after tail expressions, although there shouldn't be anything after those anyways.
This also complicates when to reload the language configuration by nature of now always having a language configuration applicable.
Examples of indentation fixes: