neovim

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

ipkg.vim (1597B)


      1 " Vim syntax file
      2 " Language:    Ipkg
      3 " Maintainer:  Idris Hackers (https://github.com/edwinb/idris2-vim), Serhii Khoma <srghma@gmail.com>
      4 " Last Change: 2020 May 19
      5 " Version:     0.1
      6 " Author:      ShinKage
      7 " License:     Vim (see :h license)
      8 " Repository:  https://github.com/ShinKage/idris2-nvim
      9 "
     10 " Syntax highlight for Idris 2 Package Descriptors (idris-lang.org)
     11 "
     12 
     13 if exists("b:current_syntax")
     14  finish
     15 endif
     16 
     17 " we want to use line continuations (\) BEGINNING
     18 let s:cpo_save = &cpo
     19 set cpo&vim
     20 
     21 syn keyword ipkgKey
     22    \ package
     23    \ authors
     24    \ maintainers
     25    \ license
     26    \ brief
     27    \ readme
     28    \ homepage
     29    \ sourceloc
     30    \ bugtracker
     31    \ options
     32    \ opts
     33    \ sourcedir
     34    \ builddir
     35    \ outputdir
     36    \ prebuild
     37    \ postbuild
     38    \ preinstall
     39    \ postinstall
     40    \ preclean
     41    \ postclean
     42    \ version
     43    \ langversion
     44    \ modules
     45    \ main
     46    \ executable
     47    \ depends
     48 
     49 " we want to use line continuations (\) END
     50 let &cpo = s:cpo_save
     51 unlet s:cpo_save
     52 
     53 syn region ipkgString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell
     54 syn match ipkgVersion "[0-9]*\([.][0-9]*\)*"
     55 syn match ipkgName "[a-zA-Z][a-zA-z0-9_']*\([.][a-zA-Z][a-zA-z0-9_']*\)*" contained
     56 syn match ipkgOperator "\(,\|&&\|<\|<=\|==\|>=\|>\)"
     57 syn match ipkgComment "---*\([^-!#$%&\*\+./<=>\?@\\^|~].*\)\?$" contains=@Spell
     58 
     59 highlight def link ipkgKey Statement
     60 highlight def link ipkgString String
     61 highlight def link ipkgVersion Number
     62 highlight def link ipkgName Identifier
     63 highlight def link ipkgOperator Operator
     64 highlight def link ipkgComment Comment
     65 
     66 let b:current_syntax = "ipkg"