Vim/syntaxes/vimscript.tmLanguage.json
Jason Fields fc76d9aa6e Apply our (very) basic syntax highlighting to .vim files (not just .vimrc)
Also change contributed language's name to "Vimscript", which I don't think should break anything
2023-10-24 22:03:18 -04:00

57 lines
1.3 KiB
JSON

{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": "Vimscript",
"fileTypes": [".vim", ".vimrc"],
"scopeName": "source.vimscript",
"patterns": [
{
"name": "comment.line",
"match": "(^| |\t)\".*$"
},
{
"name": "entity.name.function",
"match": "^( |\t)*(map|nmap|vmap|smap|xmap|omap|map!|imap|lmap|cmap)"
},
{
"name": "entity.name.function",
"match": "^( |\t)*(noremap|nnoremap|vnoremap|snoremap|xnoremap|onoremap|noremap!|inoremap|lnoremap|cnoremap)"
},
{
"name": "entity.name.function",
"match": "^( |\t)*(unmap|nunmap|vunmap|sunmap|xunmap|ounmap|unmap!|iunmap|lunmap|cunmap)"
},
{
"name": "entity.name.function",
"match": "^( |\t)*set"
},
{
"name": "constant",
"match": "(?i)<Leader>"
},
{
"name": "constant",
"match": "(?i)<(CR|Enter|Return)>"
},
{
"name": "constant",
"match": "(?i)<(BS|Del|Space)>"
},
{
"name": "constant",
"match": "(?i)<Esc>"
},
{
"name": "constant",
"match": "(?i)<(Up|Down|Left|Right)>"
},
{
"name": "constant",
"match": "(?i)<[CD]-.>"
},
{
"name": "string.unquoted",
"match": "(?i)[\\w-]+(\\.[\\w-]+)+"
}
]
}