[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/nix-mode 80a1e96c71 296/500: Merge branch 'grahamc-fix-iss
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/nix-mode 80a1e96c71 296/500: Merge branch 'grahamc-fix-issue-69' |
Date: |
Sat, 29 Jan 2022 08:27:15 -0500 (EST) |
branch: elpa/nix-mode
commit 80a1e96c7133925797a748cf9bc097ca6483baeb
Merge: 54ef833100 e8921b8a78
Author: Elis Hirwing <elis@hirwing.se>
Commit: Elis Hirwing <elis@hirwing.se>
Merge branch 'grahamc-fix-issue-69'
---
nix-mode.el | 6 +++---
tests/nix-mode-tests.el | 12 ++++++++++++
tests/testcases/issue-69.1.nix | 2 ++
tests/testcases/issue-69.2.nix | 2 ++
4 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/nix-mode.el b/nix-mode.el
index 300f7de99e..df664a36a3 100644
--- a/nix-mode.el
+++ b/nix-mode.el
@@ -502,12 +502,12 @@ STRING-TYPE type of string based off of Emacs syntax
table types"
) -1 0)
)))))
- ;; indent line after 'let', 'import', '[', '=', '(', '{'
- ((nix-indent-first-line-in-block))
-
;; dedent '}', ']', ')' 'in'
((nix-indent-to-backward-match))
+ ;; indent line after 'let', 'import', '[', '=', '(', '{'
+ ((nix-indent-first-line-in-block))
+
;; indent between = and ; + 2, or to 2
((nix-indent-expression-start))
diff --git a/tests/nix-mode-tests.el b/tests/nix-mode-tests.el
index 84c223ce76..a73a90c655 100644
--- a/tests/nix-mode-tests.el
+++ b/tests/nix-mode-tests.el
@@ -106,5 +106,17 @@ Related issue: https://github.com/NixOS/nix-mode/issues/60";
Related issue: https://github.com/NixOS/nix-mode/issues/60";
(with-nix-mode-test ("issue-60.3.nix" :indent t)))
+(ert-deftest nix-mode-test-indent-issue-69-1 ()
+ "Proper indentation of an empty attrset.
+
+Related issue: https://github.com/NixOS/nix-mode/issues/69";
+ (with-nix-mode-test ("issue-69.1.nix" :indent t)))
+
+(ert-deftest nix-mode-test-indent-issue-69-2 ()
+ "Proper indentation of an empty list.
+
+Related issue: https://github.com/NixOS/nix-mode/issues/69";
+ (with-nix-mode-test ("issue-60.2.nix" :indent t)))
+
(provide 'nix-mode-tests)
;;; nix-mode-tests.el ends here
diff --git a/tests/testcases/issue-69.1.nix b/tests/testcases/issue-69.1.nix
new file mode 100644
index 0000000000..2c63c08510
--- /dev/null
+++ b/tests/testcases/issue-69.1.nix
@@ -0,0 +1,2 @@
+{
+}
diff --git a/tests/testcases/issue-69.2.nix b/tests/testcases/issue-69.2.nix
new file mode 100644
index 0000000000..0d4f101c7a
--- /dev/null
+++ b/tests/testcases/issue-69.2.nix
@@ -0,0 +1,2 @@
+[
+]
- [nongnu] elpa/nix-mode 630cc427cd 009/500: Update builtins, (continued)
- [nongnu] elpa/nix-mode 630cc427cd 009/500: Update builtins, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 295bcbd919 023/500: Don't indent strings, comments, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 7a97635267 025/500: Move to nix-re-file-path, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode c08ae1cdfe 049/500: Add limit arg to looking-back., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 504285ce39 138/500: Remove nix-buffer, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode c06222659c 185/500: Don’t enable mmm-mode automatically, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 858d127fb5 259/500: Add custom for directory location, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 6445ebfad6 285/500: Merge pull request #63 from etu/ert-indent-testing, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 54ef833100 294/500: Merge pull request #68 from etu/fix-recent-regressions, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode e8921b8a78 295/500: Prioritize closing } over regular indentation, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 80a1e96c71 296/500: Merge branch 'grahamc-fix-issue-69',
ELPA Syncer <=
- [nongnu] elpa/nix-mode 53ea839a52 418/500: Replace javascript-mode with js-mode, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode aae6f710e0 404/500: Address review comments, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode d27820b040 442/500: Merge pull request #131 from nagy/nix-process-refactor, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 5f44621864 474/500: nix-flake: Make the argument bindings more predictable, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode a18a226ce9 123/500: Add nix-mode tests., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 9e59bcf59e 216/500: Fix read only .drv file issue, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 8ab089b251 230/500: Set nix-shell-attribute, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 84ee98019f 271/500: Skip over comments in indentation, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode a30e88362a 290/500: Remove line that caused tests to not indent at all in the tests, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 82399e6bc3 305/500: Add missing check for '?' when lexing forward., ELPA Syncer, 2022/01/29