annotate runtime/syntax/config.vim @ 33767:4913b4f5a133 v9.0.2104

patch 9.0.2104: wast filetype should be replaced by wat filetype Commit: https://github.com/vim/vim/commit/bc8f79d36a456054ed29f46585830af6d71f57c8 Author: rhysd <lin90162@yahoo.co.jp> Date: Tue Nov 14 16:46:07 2023 +0100 patch 9.0.2104: wast filetype should be replaced by wat filetype Problem: wast filetype should be replaced by wat filetype Solution: start using the official wat filetype name runtime: rename `wast` filetype to `wat` (Wasm text format) The problem is the name of the current filetype wast. When the plugin was initially created, the file extension for Wasm text format was not fixed and .wast was more popular. However, recently .wat became the official file extension for WebAssembly text (WAT) format and .wast is now a file extension for the unofficial WAST format, which is a superset of .wat for the convenience to describe the Wasm specification conformance tests. https://webassembly.js.org/docs/contrib-wat-vs-wast.html However for now, let's keep using the `wat` filetype even for the .wast extension, so that we at least do not lose the filetype settings and syntax highlighting. This can be adjusted later, if it turns out to have a separate need for. closes: #13533 Signed-off-by: rhysd <lin90162@yahoo.co.jp> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Tue, 14 Nov 2023 17:15:03 +0100
parents 167a030448fa
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: configure.in script: M4 with sh
13231
167a030448fa Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
3 " Former Maintainer: Christian Hammesr <ch@lathspell.westend.com>
167a030448fa Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
4 " Last Change: 2018 Feb 03
6505
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
5 " (patch from Yngve Inntjore Levinsen to detect AC_MSG)
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
6 " (patch from Khym Chanur to add @Spell)
13231
167a030448fa Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
7 " (patch from James McCoy to fix paren matching)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " Well, I actually even do not know much about m4. This explains why there
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 " is probably very much missing here, yet !
6505
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
11 " But I missed good highlighting when editing my GNU autoconf/automake
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " script, so I wrote this quick and dirty patch.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 6505
diff changeset
15 " quit when a syntax file was already loaded
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 6505
diff changeset
16 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 " define the config syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn match configdelimiter "[()\[\];,]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn match configoperator "[=|&\*\+\<\>]"
6505
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
23 syn match configcomment "\(dnl.*\)\|\(#.*\)" contains=configDnl,@Spell
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn match configfunction "\<[A-Z_][A-Z0-9_]*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn match confignumber "[-+]\=\<\d\+\(\.\d*\)\=\>"
6505
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
26 syn keyword configDnl dnl contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword configkeyword if then else fi test for in do done
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn keyword configspecial cat rm eval
6505
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
29
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
30 " This shortens the script, see syn-ext-match..
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
31 syn region configstring start=+\z(["'`]\)+ skip=+\\\z1+ end=+\z1+ contains=@Spell
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
32
198e1e498edf Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
33 " Anything inside AC_MSG_TYPE([...]) and AC_MSG_TYPE(...) is a string.
13231
167a030448fa Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
34 syn region configmsg matchgroup=configfunction start="AC_MSG_[A-Z]*\ze(\[" matchgroup=configdelimiter end="\])" contains=configdelimiter,@Spell
167a030448fa Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
35 syn region configmsg matchgroup=configfunction start="AC_MSG_[A-Z]*\ze([^[]" matchgroup=configdelimiter end=")" contains=configdelimiter,@Spell
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 " Define the default highlighting.
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 6505
diff changeset
38 " Only when an item doesn't have highlighting yet
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
40 hi def link configdelimiter Delimiter
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
41 hi def link configoperator Operator
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
42 hi def link configcomment Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
43 hi def link configDnl Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
44 hi def link configfunction Function
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
45 hi def link confignumber Number
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
46 hi def link configkeyword Keyword
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
47 hi def link configspecial Special
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
48 hi def link configstring String
13231
167a030448fa Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 10051
diff changeset
49 hi def link configmsg String
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 let b:current_syntax = "config"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 " vim: ts=4