Skip to content

Commit a7f4225

Browse files
Sgiathjbodah
authored andcommitted
Add raise as keyword
Closes #519 Signed-off-by: Sgiath <[email protected]>
1 parent 7b23001 commit a7f4225

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

spec/syntax/keyword_spec.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,16 @@
1414
case true do
1515
EOF
1616
end
17+
18+
it 'raise used as keyword with string' do
19+
expect(<<~EOF).to include_elixir_syntax('elixirKeyword', 'raise')
20+
raise "oops"
21+
EOF
22+
end
23+
24+
it 'raise used as keyword with module' do
25+
expect(<<~EOF).to include_elixir_syntax('elixirKeyword', 'raise')
26+
raise ArgumentError, message: "invalid argument foo"
27+
EOF
28+
end
1729
end

syntax/elixir.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ syn keyword elixirTodo FIXME NOTE TODO OPTIMIZE XXX HACK contained
1818

1919
syn match elixirId '\<[_a-zA-Z]\w*[!?]\?\>' contains=elixirUnusedVariable
2020

21-
syn match elixirKeyword '\(\.\)\@<!\<\(for\|case\|when\|with\|cond\|if\|unless\|try\|receive\|after\|rescue\|catch\|else\|quote\|unquote\|super\|unquote_splicing\)\>:\@!'
21+
syn match elixirKeyword '\(\.\)\@<!\<\(for\|case\|when\|with\|cond\|if\|unless\|try\|receive\|after\|raise\|rescue\|catch\|else\|quote\|unquote\|super\|unquote_splicing\)\>:\@!'
2222

2323
syn keyword elixirInclude import require alias use
2424

0 commit comments

Comments
 (0)