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

Wrong alignment while adding placeholder for class instances #2998

Open
July541 opened this issue Jun 28, 2022 · 1 comment
Open

Wrong alignment while adding placeholder for class instances #2998

July541 opened this issue Jun 28, 2022 · 1 comment
Labels
component: hls-class-plugin type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@July541
Copy link
Collaborator

July541 commented Jun 28, 2022

Steps to reproduce

With the following code

data A
instance Eq A where

Execute code action to add placeholder for == with signature

Expected behaviour

instance Eq A where
  (==) :: A -> A -> Bool
  (==) = _

Actual behaviour

instance Eq A where  (==) :: A -> A -> Bool
  (==) = _

It only happens while the instance definition is at the last line and there is no extra line later. It doesn't matter before we have add instance signature code action but will result in errors after #2920.

@July541 July541 added type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. component: hls-class-plugin labels Jun 28, 2022
@July541
Copy link
Collaborator Author

July541 commented Jul 5, 2022

This is not easy to write a test because we'll insert a new empty line for every file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: hls-class-plugin type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

No branches or pull requests

1 participant