Add hy-mode snippets
This commit is contained in:
parent
48e9f3c182
commit
a509a8c667
|
@ -0,0 +1,8 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name:class
|
||||
# key:class
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
(defclass ${1:ClassName} [${2:BaseClass}]
|
||||
${3: (defn --init-- [${4:arg}]
|
||||
(setv $0))})
|
|
@ -0,0 +1,9 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name:cond
|
||||
# key:cond
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
(cond
|
||||
[${1:condition} ${result:2}]
|
||||
[${3:condition} ${result:4}]
|
||||
${5:[True $6]})
|
|
@ -0,0 +1,7 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: def
|
||||
# key: def
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
(defn ${1:function-name} [${2:arg}]
|
||||
$0)
|
|
@ -0,0 +1,7 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name:defm
|
||||
# key:defm
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
(defmacro ${1:macro-name} [${2:arg}]
|
||||
${3:`($0)})
|
|
@ -0,0 +1,6 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name:do
|
||||
# key:do
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
(do $0)
|
|
@ -0,0 +1,6 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: for
|
||||
# key: for
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
(for [${1:item items}] $0)
|
|
@ -0,0 +1,8 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name:if
|
||||
# key:if
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
(if ${1:condition}
|
||||
${2:result-true}
|
||||
${3:result-false})
|
|
@ -0,0 +1,8 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name:ifn
|
||||
# key:ifn
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
(if-not ${1:condition}
|
||||
${2:result-false}
|
||||
${3:result-true})
|
|
@ -0,0 +1,6 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name:import
|
||||
# key:import
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
(import [${1:module-name} [${2:exposing}]])
|
|
@ -0,0 +1,7 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: let
|
||||
# key: let
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
(let [${1:arg}]
|
||||
$0)
|
|
@ -0,0 +1,7 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name:main
|
||||
# key:main
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
(defmain [&rest ${1:args}]
|
||||
$0)
|
|
@ -0,0 +1,6 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name:req
|
||||
# key:req
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
(req [${1:module-name} [${2:exposing}]])
|
|
@ -0,0 +1,6 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: s
|
||||
# key: s
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
(setv $0)
|
|
@ -0,0 +1,7 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name:unless
|
||||
# key:unless
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
(unless ${1:condition}
|
||||
$0)
|
|
@ -0,0 +1,7 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name:when
|
||||
# key:when
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
(when ${1:condition}
|
||||
$0)
|
Loading…
Reference in New Issue