summaryrefslogtreecommitdiffstats
path: root/syntax/qml.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2017-11-19 21:26:59 +0100
committerAdam Stankiewicz <sheerun@sher.pl>2017-11-19 21:27:05 +0100
commitd219055bc845253eff2b27d30a23b11b97b7ee9d (patch)
treea4586dfdbce3a304759a0c34175ee41fdede4e17 /syntax/qml.vim
parent0e9041f29a3288b6685aafc63d914c11fef539ba (diff)
downloadvim-polyglot-d219055bc845253eff2b27d30a23b11b97b7ee9d.tar.gz
vim-polyglot-d219055bc845253eff2b27d30a23b11b97b7ee9d.zip
Update
Diffstat (limited to 'syntax/qml.vim')
-rw-r--r--syntax/qml.vim22
1 files changed, 12 insertions, 10 deletions
diff --git a/syntax/qml.vim b/syntax/qml.vim
index f90791f3..2fef61ee 100644
--- a/syntax/qml.vim
+++ b/syntax/qml.vim
@@ -2,11 +2,14 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'qml') == -1
" Vim syntax file
" Language: QML
-" Maintainer: Warwick Allison <warwick.allison@nokia.com>
-" Updaters:
-" URL:
-" Changes:
-" Last Change: 2009 Apr 30
+" Maintainer: Peter Hoeg <peter@hoeg.com>
+" Updaters: Refer to CONTRIBUTORS.md
+" URL: https://github.com/peterhoeg/vim-qml
+" Changes: `git log` is your friend
+" Last Change: 2017-11-11
+"
+" This file is bassed on the original work done by Warwick Allison
+" <warwick.allison@nokia.com> whose did about 99% of the work here.
" Based on javascript syntax (as is QML)
@@ -26,20 +29,20 @@ endif
syn case ignore
-
+syn cluster qmlExpr contains=qmlStringD,qmlString,SqmlCharacter,qmlNumber,qmlObjectLiteralType,qmlBoolean,qmlType,qmlJsType,qmlNull,qmlGlobal,qmlFunction
syn keyword qmlCommentTodo TODO FIXME XXX TBD contained
syn match qmlLineComment "\/\/.*" contains=@Spell,qmlCommentTodo
syn match qmlCommentSkip "^[ \t]*\*\($\|[ \t]\+\)"
syn region qmlComment start="/\*" end="\*/" contains=@Spell,qmlCommentTodo fold
syn match qmlSpecial "\\\d\d\d\|\\."
-syn region qmlStringD start=+"+ skip=+\\\\\|\\"\|\\$+ end=+"\|$+ contains=qmlSpecial,@htmlPreproc
-syn region qmlStringS start=+'+ skip=+\\\\\|\\'\|\\$+ end=+'\|$+ contains=qmlSpecial,@htmlPreproc
+syn region qmlStringD start=+"+ skip=+\\\\\|\\"\|\\$+ end=+"\|$+ contains=qmlSpecial,@htmlPreproc,@Spell
+syn region qmlStringS start=+'+ skip=+\\\\\|\\'\|\\$+ end=+'\|$+ contains=qmlSpecial,@htmlPreproc,@Spell
syn match qmlCharacter "'\\.'"
syn match qmlNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>"
syn region qmlRegexpString start=+/[^/*]+me=e-1 skip=+\\\\\|\\/+ end=+/[gi]\{0,2\}\s*$+ end=+/[gi]\{0,2\}\s*[;.,)\]}]+me=e-1 contains=@htmlPreproc oneline
syn match qmlObjectLiteralType "[A-Za-z][_A-Za-z0-9]*\s*\({\)\@="
-syn match qmlNonBindingColon "?[^;]*:"
+syn region qmlTernaryColon start="?" end=":" contains=@qmlExpr,qmlBraces,qmlParens
syn match qmlBindingProperty "\<[A-Za-z][_A-Za-z.0-9]*\s*:"
syn keyword qmlConditional if else switch
@@ -122,7 +125,6 @@ if version >= 508 || !exists("did_qml_syn_inits")
HiLink qmlReserved Keyword
HiLink qmlDebug Debug
HiLink qmlConstant Label
- HiLink qmlNonBindingColon NONE
HiLink qmlBindingProperty Label
HiLink qmlDeclaration Function