Skip to content

Commit 8407484

Browse files
committed
Fix highlighting of rescue_from in class context
The name rubyExceptionHandler has since been added to syntax/ruby.vim proper, with different semantics.
1 parent 5bb6044 commit 8407484

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

after/syntax/ruby/rails.vim

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
hi def link rubyEntity rubyMacro
22
hi def link rubyEntities rubyMacro
3-
hi def link rubyExceptionHandler rubyMacro
3+
hi def link rubyExceptionMacro rubyMacro
44
hi def link rubyValidation rubyMacro
55
hi def link rubyCallback rubyMacro
66
hi def link rubyRakeMacro rubyMacro
@@ -46,7 +46,7 @@ endif
4646

4747
if s:path =~# '/app/jobs/.*\.rb$'
4848
syn keyword rubyMacro queue_as
49-
syn keyword rubyExceptionHandler rescue_from retry_on discard_on
49+
syn keyword rubyExceptionMacro rescue_from retry_on discard_on
5050
syn keyword rubyCallback before_enqueue around_enqueue after_enqueue before_perform around_perform after_perform
5151
endif
5252

@@ -89,11 +89,12 @@ if s:path =~# '/app/controllers/.*\.rb$'
8989
syn keyword rubyResponse render head redirect_to redirect_back respond_with send_data send_file
9090
endif
9191

92+
let b:rails_path = s:path
9293
if s:path =~# '/app/controllers/.*\.rb$\|/app/mailers/.*\.rb$\|/app/models/.*_mailer\.rb$'
9394
syn keyword rubyHelper render_to_string
9495
syn keyword rubyCallback before_action append_before_action prepend_before_action after_action append_after_action prepend_after_action around_action append_around_action prepend_around_action skip_before_action skip_after_action skip_action
9596
syn keyword rubyMacro helper helper_attr helper_method layout
96-
syn keyword rubyExceptionHandler rescue_from
97+
syn keyword rubyExceptionMacro rescue_from
9798
endif
9899

99100
if s:path =~# '/app/mailers/.*\.rb$\|/app/models/.*_mailer\.rb$'

0 commit comments

Comments
 (0)