Mercurial > vim
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 |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: configure.in script: M4 with sh | |
13231 | 3 " Former Maintainer: Christian Hammesr <ch@lathspell.westend.com> |
4 " Last Change: 2018 Feb 03 | |
6505 | 5 " (patch from Yngve Inntjore Levinsen to detect AC_MSG) |
6 " (patch from Khym Chanur to add @Spell) | |
13231 | 7 " (patch from James McCoy to fix paren matching) |
7 | 8 |
9 " Well, I actually even do not know much about m4. This explains why there | |
10 " is probably very much missing here, yet ! | |
6505 | 11 " But I missed good highlighting when editing my GNU autoconf/automake |
7 | 12 " script, so I wrote this quick and dirty patch. |
13 | |
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 | 17 finish |
18 endif | |
19 | |
20 " define the config syntax | |
21 syn match configdelimiter "[()\[\];,]" | |
22 syn match configoperator "[=|&\*\+\<\>]" | |
6505 | 23 syn match configcomment "\(dnl.*\)\|\(#.*\)" contains=configDnl,@Spell |
7 | 24 syn match configfunction "\<[A-Z_][A-Z0-9_]*\>" |
25 syn match confignumber "[-+]\=\<\d\+\(\.\d*\)\=\>" | |
6505 | 26 syn keyword configDnl dnl contained |
7 | 27 syn keyword configkeyword if then else fi test for in do done |
28 syn keyword configspecial cat rm eval | |
6505 | 29 |
30 " This shortens the script, see syn-ext-match.. | |
31 syn region configstring start=+\z(["'`]\)+ skip=+\\\z1+ end=+\z1+ contains=@Spell | |
32 | |
33 " Anything inside AC_MSG_TYPE([...]) and AC_MSG_TYPE(...) is a string. | |
13231 | 34 syn region configmsg matchgroup=configfunction start="AC_MSG_[A-Z]*\ze(\[" matchgroup=configdelimiter end="\])" contains=configdelimiter,@Spell |
35 syn region configmsg matchgroup=configfunction start="AC_MSG_[A-Z]*\ze([^[]" matchgroup=configdelimiter end=")" contains=configdelimiter,@Spell | |
7 | 36 |
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 | 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 | 49 hi def link configmsg String |
7 | 50 |
51 | |
52 let b:current_syntax = "config" | |
53 | |
54 " vim: ts=4 |