1
0
Fork 0
mirror of synced 2024-12-27 09:03:21 -05:00
ultimate-vim/sources_non_forked/vim-snippets/snippets/gleam.snippets
2024-09-19 00:58:15 -04:00

78 lines
1.1 KiB
Text

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