forked from FG42/FG42
local snippets added
This commit is contained in:
parent
7e92a7078e
commit
dbdc7715b0
|
@ -43,6 +43,8 @@
|
||||||
|
|
||||||
(ability yas ()
|
(ability yas ()
|
||||||
"Snippet configuration."
|
"Snippet configuration."
|
||||||
|
(let ((snippet_home (concat fg42-home "/lib/snippets")))
|
||||||
|
(setq yas-snippet-dirs (list snippet_home)))
|
||||||
(yas-global-mode 1))
|
(yas-global-mode 1))
|
||||||
|
|
||||||
(ability project-management ()
|
(ability project-management ()
|
||||||
|
|
|
@ -7,10 +7,12 @@ Home page:
|
||||||
\thttp://fg42.lxsameer.com
|
\thttp://fg42.lxsameer.com
|
||||||
|
|
||||||
Credits:
|
Credits:
|
||||||
\tSameer Rahmani (lxsameer)
|
\tSameer Rahmani (@lxsameer)
|
||||||
|
\tDanial Parsi (@intuxticated)
|
||||||
|
\tAmir Houghangi
|
||||||
\tNima Nazari (niman)
|
\tNima Nazari (niman)
|
||||||
\tDanial Parsi (intuxticated)
|
|
||||||
\tKeyvan Hedayati (k1-hedayati)
|
\tKeyvan Hedayati (k1-hedayati)
|
||||||
|
\tBehnam Khan Beigi (@yottanami)
|
||||||
"
|
"
|
||||||
"About FG42")
|
"About FG42")
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,9 @@
|
||||||
(require 'fpkg)
|
(require 'fpkg)
|
||||||
(require 'fg42/base)
|
(require 'fg42/base)
|
||||||
|
|
||||||
|
(defvar fg42-home (getenv "FG42_HOME")
|
||||||
|
"The pass to fg42-home")
|
||||||
|
|
||||||
(defun fg42-initialize ()
|
(defun fg42-initialize ()
|
||||||
"Initialize FG42 editor."
|
"Initialize FG42 editor."
|
||||||
(fpkg-initialize)
|
(fpkg-initialize)
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
# name: belongs_to
|
||||||
|
# key: bt
|
||||||
|
# expand-env: ((yas-indent-line 'fixed) (yas-wrap-around-region 'nil)
|
||||||
|
# condition: (featurep 'flymake-json)
|
||||||
|
# contributor: Sameer Rahmani <lxsameer@gnu.org>
|
||||||
|
# --
|
||||||
|
{
|
||||||
|
"name": "$1",
|
||||||
|
"type": "belongs_to",
|
||||||
|
"bulk": ${2:$$(yas-choose-value '("true" "false"))},
|
||||||
|
"to": "${1:$(pluralize-string yas-text)}"
|
||||||
|
},
|
||||||
|
$0
|
|
@ -0,0 +1,12 @@
|
||||||
|
# name: field
|
||||||
|
# key: ff
|
||||||
|
# expand-env: ((yas-indent-line 'fixed) (yas-wrap-around-region 'nil)
|
||||||
|
# condition: (featurep 'flymake-json)
|
||||||
|
# contributor: Sameer Rahmani <lxsameer@gnu.org>
|
||||||
|
# --
|
||||||
|
{
|
||||||
|
"name": "$1",
|
||||||
|
"type": "${2:$$(yas-choose-value '("string" "integer" "datetime" "float" "image" "in" "belongs_to" "has_many"))}",
|
||||||
|
"bulk": ${3:$$(yas-choose-value '("true" "false"))}
|
||||||
|
},
|
||||||
|
$0
|
|
@ -0,0 +1,13 @@
|
||||||
|
# name: has_many
|
||||||
|
# key: hm
|
||||||
|
# expand-env: ((yas-indent-line 'fixed) (yas-wrap-around-region 'nil)
|
||||||
|
# condition: (featurep 'flymake-json)
|
||||||
|
# contributor: Sameer Rahmani <lxsameer@gnu.org>
|
||||||
|
# --
|
||||||
|
{
|
||||||
|
"name": "$1",
|
||||||
|
"type": "has_many",
|
||||||
|
"bulk": ${2:$$(yas-choose-value '("true" "false"))},
|
||||||
|
"to": "${1:$(pluralize-string yas-text)}"
|
||||||
|
},
|
||||||
|
$0
|
|
@ -0,0 +1,14 @@
|
||||||
|
# name: in
|
||||||
|
# key: in
|
||||||
|
# expand-env: ((yas-indent-line 'fixed) (yas-wrap-around-region 'nil)
|
||||||
|
# condition: (featurep 'flymake-json)
|
||||||
|
# contributor: Sameer Rahmani <lxsameer@gnu.org>
|
||||||
|
# --
|
||||||
|
{
|
||||||
|
"name": "$1",
|
||||||
|
"type": "in",
|
||||||
|
"bulk": ${2:$$(yas-choose-value '("true" "false"))},
|
||||||
|
"to": [
|
||||||
|
$0
|
||||||
|
]
|
||||||
|
},
|
|
@ -0,0 +1,14 @@
|
||||||
|
# name: resource
|
||||||
|
# key: resource
|
||||||
|
# expand-env: ((yas-indent-line 'fixed) (yas-wrap-around-region 'nil)
|
||||||
|
# condition: (featurep 'flymake-json)
|
||||||
|
# contributor: Sameer Rahmani <lxsameer@gnu.org>
|
||||||
|
# --
|
||||||
|
{
|
||||||
|
"name": "$1",
|
||||||
|
"fields": [
|
||||||
|
$0
|
||||||
|
],
|
||||||
|
"no_filter": ${2:$$(yas-choose-value '("true" "false"))},
|
||||||
|
"title-field": "$3"
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
html-mode
|
Loading…
Reference in New Issue