Skip to content

Commit

Permalink
Fix imports getting unsolicited indentation
Browse files Browse the repository at this point in the history
When pressing RET after an import, the line gets indented even though
it shouldn't. Fix that.
  • Loading branch information
Hi-Angel committed Feb 22, 2025
1 parent e870a83 commit f364b21
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion purescript-indentation.el
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,7 @@ indent the current line. This has to be fixed elsewhere."
"Return token starting at point."
(cond ((looking-at
(rx (group
(or "if" "then" "else" "let" "in" "ado" "mdo" "rec"
(or "if" "then" "else" "let" "in" "ado" "mdo" "rec" "import"
(seq (0+ (seq (1+ word) ".")) "do")
"proc" "case" "of" "where" "module" "data" "type" "newtype"
"class" "instance"))
Expand Down
1 change: 0 additions & 1 deletion tests/purescript-indentation-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ data Foo = Foo1 Bar |
Foo3 Unit"))

(ert-deftest imports-zero-indented ()
:expected-result :failed
(purescript-test-indentation "
module MyModule where
Expand Down

0 comments on commit f364b21

Please sign in to comment.