annotate runtime/syntax/fpcmake.vim @ 34359:0447bf3a88a5 v9.1.0110

patch 9.1.0110: filetype: add 'Config.in' filetype detection Commit: https://github.com/vim/vim/commit/5f20f050efed3431beaf85739f0113e9ef0abd8e Author: Brandon Maier <brandon.maier@collins.com> Date: Wed Feb 14 22:30:06 2024 +0100 patch 9.1.0110: filetype: add 'Config.in' filetype detection The 'Config.in' file type is for Buildroot configuration files. Buildroot Config.in files use the same Kconfig backend as the Linux kernel's Kconfig files. Buildroot also has other filename variants that follow "Config.in.*", they are used to distinguish multiple Config.in files in the same directory. See https://buildroot.org/downloads/manual/manual.html#_literal_config_in_literal_file closes: #14038 Signed-off-by: Brandon Maier <brandon.maier@collins.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Wed, 14 Feb 2024 22:45:02 +0100
parents e3ec2ec8841a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
24569
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 " Vim syntax file
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2 " Language: Free Pascal Makefile Definition Files
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 " Maintainer: Doug Kearns <dougkearns@gmail.com>
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4 " Last Change: 2021 Apr 23
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6 if exists("b:current_syntax")
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 finish
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 endif
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10 runtime! syntax/make.vim
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12 " NOTE: using start-of-line anchored syn-match groups is simpler than other
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13 " alternatives when interacting with the sourced make.vim syntax groups
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15 " Sections
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 syn region fpcmakeSection matchgroup=fpcmakeSectionDelimiter start="^\s*\[" end="]" contains=fpcmakeSectionName
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18 syn keyword fpcmakeSectionName contained clean compiler default dist install
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19 syn keyword fpcmakeSectionName contained lib package prerules require rules
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20 syn keyword fpcmakeSectionName contained shared target
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22 " [clean]
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23 syn match fpcmakeRule "^\s*\(units\|files\)\>"
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24 " [compiler]
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25 syn match fpcmakeRule "^\s*\(options\|version\|unitdir\|librarydir\|objectdir\)\>"
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26 syn match fpcmakeRule "^\s*\(targetdir\|sourcedir\|unittargetdir\|includedir\)\>"
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27 " [default]
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28 syn match fpcmakeRule "^\s*\(cpu\|dir\|fpcdir\|rule\|target\)\>"
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29 " [dist]
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 syn match fpcmakeRule "^\s*\(destdir\|zipname\|ziptarget\)\>"
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31 " [install]
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32 syn match fpcmakeRule "^\s*\(basedir\|datadir\|fpcpackage\|files\|prefix\)\>"
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33 syn match fpcmakeRule "^\s*\(units\)\>"
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34 " [package]
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35 syn match fpcmakeRule "^\s*\(name\|version\|main\)\>"
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36 " [requires]
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
37 syn match fpcmakeRule "^\s*\(fpcmake\|packages\|libc\|nortl\|unitdir\)\>"
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38 syn match fpcmakeRule "^\s*\(packagedir\|tools\)\>"
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
39 " [shared]
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
40 syn match fpcmakeRule "^\s*\(build\|libname\|libversion\|libunits\)\>"
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
41 " [target]
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
42 syn match fpcmakeRule "^\s*\(dirs\|exampledirs\|examples\|loaders\|programs\)\>"
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
43 syn match fpcmakeRule "^\s*\(rsts\|units\)\>"
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
44
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
45 " Comments
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
46 syn keyword fpcmakeTodo TODO FIXME XXX contained
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
47 syn match fpcmakeComment "#.*" contains=fpcmakeTodo,@Spell
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
48
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
49 " Default highlighting
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
50 hi def link fpcmakeSectionDelimiter Delimiter
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
51 hi def link fpcmakeSectionName Type
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
52 hi def link fpcmakeComment Comment
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
53 hi def link fpcmakeTodo Todo
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
54 hi def link fpcmakeRule Identifier
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
55
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
56 let b:current_syntax = "fpcmake"
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
57
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
58 " vim: nowrap sw=2 sts=2 ts=8 noet: