Updated to latest version of language.
This commit is contained in:
parent
dbbbdffb40
commit
997cc4bf5a
@ -24,9 +24,9 @@ function! GetNomsuIndent()
|
||||
let previous = getline(previousNum)
|
||||
let ind = indent(previousNum)
|
||||
|
||||
if previous =~ ':\s*\($\|#\)' || previous =~ '(\.\.)\s*\($\|#\)'
|
||||
if previous =~ '{\.\.}\s*\($\|#\)' || previous =~ '(\.\.)\s*\($\|#\)'
|
||||
\ || previous =~ '\[\.\.\]\s*\($\|#\)' || previous =~ '"\.\."\s*\($\|#\)'
|
||||
\ || previous =~ '#\.\..*$'
|
||||
\ || previous =~ '#$'
|
||||
let ind += &tabstop
|
||||
endif
|
||||
|
||||
|
@ -11,42 +11,43 @@ endif
|
||||
syn sync minlines=100
|
||||
|
||||
hi def link nomsuInterpDelim PreProc
|
||||
syn region nomsuOneLineComment start=/#\(\.\.\)\@!/ end=/$/
|
||||
syn region nomsuOneLineComment start=/#/ end=/$/
|
||||
hi nomsuOneLineComment ctermfg=DarkBlue
|
||||
hi def link nomsuOneLineComment Comment
|
||||
syn region nomsuComment start=/\(^\z(\s*\)[^\n]*\)\@<=#\.\./ skip=/\n\s*$/ end=/\n\(\z1\s\)\@!/
|
||||
syn region nomsuComment start=/\(^\z(\s*\)[^\n]*\)\@<=#/ skip=/\n\s*$/ end=/\n\(\z1\s\)\@!/
|
||||
hi nomsuComment ctermfg=DarkBlue
|
||||
hi def link nomsuComment Comment
|
||||
|
||||
|
||||
syn region nomsuList start=/\[/ end=/\]/ contains=@nomsuAll,nomsuComma
|
||||
hi nomsuList ctermfg=Blue
|
||||
|
||||
syn region nomsuDict start=/{/ end=/}/ contains=nomsuColon,nomsuComma,@nomsuAll
|
||||
hi nomsuDict ctermfg=Green
|
||||
|
||||
syn region nomsuParenGroup start=/(/ end=/)/ contains=@nomsuAll
|
||||
hi nomsuParenGroup ctermfg=Yellow
|
||||
hi def link nomsuParens Delimiter
|
||||
syn match nomsuLongStringStart /"\.\."/ contains=nomsuIndentor contained
|
||||
hi nomsuLongStringStart ctermfg=Yellow
|
||||
syn match nomsuStringPipe /|/ contained
|
||||
hi nomsuStringPipe ctermfg=DarkGray
|
||||
syn match nomsuStringBackslash /\\\\/ contained
|
||||
hi nomsuStringBackslash ctermbg=Black ctermfg=Blue
|
||||
syn match nomsuStringEscapedQuote /\\"/ contained
|
||||
hi nomsuStringEscapedQuote ctermbg=Black ctermfg=Blue
|
||||
hi def link nomsuStringPipe Special
|
||||
|
||||
syn match nomsuLongTextStart /"\.\."/ contains=nomsuIndentor contained
|
||||
hi nomsuLongTextStart ctermfg=Gray
|
||||
syn match nomsuTextBackslash /\\\\/ contained
|
||||
hi nomsuTextBackslash ctermbg=Black ctermfg=Blue
|
||||
syn match nomsuTextEscapedQuote /\\"/ contained
|
||||
hi nomsuTextEscapedQuote ctermbg=Black ctermfg=Blue
|
||||
syn region nomsuInterp matchgroup=nomsuInterpDelim start=/\\(/ end=/)/ contained
|
||||
\ contains=@nomsuAll
|
||||
syn region nomsuInterpDotDot matchgroup=nomsuInterpDelim start=/\\$/ end=/\.\./ contained
|
||||
syn region nomsuLongStringValue start=/\(|\)\@<=/ end=/$/ contained
|
||||
\ contains=nomsuInterp,nomsuInterpDotDot,nomsuStringBackslash
|
||||
hi nomsuLongStringValue ctermbg=Black ctermfg=Gray
|
||||
hi def link nomsuLongStringValue String
|
||||
syn region nomsuLongStringLine start=/^\s\+|/ end=/\n/ contained
|
||||
\ contains=nomsuStringPipe,nomsuLongStringValue
|
||||
syn region nomsuLongString start=/\(^\z(\s*\)[^\n]*\)\@<="\.\."/ skip=/^\s*$/ end=/^\(\z1\s\)\@!/
|
||||
\ contains=nomsuLongStringStart,nomsuOneLineComment,nomsuComment,nomsuLongStringLine
|
||||
syn region nomsuLongTextValue start=/^/ end=/$/ contained
|
||||
\ contains=nomsuInterp,nomsuInterpDotDot,nomsuTextBackslash
|
||||
hi nomsuLongTextValue ctermfg=Gray
|
||||
hi def link nomsuLongTextValue Text
|
||||
syn region nomsuLongText start=/\(^\z(\s*\)[^\n]*\)\@<="\.\."/ skip=/^\s*$/ end=/^\(\z1\s\)\@!/
|
||||
\ contains=nomsuLongTextStart,nomsuLongTextValue
|
||||
|
||||
syn region nomsuString start=/\("\.\.\)\@<!"\(\.\."\)\@!/ skip=/\\\\\|\\"/ end=/$\|"/
|
||||
\ contains=nomsuInterp,nomsuStringBackslash,nomsuStringEscapedQuote
|
||||
hi nomsuString ctermbg=Black ctermfg=Gray
|
||||
hi def link nomsuString String
|
||||
syn region nomsuText start=/\("\.\.\)\@<!"\(\.\."\)\@!/ skip=/\\\\\|\\"/ end=/$\|"/
|
||||
\ contains=nomsuInterp,nomsuTextBackslash,nomsuTextEscapedQuote
|
||||
hi nomsuText ctermfg=Gray
|
||||
hi def link nomsuText String
|
||||
|
||||
syn match nomsuVar /%[a-zA-Z0-9_]*/
|
||||
hi nomsuVar ctermfg=Cyan
|
||||
@ -68,16 +69,20 @@ syn match nomsuDotDot /\.\./
|
||||
hi def link nomsuDotDot Special
|
||||
hi nomsuDotDot ctermfg=DarkGray
|
||||
|
||||
syn match nomsuDelim /[,;\[\]{}]/
|
||||
hi nomsuDelim ctermfg=Yellow
|
||||
hi def link nomsuDelim Delimiter
|
||||
syn match nomsuComma /,/
|
||||
hi nomsuComma ctermfg=Blue
|
||||
hi def link nomsuComma Delimiter
|
||||
|
||||
syn match nomsuThunk /:/
|
||||
hi nomsuThunk ctermfg=Yellow
|
||||
hi def link nomsuThunk Structure
|
||||
syn match nomsuColon /:/
|
||||
hi nomsuColon ctermfg=Yellow
|
||||
hi def link nomsuColon Delimiter
|
||||
|
||||
syn cluster nomsuAll contains=nomsuParenGroup,nomsuString,nomsuLongString,nomsuComment,nomsuOneLineComment,
|
||||
\ nomsuVar,nomsuNumber,nomsuDelim,nomsuThunk,nomsuDotDot,nomsuWord,
|
||||
syn match nomsuSemicolon /;/
|
||||
hi nomsuSemicolon ctermfg=Blue
|
||||
hi def link nomsuSemicolon Delimiter
|
||||
|
||||
syn cluster nomsuAll contains=nomsuParenGroup,nomsuText,nomsuLongText,nomsuComment,nomsuOneLineComment,
|
||||
\ nomsuVar,nomsuNumber,nomsuDict,nomsuList,nomsuColon,nomsuSemicolon,nomsuDotDot,nomsuWord,
|
||||
\ nomsuOpWord
|
||||
|
||||
if !exists('b:current_syntax')
|
||||
|
Loading…
Reference in New Issue
Block a user