annotate runtime/syntax/pbtxt.vim @ 31732:ef7a9a7eb197 v9.0.1198

patch 9.0.1198: abstract class not supported yet Commit: https://github.com/vim/vim/commit/24a8d06d7f4db0865f374ced2f4d4b57cbc5b9e4 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 14 13:12:06 2023 +0000 patch 9.0.1198: abstract class not supported yet Problem: Abstract class not supported yet. Solution: Implement abstract class and add tests.
author Bram Moolenaar <Bram@vim.org>
date Sat, 14 Jan 2023 14:15:06 +0100
parents e7c125224b1a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
22958
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 " Vim syntax file
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2 " Language: Protobuf Text Format
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 " Maintainer: Lakshay Garg <lakshayg@outlook.in>
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4 " Last Change: 2020 Nov 17
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5 " Homepage: https://github.com/lakshayg/vim-pbtxt
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 if exists("b:current_syntax")
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 finish
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9 endif
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11 let s:cpo_save = &cpo
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12 set cpo&vim
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14 syn case ignore
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 syn keyword pbtxtTodo TODO FIXME contained
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17 syn keyword pbtxtBool true false contained
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19 syn match pbtxtInt display "\<\(0\|[1-9]\d*\)\>"
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20 syn match pbtxtHex display "\<0[xX]\x\+\>"
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21 syn match pbtxtFloat display "\(0\|[1-9]\d*\)\=\.\d*"
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22 syn match pbtxtMessage display "^\s*\w\+\s*{"me=e-1
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23 syn match pbtxtField display "^\s*\w\+:"me=e-1
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24 syn match pbtxtEnum display ":\s*\a\w\+"ms=s+1 contains=pbtxtBool
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25 syn region pbtxtString start=+"+ skip=+\\"+ end=+"+ contains=@Spell
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26 syn region pbtxtComment start="#" end="$" keepend contains=pbtxtTodo,@Spell
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28 hi def link pbtxtTodo Todo
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29 hi def link pbtxtBool Boolean
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 hi def link pbtxtInt Number
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31 hi def link pbtxtHex Number
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32 hi def link pbtxtFloat Float
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33 hi def link pbtxtMessage Structure
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34 hi def link pbtxtField Identifier
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35 hi def link pbtxtEnum Define
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36 hi def link pbtxtString String
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
37 hi def link pbtxtComment Comment
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
39 let b:current_syntax = "pbtxt"
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
40
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
41 let &cpo = s:cpo_save
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
42 unlet s:cpo_save
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
43
e7c125224b1a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
44 " vim: nowrap sw=2 sts=2 ts=8 noet