Added cindent as a fallback function

This commit is contained in:
Talha Qamar 2024-09-04 14:16:35 +05:00
parent f7d6f3ae44
commit 489e3522d7
2 changed files with 15 additions and 8 deletions

View file

@ -0,0 +1,4 @@
" ALL OF THE FOLLOWING IS T
" Some preliminary settings
setlocal nolisp " Make sure lisp indenting doesn't supersede us
setlocal indentexpr=cindent(v:lnum)

View file

@ -1,12 +1,12 @@
syntax keyword hblangKeywords syntax keyword hblangKeywords
\ if \ if
\ loop \ loop
\ fn \ fn
\ return \ return
\ else \ else
\ break \ break
\ continue \ continue
\ struct \ struct
syntax match hblangNumber "\v<\d+>" syntax match hblangNumber "\v<\d+>"
syntax match hblangNumber "\v<0x\x+([Pp]-?)?\x+>" syntax match hblangNumber "\v<0x\x+([Pp]-?)?\x+>"
@ -18,6 +18,9 @@ syntax keyword hblangBoolean true false
syntax match hblangDirective /@\<\a\+\>/ syntax match hblangDirective /@\<\a\+\>/
syntax match hblangFunction /[a-zA-Z_]\+\ze(/ syntax match hblangFunction /[a-zA-Z_]\+\ze(/
syntax keyword hblangType int bool void
syntax match hblangType /u\d\+/
syntax match hblangType /i\d\+/
syntax region hblangString start=/"/ skip=/\\"/ end=/"/ oneline syntax region hblangString start=/"/ skip=/\\"/ end=/"/ oneline
syntax region hblangComment start=/\/\// end=/\n/ oneline syntax region hblangComment start=/\/\// end=/\n/ oneline