neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

m17ndb.vim (1021B)


      1 " Vim syntax file
      2 " Language:	m17n database
      3 " Maintainer:	David Mandelberg <david@mandelberg.org>
      4 " Last Change:	2025 Feb 21
      5 "
      6 " https://www.nongnu.org/m17n/manual-en/m17nDBFormat.html describes the
      7 " syntax, but some of its regexes don't match the code. read_element() in
      8 " https://git.savannah.nongnu.org/cgit/m17n/m17n-lib.git/tree/src/plist.c
      9 " seems to be a better place to understand the syntax.
     10 
     11 if exists("b:current_syntax")
     12 finish
     13 endif
     14 let b:current_syntax = "m17ndb"
     15 
     16 syn match m17ndbSymbol /\([^\x00- ()"\\]\|\\\_.\)\+/
     17 syn match m17ndbComment ";.*$" contains=@Spell
     18 syn match m17ndbInteger "-\?[0-9]\+"
     19 syn match m17ndbInteger "[0#]x[0-9A-Fa-f]\+"
     20 syn match m17ndbCharacter "?\(\_[^\\]\|\\\_.\)"
     21 syn region m17ndbText start=/\Z"/ skip=/\\\\\|\\"/ end=/"/
     22 syn region m17ndbPlist matchgroup=m17ndbParen start="(" end=")" fold contains=ALL
     23 
     24 hi def link m17ndbCharacter Character
     25 hi def link m17ndbComment Comment
     26 hi def link m17ndbInteger Number
     27 hi def link m17ndbParen Delimiter
     28 hi def link m17ndbText String