[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/nix-mode 76ad5882f0 046/500: format
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/nix-mode 76ad5882f0 046/500: format |
Date: |
Sat, 29 Jan 2022 08:26:35 -0500 (EST) |
branch: elpa/nix-mode
commit 76ad5882f00023c9e566a71b25dd184b780d53e1
Author: Matthew Bauer <mjbauer95@gmail.com>
Commit: Matthew Bauer <mjbauer95@gmail.com>
format
---
nix-mode.el | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/nix-mode.el b/nix-mode.el
index a8917e975a..7c02a1a20c 100644
--- a/nix-mode.el
+++ b/nix-mode.el
@@ -155,6 +155,7 @@ If a close brace `}' ends an antiquote, the next character
begins a string."
(save-excursion
(setq p1 (point))
(setq p2 (nth 1 (syntax-ppss)))
+
(while p2
(goto-char p2)
(backward-char)
@@ -162,8 +163,9 @@ If a close brace `}' ends an antiquote, the next character
begins a string."
(l2 (line-number-at-pos p2)))
(if (not (eq l1 l2))
(setq n (+ n 1))))
- (setq p1 p2)
+ (setq p1 p2)
(setq p2 (nth 1 (syntax-ppss)))))
+
n)
(defun nix-indent-level-is-closing ()
@@ -171,6 +173,7 @@ If a close brace `}' ends an antiquote, the next character
begins a string."
(save-excursion
(beginning-of-line)
(skip-chars-forward "[:space:]")
+
(or ;; any of these should -1 indent level
(looking-at ")")
(looking-at "}")
@@ -206,7 +209,7 @@ If a close brace `}' ends an antiquote, the next character
begins a string."
(looking-back ",")
(looking-back "let")
(looking-back "in"))
- t))))
+ t))))
(defun nix-indent-level ()
"Get current indent level."
@@ -219,6 +222,7 @@ If a close brace `}' ends an antiquote, the next character
begins a string."
"Indent current line in a Nix expression."
(interactive)
(cond
+
;; comment
((save-excursion
(beginning-of-line)
- [nongnu] elpa/nix-mode 4941961c75 059/500: Get rid of extra hanging indent matches., (continued)
- [nongnu] elpa/nix-mode 4941961c75 059/500: Get rid of extra hanging indent matches., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode c577957d66 347/500: Merge pull request #85 from NixOS/fix-84, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode cccd68768b 319/500: Install info page to the right location, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode e820157994 338/500: Merge pull request #82 from jabranham/comp-warns, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 7556c032dc 421/500: Use the located nixfmt binary for formatting., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode df4ba688a7 435/500: Merge branch 'nix-search-updates', ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 4528033194 018/500: Add "nix-mode-reload" function., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode f3b4215166 004/500: Update metadata, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 69c7c87caa 017/500: Sert comment-multi-line., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 83229f0d4c 041/500: Fix flycheck errors., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 76ad5882f0 046/500: format,
ELPA Syncer <=
- [nongnu] elpa/nix-mode 3ef4647aa2 052/500: Fixup lets/ins counting., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 0ad464e25a 058/500: Add ']' to match closing parens., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 376cbff828 054/500: More let fixes., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 1a1ce340af 070/500: Fix indentation case when '{' at beginning., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode dc705bb4df 057/500: Disable generic hanging indent., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 2be81fe55b 074/500: Get rid of match-end., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 4ce19a966b 095/500: Merge branch 'ljli-fontication', ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 1e58da56ac 083/500: Fix var name nix-err-msg-re, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode b1078c6add 092/500: Add case sensitive searching, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 6eb927f3c1 080/500: Add basic flychecking via nix-instantiate, ELPA Syncer, 2022/01/29