1
0
Fork 0
mirror of synced 2024-11-23 17:25:35 -05:00
ultimate-vim/sources_non_forked/vim-snippets/snippets/gleam.snippets

79 lines
1.1 KiB
Text
Raw Normal View History

2022-08-08 09:45:34 -04:00
snippet fn "fn"
2024-10-06 04:25:50 -04:00
fn ${1:function_name}(${2}) -> ${3:Nil} {
${0:${VISUAL:todo}}
}
2022-08-08 09:45:34 -04:00
snippet pfn "pub fn"
2024-10-06 04:25:50 -04:00
pub fn ${1:function_name}(${2}) -> ${3:Nil} {
${0:${VISUAL:todo}}
}
2022-08-08 09:45:34 -04:00
snippet test "test fn"
2024-10-06 04:25:50 -04:00
pub fn ${1:name}_test() {
${0}
}
2022-08-08 09:45:34 -04:00
snippet af "anonymous fn"
2024-10-06 04:25:50 -04:00
fn(${1}) { ${0:${VISUAL}} }
2022-08-08 09:45:34 -04:00
snippet let "let binding"
2024-10-06 04:25:50 -04:00
let ${1} = ${0}
2022-08-08 09:45:34 -04:00
snippet l "let binding"
2024-10-06 04:25:50 -04:00
let ${1} = ${0}
2022-08-08 09:45:34 -04:00
snippet as "assert binding"
2024-10-06 04:25:50 -04:00
let assert ${1} = ${0}
2022-08-08 09:45:34 -04:00
snippet - "->"
2024-10-06 04:25:50 -04:00
-> ${0}
2022-08-08 09:45:34 -04:00
snippet case "case expression"
2024-10-06 04:25:50 -04:00
case ${1} {
${2} -> ${0}
}
2022-08-08 09:45:34 -04:00
snippet ty "type"
2024-10-06 04:25:50 -04:00
type ${1:Name} {
${0:$1}
}
2022-08-08 09:45:34 -04:00
snippet pty "pub type"
2024-10-06 04:25:50 -04:00
pub type ${1:Name} {
${0:$1}
}
2022-08-08 09:45:34 -04:00
snippet tya "type alias"
2024-10-06 04:25:50 -04:00
type ${1:Name} =
${0:$1}
2022-08-08 09:45:34 -04:00
snippet ptya "pub type alias"
2024-10-06 04:25:50 -04:00
pub type ${1:Name} =
${0:$1}
2022-08-08 09:45:34 -04:00
snippet im "import"
2024-10-06 04:25:50 -04:00
import ${0:gleam/result}
2022-08-08 09:45:34 -04:00
snippet im. "import exposing"
2024-10-06 04:25:50 -04:00
import ${1:gleam/result}.{${0}}
2022-08-08 09:45:34 -04:00
snippet p "|>"
2024-10-06 04:25:50 -04:00
|> ${0}
2022-08-08 09:45:34 -04:00
snippet bl "block"
2024-10-06 04:25:50 -04:00
{
${0:${VISUAL}}
}
2022-08-08 09:45:34 -04:00
snippet tf "fn(Type) -> Type"
2024-10-06 04:25:50 -04:00
fn(${1}) -> ${0}
2022-08-08 09:45:34 -04:00
snippet seq "should.equal"
2024-10-06 04:25:50 -04:00
should.equal(${0:${VISUAL}})
2022-08-08 09:45:34 -04:00
snippet strue "should.be_true"
2024-10-06 04:25:50 -04:00
should.be_true(${0:${VISUAL}})
2022-08-08 09:45:34 -04:00
snippet sfalse "should.be_false"
2024-10-06 04:25:50 -04:00
should.be_false(${0:${VISUAL}})