1
0
mirror of https://github.com/amix/vimrc synced 2025-06-17 19:35:00 +08:00

Updated plugins

This commit is contained in:
Amir
2020-12-04 22:15:32 +01:00
parent e83f5ea2e7
commit a06964dd3b
261 changed files with 6955 additions and 2773 deletions

View File

@ -1,10 +1,6 @@
require 'spec_helper'
describe "Indenting" do
after :each do
vim.command 'let g:ruby_indent_block_style = "expression"'
end
specify "indented blocks with expression style" do
vim.command 'let g:ruby_indent_block_style = "expression"'
@ -103,6 +99,7 @@ describe "Indenting" do
end
specify "blocks with multiline parameters" do
vim.command 'let g:ruby_indent_block_style = "expression"'
assert_correct_indenting <<~EOF
def foo
opts.on('--coordinator host=HOST[,port=PORT]',

View File

@ -57,6 +57,7 @@ describe "Indenting" do
end
specify "continuations after round braces" do
vim.command 'let g:ruby_indent_block_style = "expression"'
assert_correct_indenting <<~EOF
opts.on('--coordinator host=HOST[,port=PORT]',
'Specify the HOST and the PORT of the coordinator') do |str|
@ -67,10 +68,6 @@ describe "Indenting" do
end
describe "assignments" do
after :each do
vim.command 'let g:ruby_indent_assignment_style = "hanging"'
end
specify "continuations after assignment" do
assert_correct_indenting <<~EOF
variable =

View File

@ -0,0 +1,78 @@
require 'spec_helper'
describe 'Indenting' do
specify 'method args' do
assert_correct_indenting <<~EOF
render('product/show',
product: product,
on_sale: true,
)
EOF
vim.command 'let g:ruby_indent_hanging_elements = 0'
assert_correct_indenting <<~EOF
render('product/show',
product: product,
on_sale: true,
)
EOF
end
specify 'method args with block' do
assert_correct_indenting <<~EOF
opts.on('--coordinator host=HOST[,port=PORT]',
'Specify the HOST and the PORT of the coordinator') do |str|
h = sub_opts_to_hash(str)
puts h
end
EOF
vim.command 'let g:ruby_indent_hanging_elements = 0'
assert_correct_indenting <<~EOF
opts.on('--coordinator host=HOST[,port=PORT]',
'Specify the HOST and the PORT of the coordinator') do |str|
h = sub_opts_to_hash(str)
puts h
end
EOF
end
specify 'arrays' do
assert_correct_indenting <<~EOF
x = [1,
2,
3,
]
EOF
vim.command 'let g:ruby_indent_hanging_elements = 0'
assert_correct_indenting <<~EOF
x = [1,
2,
3,
]
EOF
end
specify 'hashes' do
assert_correct_indenting <<~EOF
x = { a: 1,
b: 2,
c: 3,
}
EOF
vim.command 'let g:ruby_indent_hanging_elements = 0'
assert_correct_indenting <<~EOF
x = { a: 1,
b: 2,
c: 3,
}
EOF
end
end

View File

@ -1,10 +1,6 @@
require 'spec_helper'
describe "Indenting" do
after :each do
vim.command 'let g:ruby_indent_access_modifier_style = "normal"'
end
specify "default indented access modifiers" do
assert_correct_indenting <<~EOF
class OuterClass

View File

@ -20,6 +20,7 @@ describe "Indenting" do
}
EOF
vim.command 'let g:ruby_indent_block_style = "expression"'
assert_correct_indenting <<~EOF
var.
func1(:param => 'value') {
@ -40,6 +41,7 @@ describe "Indenting" do
}
EOF
vim.command 'let g:ruby_indent_block_style = "expression"'
assert_correct_indenting <<~EOF
foo,
bar = {
@ -53,6 +55,7 @@ describe "Indenting" do
end
specify "nested blocks with a continuation and function call inbetween" do
vim.command 'let g:ruby_indent_block_style = "expression"'
assert_correct_indenting <<~EOF
var.
func1(:param => 'value') {

View File

@ -20,6 +20,7 @@ describe "Indenting" do
end
specify "splats with blocks in assignment" do
vim.command 'let g:ruby_indent_block_style = "expression"'
assert_correct_indenting <<~EOF
x = *
array.map do