branch: externals/indent-bars
commit 7b759575880db108842dca3a15de1b2f7b19c6b2
Author: Gregor Grigorjan <[email protected]>
Commit: Gregor Grigorjan <[email protected]>

    Add Nix language support
    
    Nix usually has an indentation size of 2,
    so the fallback value of 4 is not suitable.
---
 indent-bars.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/indent-bars.el b/indent-bars.el
index 74b1e5b359..33f049e433 100644
--- a/indent-bars.el
+++ b/indent-bars.el
@@ -1125,6 +1125,10 @@ Adapted from `highlight-indentation-mode'."
     cobol-tab-width)
    ((or (derived-mode-p 'go-ts-mode) (derived-mode-p 'go-mode))
     tab-width)
+   ((derived-mode-p 'nix-mode)
+    tab-width)
+   ((and (derived-mode-p 'nix-ts-mode) (boundp 'nix-ts-mode-indent-offset))
+    nix-ts-mode-indent-offset)
    ((and (boundp 'standard-indent) standard-indent))
    (t 4)))                             ; backup
 

Reply via email to