purescript-mode icon indicating copy to clipboard operation
purescript-mode copied to clipboard

Calling `indent-line-function` may result in unwanted indentation

Open Hi-Angel opened this issue 10 months ago • 0 comments

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

Hi-Angel avatar Feb 20 '25 10:02 Hi-Angel