define the indent function once

This commit is contained in:
rhysd 2022-01-08 19:18:41 +09:00
parent 0a43c54160
commit b3c02ec936

View file

@ -3,14 +3,19 @@ if exists("b:did_indent")
endif
let b:did_indent = 1
let s:cpo_save = &cpo
set cpo&vim
setlocal autoindent
setlocal nolisp
setlocal nosmartindent
setlocal indentexpr=WgslIndent(v:lnum)
" Only define the function once.
if exists("*WgslIndent")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
function! WgslIndent(lnum)
if a:lnum == 1
return 0