Variable: combobulate-typescript-envelope-list
combobulate-typescript-envelope-list is a variable defined in
combobulate-js-ts.el.
Value
Large value
((:description "const [...] = useState(...)" :key "r s" :name
"useState" :template
("const" " [" (p State "State") ", " "set"
(f State capitalize) "] = useState(" @
(p null "Value") ")"))
(:description "useEffect(() => ..., [...])" :key "r e" :name
"useEffect" :template
(> "useEffect(() => {" n> > @ n > "}, [" @ "])"))
(:description "useCallback(..., [...])" :key "r c" :nodes
("function_declaration" "arrow_function"
"generator_function_declaration")
:mark-node t :name "useCallback" :template
(> "useCallback(" n> > r> n > ", [" @ "])"))
(:description "useMemo(..., [...])" :key "r M" :nodes
("function_declaration" "arrow_function"
"generator_function_declaration" "jsx_element"
"jsx_self_closing_element")
:mark-node t :name "useMemo" :template
("useMemo(() => " > r> ", [" @ "])"))
(:description "const ... = useCallback(..., [...])" :key "r C" :nodes
("function_declaration" "arrow_function"
"generator_function_declaration")
:mark-node t :name "useCallback-const" :template
(> "const " (p cachedFn "Cached Name")
" = useCallback(() => {" n> > r> n > "}, [" @ "])"))
(:description "<...> ... </...>" :name "tag" :mark-node t :nodes
("jsx_element" "jsx_expression"
"jsx_self_closing_element" "jsx_fragment" "jsx_text")
:key "t" :template
("<" (p tag "Tag Name: ") ">" n> @ r> n "</"
(field tag) ">" >))
(:description "<> ... </>" :name "fragment" :mark-node t :nodes
("jsx_element" "jsx_self_closing_element"
"jsx_fragment")
:key "f" :template ("<>" n> r> n> "</>"))
(:description "if ( ... ) { ... }" :key "i" :shorthand
general-statement :name "if-statement" :mark-node t
:template ("if " "(" @ ")" " " "{" n> r> n> "}"))
(:description "{ ... }" :key "e" :shorthand valid-jsx-expression
:name "expression" :mark-node t :template ("{" r "}"))
(:description "{/* ... */}" :key ";" :shorthand valid-jsx-expression
:name "comment" :mark-node t :template ("{/*" r "*/}"))
(:description "{... ? ... : ...}" :key "?" :mark-node t :shorthand
valid-jsx-expression :name "ternary" :template
("{" @ "null" > n> " ? " @ >
(choice* :name "consequence" :missing ("null" >) :rest
(r>))
n> " : " @ >
(choice* :name "alternative" :missing ("null" >) :rest
(r>))
n> "}" >))
(:description "...={ ... }" :key "=e" :mark-node nil :point-placement
'stay :nodes
("jsx_opening_element" "jsx_self_closing_element")
:name "attr-expression" :template ("=" "{" @ "}"))
(:description "...={ ... }" :key "=c" :mark-node nil :point-placement
'stay :nodes
("jsx_opening_element" "jsx_self_closing_element")
:name "attr-choice" :template
("=" (choice* :name "Expression" :rest ("{" @ "}"))
(choice* :name "String" :rest ("\"" @ "\""))
(choice* :name "Object" :rest ("{{" @ "}}"))))
(:description "...={{ ... }}" :key "=E" :mark-node nil
:point-placement 'stay :nodes
("jsx_opening_element" "jsx_self_closing_element")
:name "attr-expression-object" :template
("=" "{{" @ "}}"))
(:description "...=\" ... \"" :key "=s" :mark-node nil
:point-placement 'stay :nodes
("jsx_opening_element" "jsx_self_closing_element")
:name "attr-string" :template ("=" "\"" @ "\"")))
Documentation
List of envelope definitions for this language.
Each entry is a list of properties that define the envelope. The properties are:
(:description STRING
:name STRING
:key STRING
:mark-node <t/nil>
:template ENVELOPE
[:extra-key STRING]
[:shorthand SHORTHAND-SYMBOL]
[:nodes NODES]
[:point-placement <stay/after/before>])
Where :description is a human-readable description of the envelope.
:name is the name of the envelope that will be
inserted into the envelope command.
:key is the key binding (in kbd macro format) to bind to the
envelope such that it is created under C-c o e
<key>. :extra-key is an optional key binding that is bound to
any arbitrary key binding.
:shorthand is a shorthand symbol to use in place of
:nodes (see the shorthand procedures alist variable)
:nodesis a list of nodes to look for at/around point before
expanding the envelope template.
:mark-node is a boolean that determines whether to mark the
node that :nodes (or :shorthand) matches and remove it and
insert it into the r/r> registers.
:template is the template to insert. See
combobulate-envelope-expand-instructions for a complete
description of the template format.
:point-placement is a symbol that determines where point is
placed after the envelope is inserted. It can be stay,
after, or before.
Source Code
;; Defined in /nix/store/b5fvrwzi3zvkabyzx0in6gw1cj963z46-emacs-packages-deps/share/emacs/site-lisp/combobulate-js-ts.el