spacevim/bundle/rust.vim/test/indent.vader
JIe 2bb7059579
Some checks failed
Detach Plugins / check (FlyGrep.vim) (push) Has been cancelled
Detach Plugins / check (GitHub.vim) (push) Has been cancelled
Detach Plugins / check (JavaUnit.vim) (push) Has been cancelled
Detach Plugins / check (SourceCounter.vim) (push) Has been cancelled
Detach Plugins / check (cpicker.nvim) (push) Has been cancelled
Detach Plugins / check (dein-ui.vim) (push) Has been cancelled
Detach Plugins / check (git.vim) (push) Has been cancelled
Detach Plugins / check (iedit.vim) (push) Has been cancelled
Detach Plugins / check (scrollbar.vim) (push) Has been cancelled
Detach Plugins / check (vim-chat) (push) Has been cancelled
Detach Plugins / check (vim-cheat) (push) Has been cancelled
Detach Plugins / check (vim-todo) (push) Has been cancelled
Detach Plugins / check (xmake.vim) (push) Has been cancelled
test / Linux (nvim, nightly) (push) Has been cancelled
test / Linux (nvim, v0.3.8) (push) Has been cancelled
test / Linux (nvim, v0.4.0) (push) Has been cancelled
test / Linux (nvim, v0.4.2) (push) Has been cancelled
test / Linux (nvim, v0.4.3) (push) Has been cancelled
test / Linux (nvim, v0.4.4) (push) Has been cancelled
test / Linux (nvim, v0.5.0) (push) Has been cancelled
test / Linux (nvim, v0.5.1) (push) Has been cancelled
test / Linux (nvim, v0.6.0) (push) Has been cancelled
test / Linux (nvim, v0.6.1) (push) Has been cancelled
test / Linux (nvim, v0.7.0) (push) Has been cancelled
test / Linux (nvim, v0.7.2) (push) Has been cancelled
test / Linux (nvim, v0.8.0) (push) Has been cancelled
test / Linux (nvim, v0.8.1) (push) Has been cancelled
test / Linux (nvim, v0.8.2) (push) Has been cancelled
test / Linux (nvim, v0.8.3) (push) Has been cancelled
test / Linux (nvim, v0.9.0) (push) Has been cancelled
test / Linux (nvim, v0.9.1) (push) Has been cancelled
test / Linux (true, vim, v7.4.052) (push) Has been cancelled
test / Linux (true, vim, v7.4.1689) (push) Has been cancelled
test / Linux (true, vim, v7.4.629) (push) Has been cancelled
test / Linux (true, vim, v8.0.0027) (push) Has been cancelled
test / Linux (true, vim, v8.0.0183) (push) Has been cancelled
test / Linux (vim, nightly) (push) Has been cancelled
test / Linux (vim, v8.0.0184) (push) Has been cancelled
test / Linux (vim, v8.0.1453) (push) Has been cancelled
test / Linux (vim, v8.1.2269) (push) Has been cancelled
test / Linux (vim, v8.2.2434) (push) Has been cancelled
test / Linux (vim, v8.2.3995) (push) Has been cancelled
test / Windows (nvim, nightly) (push) Has been cancelled
test / Windows (nvim, v0.3.8) (push) Has been cancelled
test / Windows (nvim, v0.4.2) (push) Has been cancelled
test / Windows (nvim, v0.4.3) (push) Has been cancelled
test / Windows (nvim, v0.4.4) (push) Has been cancelled
test / Windows (nvim, v0.5.0) (push) Has been cancelled
test / Windows (nvim, v0.5.1) (push) Has been cancelled
test / Windows (nvim, v0.6.0) (push) Has been cancelled
test / Windows (nvim, v0.6.1) (push) Has been cancelled
test / Windows (nvim, v0.7.0) (push) Has been cancelled
test / Windows (nvim, v0.7.2) (push) Has been cancelled
test / Windows (nvim, v0.8.0) (push) Has been cancelled
test / Windows (nvim, v0.8.1) (push) Has been cancelled
test / Windows (nvim, v0.8.2) (push) Has been cancelled
test / Windows (nvim, v0.8.3) (push) Has been cancelled
test / Windows (nvim, v0.9.0) (push) Has been cancelled
test / Windows (nvim, v0.9.1) (push) Has been cancelled
test / Windows (vim, nightly) (push) Has been cancelled
test / Windows (vim, v7.4.1185) (push) Has been cancelled
test / Windows (vim, v7.4.1689) (push) Has been cancelled
test / Windows (vim, v8.0.0027) (push) Has been cancelled
test / Windows (vim, v8.0.1453) (push) Has been cancelled
test / Windows (vim, v8.1.2269) (push) Has been cancelled
test / Windows (vim, v8.2.2434) (push) Has been cancelled
test / Windows (vim, v8.2.3995) (push) Has been cancelled
docker / docker (push) Has been cancelled
mirror / check (coding) (push) Has been cancelled
mirror / check (gitee) (push) Has been cancelled
mirror / check (gitlab) (push) Has been cancelled
init
2024-08-21 14:17:26 +08:00

293 lines
4.6 KiB
Plaintext

Given rust:
fn main() {
let a = 2;
println!("Hello World\n")
}
Do:
vip=
Expect rust (very basic indentation result):
fn main() {
let a = 2;
println!("Hello World\n")
}
############################################
# Issue #195
Given rust:
fn main() {
let paths: Vec<_> = ({
fs::read_dir("test_data")
.unwrap()
.cloned()
})
.collect();
println!("Hello World\n");
}
Do:
/collect\<cr>
ostatement();\<ESC>\<ESC>
Expect rust (issue #195):
fn main() {
let paths: Vec<_> = ({
fs::read_dir("test_data")
.unwrap()
.cloned()
})
.collect();
statement();
println!("Hello World\n");
}
############################################
# Issue #189
Given rust:
impl X for {
pub fn get<Q>(&self, key: &Q) -> Option<Entry<K, V>>
where
K: Borrow<Q>,
Q: Ord + ?Sized,
{
self.inner.get(key).map(Entry::new)
}
}
Do:
vip=
Expect rust (issue #189):
impl X for {
pub fn get<Q>(&self, key: &Q) -> Option<Entry<K, V>>
where
K: Borrow<Q>,
Q: Ord + ?Sized,
{
self.inner.get(key).map(Entry::new)
}
}
############################################
# Issue #189b
Given rust:
impl X for {
pub fn get<Q>(&self, key: &Q) -> Option<Entry<K, V>>
where
K: Borrow<Q>,
Q: Ord + ?Sized
{
self.inner.get(key).map(Entry::new)
}
}
Do:
vip=
Expect rust (issue #189b):
impl X for {
pub fn get<Q>(&self, key: &Q) -> Option<Entry<K, V>>
where
K: Borrow<Q>,
Q: Ord + ?Sized
{
self.inner.get(key).map(Entry::new)
}
}
############################################
# Issue #189c
Given rust:
impl X for {
pub fn get<Q>(&self, key: &Q) -> Option<Entry<K, V>>
where K: Borrow<Q>, Q: Ord + ?Sized
{
self.inner.get(key).map(Entry::new)
}
}
Do:
vip=
Expect rust (issue #189b):
impl X for {
pub fn get<Q>(&self, key: &Q) -> Option<Entry<K, V>>
where K: Borrow<Q>, Q: Ord + ?Sized
{
self.inner.get(key).map(Entry::new)
}
}
############################################
# Issue #149
Given rust:
fn test() {
let t = "a
wah";
}
Do:
/wah\<cr>
i#\<ESC>\<ESC>
/;\<cr>o
statement();\<ESC>\<ESC>
# Disabled
# Expect rust (issue #149):
fn test() {
let t = "a
#wah";
statement();
}
############################################
# Issue #77
Given rust:
fn test() {
}
Do:
of(x, y,\<CR>z);\<CR>
f((x, y),\<CR>z);\<CR>
# Disabled
# Expect rust (issue #77):
fn test() {
f(x, y,
z);
f((x, y),
z);
}
############################################
# Issue #44
Given rust:
fn main() {
a
let philosophers = vec![
Philosopher::new("Judith Butler"),
Philosopher::new("Gilles Deleuze"),
Philosopher::new("Karl Marx"),
Philosopher::new("Emma Goldman"),
Philosopher::new("Michel Foucault"),
];
}
Do:
/let\<CR>
vip=
# Disabled
# Expect rust (issue #44):
fn main() {
a
let philosophers = vec![
Philosopher::new("Judith Butler"),
Philosopher::new("Gilles Deleuze"),
Philosopher::new("Karl Marx"),
Philosopher::new("Emma Goldman"),
Philosopher::new("Michel Foucault"),
];
}
############################################
# Issue #5
Given rust:
fn f() {
if x &&
y {
}
}
Do:
vip=
Expect rust (issue #5):
fn f() {
if x &&
y {
}
}
############################################
# Issue #366
Given rust:
fn f() {
g(|_| {
h();
})
.unwrap();
h();
}
Do:
vip=
Expect rust (issue #366):
fn f() {
g(|_| {
h();
})
.unwrap();
h();
}
Given rust:
fn f() {
let a = g(|_| {
h();
})
.unwrap();
h();
}
Do:
vip=
Expect rust (issue #366, variation #2):
fn f() {
let a = g(|_| {
h();
})
.unwrap();
h();
}
############################################
Given rust:
fn f() {
let mut state = State::new(
backend,
header.clone(),
).expect("Something");
}
Do:
vip=
Expect rust (Trailing comma in call):
fn f() {
let mut state = State::new(
backend,
header.clone(),
).expect("Something");
}