Skip to content

Fix #4935 and #4871#4937

Merged
fendor merged 6 commits into
haskell:masterfrom
Aster89:fix-issue-4935
May 21, 2026
Merged

Fix #4935 and #4871#4937
fendor merged 6 commits into
haskell:masterfrom
Aster89:fix-issue-4935

Conversation

@Aster89
Copy link
Copy Markdown
Contributor

@Aster89 Aster89 commented May 19, 2026

The main reason for this PR is to fix #4935 by having hls-class-plugin detect the indentation of already implemented methods (if any, otherwise the default of 2 is used as before) in an instance and use that for indenting the missing methods to be inserted.

Additionally, I've included some other commits where I've removed some redundant ()s, changed some non-ASCII space to ASCII space, and one commit moving a misplaced haddock commet where it belongs, thus fixing #4871.

Copy link
Copy Markdown
Collaborator

@fendor fendor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, thank you!

Could we have a regression test for this new behaviour?

@Aster89 Aster89 force-pushed the fix-issue-4935 branch 2 times, most recently from 719f69c to d32e3ab Compare May 20, 2026 12:42
@Aster89 Aster89 requested a review from fendor May 20, 2026 12:43
Copy link
Copy Markdown
Collaborator

@fendor fendor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@fendor fendor enabled auto-merge (squash) May 20, 2026 12:56
@fendor fendor disabled auto-merge May 20, 2026 15:44
@fendor fendor enabled auto-merge (squash) May 21, 2026 09:20
@fendor fendor merged commit b0abc72 into haskell:master May 21, 2026
57 of 59 checks passed
@Aster89 Aster89 deleted the fix-issue-4935 branch May 21, 2026 10:43
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

Successfully merging this pull request may close these issues.

hls-class-plugin ignores indentation of already existing method and always indents by 2

2 participants