From 3a831de9d22d234dc2de40430bfb383ed31c4d4f Mon Sep 17 00:00:00 2001 From: Sebastian Moser Date: Wed, 1 Nov 2023 19:54:55 +0100 Subject: [PATCH] neovim use spaces for indentation for nix lang --- programs/neovim.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/programs/neovim.nix b/programs/neovim.nix index 45bc66c..64e9e6f 100644 --- a/programs/neovim.nix +++ b/programs/neovim.nix @@ -53,7 +53,7 @@ autocmd BufReadPost * call Setup() function Setup() - if index(["typst", "haskell", "tex", "c", "rust", "js", "vhdl"], &syntax) >= 0 + if index(["typst", "haskell", "tex", "c", "rust", "js", "vhdl", "nix"], &syntax) >= 0 execute "call Setup_" . &syntax . "()" endif endfunction @@ -167,6 +167,20 @@ """"""""""""""""""""""""""""" languages """"""""""""""""""""""""""""" + " ###### nix ###### " + function! Setup_typst() + " use spaces for indentation with nix .. so that multiline strings get stripped of tabs + set smartindent + set tabstop=2 + set expandtab + set shiftwidth=2 + + endfunction + + + + + " ###### typst ###### " "Typst highlight customisation function Setup_typst()