-
Notifications
You must be signed in to change notification settings - Fork 48
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
constructor + object initializer with opening brace on next line #154
Comments
Great. If you have a PR I will be glad to review and merge it 😃 |
Hi, how does c-sharp mode set the c-syntactic-element if it does at all? I feel like one would need to add to |
It may indeed not be immediately clear how To sum it up, When that gets hard or doesn't work, we try to provide our own overrides and implementations. To adapt indentation we have advised If you need to tweak indentataion-code, chances are you want to take a look at If you need to add additional overrides, I advise you to use Good luck! |
Hi, I didn't mean to imply csharp-mode was simple or bad in any way. I love the mode and use it every day! Unfortunately, I made 0 progress digging through the code. So since I have other responsibilities, here is my hack to rigidly decrease the indent in situations like the one on this issue. Still needs more testing, but seems to work for well except for nested constructors. Performance is terrible unsurprisingly.
|
No need to apologize. No offence taken. C# is a expressive language with an complex grammar, and There's guaranteed to be complexity issues with the code, no matter how you twist or turn it. Not to mention, this project is really just some abandonware I picked up and decided to maintain after it completely broke with the Emacs 24.1 release or something. I decided it was better with something non-perfect, but working for C# editing in Emacs, than nothing at all, and with that I became the maintainer of one of the most complex major-modes out there in the Emacs-verse. Yay me! So far I've kept it mostly going, but I really don't have much time for this project anymore, and it shows with the outstanding issues. If you sometime in the future have another issue and think you can help, feel free to help out. There's more Emacs-wielding C# users out there than you think. This mode is in the 90th percentile on MELPA after all! ;) |
@asamwow |
Yes this works too in the |
for example this code
gets indented like this
because the opening brace line is considered a "statement-cont" c syntactic element, but should be a "block-open". I think the applicable code starts on line 794 at
I'm looking into it.
The text was updated successfully, but these errors were encountered: