Some useful snippets for Gleam.
All snippets here in prefix(-es) - title - description
format.
helloworld
- Hello, world - BasicHello world
programimport
orimportas
- import .. as .. - Import with aliasimport
orimportfrom
- import from - Add unqualified importimport
orimporttypefrom
- import type from - Add unqualified import of typepub type
- public type alias - Alias for type (public)type
- type alias - Alias for type (private)debug
- debug - Print value to terminal usingio.debug
func
orfunction
orfn
- function - Functionfunc
orfunctionreturn
orfn
- function with return type - Function with return typefunc
orfunction
orfn
orpub fn
- public function - Public functionfunc
orfunctionreturn
orfn
orpub fn
- public function with return type - Public function withh return typefn
oranfn
- anonymous function - Anonymous functiongeneric
orfn
orfunc
orfunction
- Function with generic argumentlabeled
orfn
orfunc
orfunction
- labeled function parameters - Function with labeled parameterslabeled
orfn
orfunc
orfunction
- labeled function parameters with return type - Function with labeled parameters with return typedepr
ordeprecated
or@
- deprecated - Mark definition as deprecatedcase
- case - Simple case constructiontuple
or#(
- tuple - Tuple value constructionexternal
or@
- external - External mark for functionspanic
- panic with reason - Call panic with reasontodo
- todo with reason - TODO mark with reasontype
orpub type
- custom type - Custom type declarationtype
orpub type
- custom type with record - Custom type declaration with recordtype
orpub type
- custom type with generic - Custom type declaration with generic argument
Users appreciate release notes as you update your extension.
Initial release of extension