My problem is that Emacs incorrectly indents the braces for C# methods, like this:
static string LOL()
{
}
then I have to manually correct it to
static string LOL()
{
}
I have read similar questions where the indentation is incorrect for if-statements and co. In my case the indentation works correctly. In spirit of those answers I have added these entries to my init.el
(defun my/c-mode-common-hook ()
"Correct the expression indentation for c-style methods"
(setq c-basic-offset 4)
(c-set-offset 'substatement-open 0))
(use-package csharp-mode
:mode "\\.cs\\'"
:ensure t
:defer t
:init
(use-package omnisharp)
(add-hook 'c-mode-common-hook #'my/c-mode-common-hook)
:config
(add-hook 'csharp-mode-hook 'omnisharp-mode)
(add-hook 'after-init-hook 'global-company-mode)
(company-omnisharp t))
How can I make Emacs use correct indentation for these braces?