add vim syntax file

main
NotAFile 2022-01-17 17:31:03 +01:00
parent b4e31d2bc8
commit 71774b2a2c
1 changed files with 17 additions and 0 deletions

17
contrib/fut.vim Normal file
View File

@ -0,0 +1,17 @@
syntax keyword futKeywords module wire reg wire input output proc if else
highlight default link futKeywords Keyword
setlocal indentexpr=FutIndent()
function! FutIndent()
let line = getline(v:lnum)
let previousNum = prevnonblank(v:lnum - 1)
let previous = getline(previousNum)
if previous =~ "{" && previous !~ "}" && line !~ "}"
return indent(previousNum) + &tabstop
endif
return indent(previousNum)
endfunction