Skip to content

Commit 4375ab9

Browse files
authored
Add skipnl to match import URI and combinators (#104)
Fixes #103 Everything up to a `;` is part of a directive, including newlines. Add `skipnl` so these newlines don't cause the combinators to highlight as normal code. Also add `dartComment` and `dartLineComment` to the `contains` for `dartCombinators`.
1 parent 80205b1 commit 4375ab9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

syntax/dart.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ syntax match dartUserLabelRef "\k\+" contained
4040
syntax region dartLabelRegion transparent matchgroup=dartLabel start="\<case\>" matchgroup=NONE end=":"
4141
syntax keyword dartLabel default
4242

43-
syntax match dartLibrary "^\(import\|export\)\>" nextgroup=dartUri skipwhite
44-
syntax region dartUri contained start=+r\=\z(["']\)+ end=+\z1+ nextgroup=dartCombinators skipwhite
45-
syntax region dartCombinators contained start="" end=";" contains=dartCombinator
43+
syntax match dartLibrary "^\(import\|export\)\>" nextgroup=dartUri skipwhite skipnl
44+
syntax region dartUri contained start=+r\=\z(["']\)+ end=+\z1+ nextgroup=dartCombinators skipwhite skipnl
45+
syntax region dartCombinators contained start="" end=";" contains=dartCombinator,dartComment,dartLineComment
4646
syntax keyword dartCombinator contained show hide deferred as
4747
syntax match dartLibrary "^\(library\|part of\|part\)\>"
4848

0 commit comments

Comments
 (0)