neovim use spaces for indentation for nix lang
This commit is contained in:
@@ -53,7 +53,7 @@
|
|||||||
autocmd BufReadPost * call Setup()
|
autocmd BufReadPost * call Setup()
|
||||||
|
|
||||||
function 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 . "()"
|
execute "call Setup_" . &syntax . "()"
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
@@ -167,6 +167,20 @@
|
|||||||
|
|
||||||
""""""""""""""""""""""""""""" languages """""""""""""""""""""""""""""
|
""""""""""""""""""""""""""""" 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 ###### "
|
||||||
"Typst highlight customisation
|
"Typst highlight customisation
|
||||||
function Setup_typst()
|
function Setup_typst()
|
||||||
|
|||||||
Reference in New Issue
Block a user