-
-
Notifications
You must be signed in to change notification settings - Fork 223
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
Inconsistent formatting of defprotocol with docstring on separate line from method declaration. #1978
Comments
I agree this sounds like probably an alternate manifestation of the same issue (though cannot say for sure until one or the other is fixed 😄). |
@SillyCoon, I think the formatter case might be solved by adding |
Yeah, it looks like this. I will create a PR with |
Hello @PEZ! I think this ticket also was not closed automatically 😢 |
Thanks @SillyCoon |
While typing, the docstring aligns with the parameters.
If the cursor is anywhere within the method form, then calva-fmt.formatCurrentForm follows the same rule, and aligns the docsctring to the params.
This only applies or gets updated for the single form containing the cursor. Move the cursor inside a different method's form, and run calva-fmt.formatCurrentForm to also format that form as described above, but again not affecting alignment of any other methods.
Move the cursor to where it is outside of any method expression and run calva-fmt.formatCurrentForm and a different rule takes over. All the docstrings align to the second character of the respective method name.
Same with other format-triggering events (such as paredit.dragSexpForward). So long as the cursor is not within a form that defines a method, all the docstrings align to a +2 character indentation.
The text was updated successfully, but these errors were encountered: