Skip to content

Commit 4a620cf

Browse files
committed
Merge pull request elixir-editors#24 from iurifq/include-require-highlight
Add require and import to elixirInclude and highlight them
2 parents 862dc31 + 284202c commit 4a620cf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

syntax/elixir.vim

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ syn match elixirKeyword '\<\%(case\|cond\|bc\|lc\|inlist\|inbits\|if\|unless\|tr
1919
syn match elixirKeyword '\<\%(defmodule\|defprotocol\|defimpl\|defrecordp\?\|defmacrop\?\|defdelegate\|defoverridable\|defexception\|defcallback\|defp\?\)\>[?!]\@!'
2020
syn match elixirKeyword '\<\%(exit\|raise\|throw\|after\|rescue\|catch\|else\)\>[?!]\@!'
2121
syn match elixirKeyword '\<\%(->\)\>\s*'
22-
syn match elixirKeyword '\<\%(import\|require\|use\|recur\|quote\|unquote\|super\|alias\)\>[?!]\@!'
22+
syn match elixirKeyword '\<\%(use\|recur\|quote\|unquote\|super\|alias\)\>[?!]\@!'
23+
24+
syn keyword elixirInclude import require
2325

2426
syn match elixirOperator '\<\%(and\|not\|or\|when\|xor\|in\)\>'
2527
syn match elixirOperator '%=\|\*=\|\*\*=\|+=\|-=\|\^=\|||='
@@ -66,6 +68,7 @@ syn match elixirString "\(\w\)\@<!?\%(\\\(x\d{1,2}\|\h{1,2}\h\@!\>\|
6668
syn region elixirBlock matchgroup=elixirKeyword start="\<do\>\(:\)\@!" end="\<end\>" contains=ALLBUT,@elixirNotTop fold
6769
syn region elixirAnonymousFunction matchgroup=elixirKeyword start="\<fn\>" end="\<end\>" contains=ALLBUT,@elixirNotTop fold
6870

71+
hi def link elixirInclude Include
6972
hi def link elixirComment Comment
7073
hi def link elixirTodo Todo
7174
hi def link elixirKeyword Keyword

0 commit comments

Comments
 (0)