neovim

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

fpcmake.vim (2044B)


      1 " Vim syntax file
      2 " Language:	Free Pascal Makefile Definition Files
      3 " Maintainer:	Doug Kearns <dougkearns@gmail.com>
      4 " Last Change:	2021 Apr 23
      5 
      6 if exists("b:current_syntax")
      7  finish
      8 endif
      9 
     10 runtime! syntax/make.vim
     11 
     12 " NOTE: using start-of-line anchored syn-match groups is simpler than other
     13 "	alternatives when interacting with the sourced make.vim syntax groups
     14 
     15 " Sections
     16 syn region fpcmakeSection matchgroup=fpcmakeSectionDelimiter start="^\s*\[" end="]" contains=fpcmakeSectionName
     17 
     18 syn keyword fpcmakeSectionName contained clean compiler default dist install
     19 syn keyword fpcmakeSectionName contained lib package prerules require rules
     20 syn keyword fpcmakeSectionName contained shared target
     21 
     22 " [clean]
     23 syn match fpcmakeRule "^\s*\(units\|files\)\>"
     24 " [compiler]
     25 syn match fpcmakeRule "^\s*\(options\|version\|unitdir\|librarydir\|objectdir\)\>"
     26 syn match fpcmakeRule "^\s*\(targetdir\|sourcedir\|unittargetdir\|includedir\)\>"
     27 " [default]
     28 syn match fpcmakeRule "^\s*\(cpu\|dir\|fpcdir\|rule\|target\)\>"
     29 " [dist]
     30 syn match fpcmakeRule "^\s*\(destdir\|zipname\|ziptarget\)\>"
     31 " [install]
     32 syn match fpcmakeRule "^\s*\(basedir\|datadir\|fpcpackage\|files\|prefix\)\>"
     33 syn match fpcmakeRule "^\s*\(units\)\>"
     34 " [package]
     35 syn match fpcmakeRule "^\s*\(name\|version\|main\)\>"
     36 " [requires]
     37 syn match fpcmakeRule "^\s*\(fpcmake\|packages\|libc\|nortl\|unitdir\)\>"
     38 syn match fpcmakeRule "^\s*\(packagedir\|tools\)\>"
     39 " [shared]
     40 syn match fpcmakeRule "^\s*\(build\|libname\|libversion\|libunits\)\>"
     41 " [target]
     42 syn match fpcmakeRule "^\s*\(dirs\|exampledirs\|examples\|loaders\|programs\)\>"
     43 syn match fpcmakeRule "^\s*\(rsts\|units\)\>"
     44 
     45 " Comments
     46 syn keyword fpcmakeTodo    TODO FIXME XXX contained
     47 syn match   fpcmakeComment "#.*" contains=fpcmakeTodo,@Spell
     48 
     49 " Default highlighting
     50 hi def link fpcmakeSectionDelimiter	Delimiter
     51 hi def link fpcmakeSectionName		Type
     52 hi def link fpcmakeComment		Comment
     53 hi def link fpcmakeTodo			Todo
     54 hi def link fpcmakeRule			Identifier
     55 
     56 let b:current_syntax = "fpcmake"
     57 
     58 " vim: nowrap sw=2 sts=2 ts=8 noet: