diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-04-23 20:52:29 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-04-27 09:21:28 -0400 |
commit | 233292b0ba9fb5d60ef7b2973c3a778e9c12be0c (patch) | |
tree | 108a9452a847baefbb2e90e913fb9b46b0fd3459 /runtime/syntax | |
parent | f0bf853f41ac4ad765bf279c331669d8c9d1e5c5 (diff) | |
download | rneovim-233292b0ba9fb5d60ef7b2973c3a778e9c12be0c.tar.gz rneovim-233292b0ba9fb5d60ef7b2973c3a778e9c12be0c.tar.bz2 rneovim-233292b0ba9fb5d60ef7b2973c3a778e9c12be0c.zip |
vim-patch:96f45c0b6fc9
Update runtime files
https://github.com/vim/vim/commit/96f45c0b6fc9e9d404e6805593ed1e0e6795e470
Omit de.po changes.
Same reason as before: too much and I don't understand the language.
Diffstat (limited to 'runtime/syntax')
-rw-r--r-- | runtime/syntax/dart.vim | 90 | ||||
-rw-r--r-- | runtime/syntax/dtd.vim | 13 | ||||
-rw-r--r-- | runtime/syntax/meson.vim | 165 |
3 files changed, 262 insertions, 6 deletions
diff --git a/runtime/syntax/dart.vim b/runtime/syntax/dart.vim new file mode 100644 index 0000000000..d1c2bf2158 --- /dev/null +++ b/runtime/syntax/dart.vim @@ -0,0 +1,90 @@ +" Vim syntax file +" +" Language: Dart +" Maintainer: Eugene 'pr3d4t0r' Ciurana <dart.syntax AT cime.net > +" Source: https://github.com/pr3d4t0r/dart-vim-syntax +" Last Update: 2019 Oct 19 +" +" License: Vim is Charityware. dart.vim syntax is Charityware. +" (c) Copyright 2019 by Eugene Ciurana / pr3d4t0r. Licensed +" under the standard VIM LICENSE - Vim command :help uganda.txt +" for details. +" +" Questions, comments: <dart.syntax AT cime.net> +" https://ciurana.eu/pgp, https://keybase.io/pr3d4t0r +" +" vim: set fileencoding=utf-8: + + +" Quit when a (custom) syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + + +syn keyword dartCommentTodo contained TODO FIXME XXX TBD +syn match dartLineComment "//.*" contains=dartTodo,@Spell +syn match dartCommentSkip "^[ \t]*\*\($\|[ \t]\+\)" +syn region dartComment start="/\*" end="\*/" contains=@Spell,dartTodo +syn keyword dartReserved assert async await class const export extends external final hide import implements interface library mixin on show super sync yield +syn match dartNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>" + + +syn keyword dartBoolean false true +syn keyword dartBranch break continue +syn keyword dartConditional if else switch +syn keyword dartException catch finally rethrow throw try +syn keyword dartIdentifier abstract covariant deferred dynamic factory Function operator part static this typedef var +syn keyword dartLabel case default +syn keyword dartNull null +syn keyword dartOperator is new +syn keyword dartRepeat for do in while +syn keyword dartStatement return with +syn keyword dartType bool double enum int String StringBuffer void +syn keyword dartTodo contained TODO FIXME XXX + + +syn match dartEscape contained "\\\([4-9]\d\|[0-3]\d\d\|[\"\\'ntbrf]\|u\x\{4\}\)" +syn match dartSpecialError contained "\\." +syn match dartStrInterpol contained "\${[\x, _]*\}" + +syn region dartDQString start=+"+ end=+"+ end=+$+ contains=dartEscape,dartStrInterpol,dartSpecialError,@Spell +syn region dartSQString start=+'+ end=+'+ end=+$+ contains=dartEscape,dartStrInterpol,dartSpecialError,@Spell + +syn match dartBraces "[{}\[\]]" +syn match dartParens "[()]" + + +syn sync fromstart +syn sync maxlines=100 + + +hi def link dartBoolean Boolean +hi def link dartBranch Conditional +hi def link dartComment Comment +hi def link dartConditional Conditional +hi def link dartDQString String +hi def link dartEscape SpecialChar +hi def link dartException Exception +hi def link dartIdentifier Identifier +hi def link dartLabel Label +hi def link dartLineComment Comment +hi def link dartNull Keyword +hi def link dartOperator Operator +hi def link dartRepeat Repeat +hi def link dartReserved Keyword +hi def link dartSQString String +hi def link dartSpecialError Error +hi def link dartStatement Statement +hi def link dartStrInterpol Special +hi def link dartTodo Todo +hi def link dartType Type + + +let b:current_syntax = "dart" +let &cpo = s:cpo_save +unlet s:cpo_save + diff --git a/runtime/syntax/dtd.vim b/runtime/syntax/dtd.vim index ae0bd1288e..ef0592e1d1 100644 --- a/runtime/syntax/dtd.vim +++ b/runtime/syntax/dtd.vim @@ -1,10 +1,11 @@ " Vim syntax file -" Language: DTD (Document Type Definition for XML) -" Maintainer: Johannes Zellner <johannes@zellner.org> -" Author and previous maintainer: -" Daniel Amyot <damyot@site.uottawa.ca> -" Last Change: Tue, 27 Apr 2004 14:54:59 CEST -" Filenames: *.dtd +" Language: DTD (Document Type Definition for XML) +" Maintainer: Christian Brabandt <cb@256bit.org> +" Repository: https://github.com/chrisbra/vim-xml-ftplugin +" Previous Maintainer: Johannes Zellner <johannes@zellner.org> +" Author: Daniel Amyot <damyot@site.uottawa.ca> +" Last Changed: Sept 24, 2019 +" Filenames: *.dtd " " REFERENCES: " http://www.w3.org/TR/html40/ diff --git a/runtime/syntax/meson.vim b/runtime/syntax/meson.vim new file mode 100644 index 0000000000..78de2ab89e --- /dev/null +++ b/runtime/syntax/meson.vim @@ -0,0 +1,165 @@ +" Vim syntax file +" Language: Meson +" License: VIM License +" Maintainer: Nirbheek Chauhan <nirbheek.chauhan@gmail.com> +" Last Change: 2019 Oct 18 +" Credits: Zvezdan Petkovic <zpetkovic@acm.org> +" Neil Schemenauer <nas@meson.ca> +" Dmitry Vasiliev +" +" This version is copied and edited from python.vim +" It's very basic, and doesn't do many things I'd like it to +" For instance, it should show errors for syntax that is valid in +" Python but not in Meson. +" +" Optional highlighting can be controlled using these variables. +" +" let meson_space_error_highlight = 1 +" + +" For version 5.x: Clear all syntax items. +" For version 6.x: Quit when a syntax file was already loaded. +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" We need nocompatible mode in order to continue lines with backslashes. +" Original setting will be restored. +let s:cpo_save = &cpo +set cpo&vim + +" http://mesonbuild.com/Syntax.html +syn keyword mesonConditional elif else if endif +syn keyword mesonRepeat foreach endforeach +syn keyword mesonOperator and not or + +syn match mesonComment "#.*$" contains=mesonTodo,@Spell +syn keyword mesonTodo FIXME NOTE NOTES TODO XXX contained + +" Strings can either be single quoted or triple counted across multiple lines, +" but always with a ' +syn region mesonString + \ start="\z('\)" end="\z1" skip="\\\\\|\\\z1" + \ contains=mesonEscape,@Spell +syn region mesonString + \ start="\z('''\)" end="\z1" keepend + \ contains=mesonEscape,mesonSpaceError,@Spell + +syn match mesonEscape "\\[abfnrtv'\\]" contained +syn match mesonEscape "\\\o\{1,3}" contained +syn match mesonEscape "\\x\x\{2}" contained +syn match mesonEscape "\%(\\u\x\{4}\|\\U\x\{8}\)" contained +" Meson allows case-insensitive Unicode IDs: http://www.unicode.org/charts/ +syn match mesonEscape "\\N{\a\+\%(\s\a\+\)*}" contained +syn match mesonEscape "\\$" + +" Meson only supports integer numbers +" http://mesonbuild.com/Syntax.html#numbers +syn match mesonNumber "\<\d\+\>" + +" booleans +syn keyword mesonConstant false true + +" Built-in functions +syn keyword mesonBuiltin + \ add_global_arguments + \ add_global_link_arguments + \ add_languages + \ add_project_arguments + \ add_project_link_arguments + \ add_test_setup + \ alias_target + \ assert + \ benchmark + \ both_libraries + \ build_machine + \ build_target + \ configuration_data + \ configure_file + \ custom_target + \ declare_dependency + \ dependency + \ disabler + \ environment + \ error + \ executable + \ files + \ find_library + \ find_program + \ generator + \ get_option + \ get_variable + \ gettext + \ host_machine + \ import + \ include_directories + \ install_data + \ install_headers + \ install_man + \ install_subdir + \ is_disabler + \ is_variable + \ jar + \ join_paths + \ library + \ meson + \ message + \ option + \ project + \ run_command + \ run_target + \ set_variable + \ shared_library + \ shared_module + \ static_library + \ subdir + \ subdir_done + \ subproject + \ target_machine + \ test + \ vcs_tag + \ warning + +if exists("meson_space_error_highlight") + " trailing whitespace + syn match mesonSpaceError display excludenl "\s\+$" + " mixed tabs and spaces + syn match mesonSpaceError display " \+\t" + syn match mesonSpaceError display "\t\+ " +endif + +if version >= 508 || !exists("did_meson_syn_inits") + if version <= 508 + let did_meson_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default highlight links. Can be overridden later. + HiLink mesonStatement Statement + HiLink mesonConditional Conditional + HiLink mesonRepeat Repeat + HiLink mesonOperator Operator + HiLink mesonComment Comment + HiLink mesonTodo Todo + HiLink mesonString String + HiLink mesonEscape Special + HiLink mesonNumber Number + HiLink mesonBuiltin Function + HiLink mesonConstant Number + if exists("meson_space_error_highlight") + HiLink mesonSpaceError Error + endif + + delcommand HiLink +endif + +let b:current_syntax = "meson" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim:set sw=2 sts=2 ts=8 noet: |