mirror of
https://github.com/amix/vimrc
synced 2025-06-17 10:55:00 +08:00
Updated plugins
This commit is contained in:
@ -33,6 +33,9 @@ au BufNewFile,BufRead Podfile,*.podspec call s:setf('ruby')
|
||||
" Guard
|
||||
au BufNewFile,BufRead Guardfile,.Guardfile call s:setf('ruby')
|
||||
|
||||
" Jb
|
||||
au BufNewFile,BufRead *.jb call s:setf('ruby')
|
||||
|
||||
" Jbuilder
|
||||
au BufNewFile,BufRead *.jbuilder call s:setf('ruby')
|
||||
|
||||
|
@ -283,7 +283,7 @@ function! GetRubyIndent(...) abort
|
||||
\ ]
|
||||
|
||||
" Most Significant line based on the previous one -- in case it's a
|
||||
" contination of something above
|
||||
" continuation of something above
|
||||
let indent_info.plnum_msl = s:GetMSL(indent_info.plnum)
|
||||
|
||||
for callback_name in indent_callback_names
|
||||
|
@ -40,6 +40,12 @@ describe "Syntax highlighting" do
|
||||
EOF
|
||||
end
|
||||
|
||||
specify "magic comments - shareable_constant_value" do
|
||||
assert_correct_highlighting <<~'EOF', 'shareable_constant_value', 'rubyMagicComment'
|
||||
# shareable_constant_value: literal
|
||||
EOF
|
||||
end
|
||||
|
||||
specify "TODO comments" do
|
||||
assert_correct_highlighting <<~'EOF', 'TODO', 'rubyTodo'
|
||||
# TODO: turn off the oven
|
||||
|
@ -429,9 +429,10 @@ endif
|
||||
" Comments and Documentation {{{1
|
||||
syn match rubySharpBang "\%^#!.*" display
|
||||
syn keyword rubyTodo FIXME NOTE TODO OPTIMIZE HACK REVIEW XXX todo contained
|
||||
syn match rubyEncoding "[[:alnum:]-]\+" contained display
|
||||
syn match rubyEncoding "[[:alnum:]-_]\+" contained display
|
||||
syn match rubyMagicComment "\c\%<3l#\s*\zs\%(coding\|encoding\):" contained nextgroup=rubyEncoding skipwhite
|
||||
syn match rubyMagicComment "\c\%<10l#\s*\zs\%(frozen_string_literal\|warn_indent\|warn_past_scope\):" contained nextgroup=rubyBoolean skipwhite
|
||||
syn match rubyMagicComment "\c\%<10l#\s*\zs\%(shareable_constant_value\):" contained nextgroup=rubyEncoding skipwhite
|
||||
syn match rubyComment "#.*" contains=@rubyCommentSpecial,rubySpaceError,@Spell
|
||||
|
||||
syn cluster rubyCommentSpecial contains=rubySharpBang,rubyTodo,rubyMagicComment
|
||||
|
Reference in New Issue
Block a user