diff --git a/snippets/rjsx-mode/Redux/rxaction b/snippets/rjsx-mode/Redux/rxaction index a1994bb..4a0eef3 100644 --- a/snippets/rjsx-mode/Redux/rxaction +++ b/snippets/rjsx-mode/Redux/rxaction @@ -6,6 +6,6 @@ # -- export const ${1:actionName} = (payload) => ({ - type: ${3:type}, + type: ${1:$((upcase (s-snake-case yas-text)))}, payload }) \ No newline at end of file diff --git a/snippets/rjsx-mode/yas-setup.el b/snippets/rjsx-mode/yas-setup.el index db0fd3a..c685e1c 100644 --- a/snippets/rjsx-mode/yas-setup.el +++ b/snippets/rjsx-mode/yas-setup.el @@ -5,6 +5,7 @@ ;;; Code: (require 'yasnippet) +(require 's) (defun yas-jsx-get-class-name-by-file-name () "Return name of class-like construct by `file-name'." diff --git a/yasnippet-snippets.el b/yasnippet-snippets.el index 1a14367..bc6bd7b 100644 --- a/yasnippet-snippets.el +++ b/yasnippet-snippets.el @@ -5,7 +5,7 @@ ;; Author: Andrea Crotti ;; Keywords: snippets ;; Version: 0.2 -;; Package-Requires: ((yasnippet "0.8.0")) +;; Package-Requires: ((yasnippet "0.8.0") (s "1.12.0")) ;; Keywords: convenience, snippets ;;; Commentary: