Skip to content

tweak(csharp): add open brace to electric chars#8222

Open
Stewmath wants to merge 1 commit into
doomemacs:masterfrom
Stewmath:csharp-electric-tweak
Open

tweak(csharp): add open brace to electric chars#8222
Stewmath wants to merge 1 commit into
doomemacs:masterfrom
Stewmath:csharp-electric-tweak

Conversation

@Stewmath

@Stewmath Stewmath commented Jan 4, 2025

Copy link
Copy Markdown

With this commit, the electric characters list is now the same in csharp-mode as in cc-mode.

Before this commit, typing "if (true) RET { RET" would produce the following:

if (true)
    {

    }

After this commit, it produces the following:

if (true)
{

}

With this commit, the electric characters list is now the same in
csharp-mode as in cc-mode.

Before this commit, typing "if (true) <RET> { <RET>" would produce the
following:

if (true)
    {

    }

After this commit, it produces the following:

if (true)
{

}
@doom-bot

doom-bot commented Mar 24, 2025

Copy link
Copy Markdown

(Note: this is @hlissner; I forgot to swap accounts)

This problem with this tweak is that it triggers a reindent of the line when typing a { for folks using the inline style, i.e.

if (true) {

}

I'll explore some alternatives first before revisiting this PR.

@doom-bot doom-bot added is:tweak Code changes that affects user-facing behavior :emacs electric Pertains to Doom's :emacs electric module :lang csharp Pertains to Doom's :lang csharp module labels Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:emacs electric Pertains to Doom's :emacs electric module is:tweak Code changes that affects user-facing behavior :lang csharp Pertains to Doom's :lang csharp module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants