Skip to content

Calling indent-line-function may result in unwanted indentation #37

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

Open
Hi-Angel opened this issue Feb 20, 2025 · 0 comments
Open

Calling indent-line-function may result in unwanted indentation #37

Hi-Angel opened this issue Feb 20, 2025 · 0 comments

Comments

@Hi-Angel
Copy link
Member

Hi-Angel commented Feb 20, 2025

For some reason, purescript-indentation.el instead of implementing just a single indentation function has implemented two of them: purescript-newline-and-indent and purescript-indentation-indent-line (aka indent-line-function). As result, whenever a minor-mode binding calls indent-line-function, this results in indentation being zero.

For example, if you call evil-open-below after type declaration, it will get indented even though it shouldn't.

The two functions should be unified, I think.

Steps to reproduce

  1. Open purescript-mode buffer with text:

    type Foo = {}
    
  2. Start new line after the text and evaluate (funcall indent-line-function)

Expected

No indentation

Actual

Indentation gets added

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

1 participant