neovim use spaces for indentation for nix lang

This commit is contained in:
Sebastian Moser
2023-11-01 19:54:55 +01:00
parent 6e96355ecc
commit 3a831de9d2

View File

@@ -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()