From f364b21b8bbc9799cae794927f0aea52f3706709 Mon Sep 17 00:00:00 2001 From: Konstantin Kharlamov Date: Wed, 19 Feb 2025 00:18:33 +0300 Subject: [PATCH] Fix imports getting unsolicited indentation When pressing RET after an import, the line gets indented even though it shouldn't. Fix that. --- purescript-indentation.el | 2 +- tests/purescript-indentation-tests.el | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/purescript-indentation.el b/purescript-indentation.el index 33bf8b2..a48a726 100644 --- a/purescript-indentation.el +++ b/purescript-indentation.el @@ -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")) diff --git a/tests/purescript-indentation-tests.el b/tests/purescript-indentation-tests.el index f61c90d..f2dac73 100644 --- a/tests/purescript-indentation-tests.el +++ b/tests/purescript-indentation-tests.el @@ -75,7 +75,6 @@ data Foo = Foo1 Bar | Foo3 Unit")) (ert-deftest imports-zero-indented () - :expected-result :failed (purescript-test-indentation " module MyModule where