Skip to content
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

Adjust indention of attribute colon qualifier #115

Open
nordlow opened this issue Jun 5, 2022 · 1 comment
Open

Adjust indention of attribute colon qualifier #115

nordlow opened this issue Jun 5, 2022 · 1 comment

Comments

@nordlow
Copy link
Contributor

nordlow commented Jun 5, 2022

How do I make an attribute-colon-qualifier such as pure: in

struct C {
    pure:
}

have indentation on the same level as the struct as

struct C {
pure:
}

? For the sake of matching sdfmt's default behavior.

@jibal
Copy link

jibal commented Dec 25, 2024

@nordlow As a general rule, put the cursor on the element that you want to change the indentation of and then M-x c-set-offset, which will prompt you with the element type, in this case 'access-label, and then prompt you for the indentation, which in this case defaults to '- which you can change to 0. So, add

(add-hook 'd-mode-hook
          (lambda () (c-set-offset 'access-label 0)))

to your init.el

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants