aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorla-ninpre <leobrekalini@gmail.com>2020-12-14 02:24:14 +0300
committerla-ninpre <leobrekalini@gmail.com>2020-12-14 02:24:14 +0300
commit8351c67c928aec41b3d460dd33eeca7524c4012c (patch)
tree889690419a2b7c3cb8e4625b11036154e1ef49a5
parent4b8406a1f3e58890e84b93cc8eafef7a016dce1c (diff)
downloaddotfiles-8351c67c928aec41b3d460dd33eeca7524c4012c.tar.gz
dotfiles-8351c67c928aec41b3d460dd33eeca7524c4012c.zip
vim: pikchr highlighter small fixes
-rw-r--r--.config/nvim/syntax/pikchr.vim16
1 files changed, 10 insertions, 6 deletions
diff --git a/.config/nvim/syntax/pikchr.vim b/.config/nvim/syntax/pikchr.vim
index 4e1ffae..52d4d59 100644
--- a/.config/nvim/syntax/pikchr.vim
+++ b/.config/nvim/syntax/pikchr.vim
@@ -15,7 +15,7 @@ syntax keyword PikchrStatement print assert
syntax keyword PikchrExprFunc abs cos dist int max min sin sqrt
syntax keyword PikchrObject arc arrow box circle cylinder dot ellipse file line
syntax keyword PikchrObject move oval spline text
-syntax keyword PikchrDirection right down left up
+syntax keyword PikchrDirection right down left up nextgroup=PikchrNumber
syntax keyword PikchrDirection n north ne e east se s south sw w west nw
syntax keyword PikchrPlace of in vertex
syntax keyword PikchrAttribute dashed dotted color fill behind cw ccw
@@ -23,6 +23,9 @@ syntax keyword PikchrAttribute thick thin solid chop fit
syntax keyword PikchrTextAttr above aligned below big small bold italic
syntax keyword PikchrTextAttr center ljust rjust
syntax keyword PikchrLocAttr at with
+syntax keyword PikchrEdgename n north ne nw e east s south se sw w west
+syntax keyword PikchrEdgename t top bot bottom c center start end left right
+syntax keyword PikchrEdgename nextgroup=PikchrPlace
syntax keyword PikchrNumPropty diameter ht height rad radius thickness width wid
syntax keyword PikchrNthObj last previous
syntax keyword PikchrOperator + - * /
@@ -46,12 +49,12 @@ syntax match PikchrOrdinal "\v([^0]\d+(st|nd|rd|th))|first"
syntax match PikchrAttributeSup "\v<same(\sas)?>"
syntax match PikchrAttributeSup "\v<invis(ible)?>"
syntax match PikchrAttributeSup "\v\<-\>?|-\>"
-syntax match PikchrPosition "(((of\sthe\s)\?\sway\s)\?between)|and"
-syntax match PikchrDotEdgename "\v\.((n(orth)?)|(e(ast)?)|(s(outh)?)|(w(est)?)|se|se|nw|ne)"
+syntax match PikchrPosition "\v(((of\sthe\s)?\sway\s)?between)|and"
+syntax match PikchrDotEdgename "\v\.(n(e|w)?(orth)?|e(ast)?|s(e|w)?(outh)?|w(est)?)"
syntax match PikchrDotEdgename "\v\.(bot(tom)?|t(op)?|right|left|start|end|c(enter)?)"
-syntax match PikchrDotPropty "\v\.(color|dashed|diameter|dotted|fill|ht|height|rad(ius)?|thickness|wid(th)?)"
-syntax match PikchrPathElem "\v<(from|then|go|to|(until\s)?even\swith|heading|close)>"
-
+syntax match PikchrDotPropty "\v\.(color|dashed|diameter|dotted|fill)"
+syntax match PikchrDotPropty "\v\.(ht|height|rad(ius)?|thickness|wid(th)?)"
+syntax match PikchrPathElem "\v<(from|then|go|to|(until\s)?even\swith|heading|close)>" nextgroup=PikchrDirection
""" highlight block
@@ -64,6 +67,7 @@ hi def link PikchrLocAttr Tag
hi def link PikchrPlace Function
hi def link PikchrTextAttr Identifier
hi def link PikchrNumPropty Identifier
+hi def link PikchrEdgename Identifier
hi def link PikchrNthObj Constant
hi def link PikchrOperator Operator