Initial commit
This commit is contained in:
commit
ac7c4dc8ce
120
c++.eld
Normal file
120
c++.eld
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
;;; c++.eld --- Tempel template definitions file -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;; Author: Jessie Hildebrandt <jessieh.net>
|
||||||
|
;; Homepage: https://gitlab.com/jessieh/tempel-templates
|
||||||
|
|
||||||
|
;; This file is not part of GNU Emacs.
|
||||||
|
|
||||||
|
;;; Commentary:
|
||||||
|
|
||||||
|
;; This file provides Tempel template definitions.
|
||||||
|
|
||||||
|
;;; License:
|
||||||
|
|
||||||
|
;; This program is free software; you can redistribute it and/or
|
||||||
|
;; modify it under the terms of the GNU General Public License as
|
||||||
|
;; published by the Free Software Foundation; either version 2, or
|
||||||
|
;; (at your option) any later version.
|
||||||
|
;;
|
||||||
|
;; This program is distributed in the hope that it will be useful,
|
||||||
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
;; General Public License for more details.
|
||||||
|
;;
|
||||||
|
;; You should have received a copy of the GNU General Public License
|
||||||
|
;; along with this program; see the file COPYING. If not, write to
|
||||||
|
;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||||
|
;; Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
c++-mode c++-ts-mode
|
||||||
|
|
||||||
|
;; ---------------------------------- ;;
|
||||||
|
;; Section header
|
||||||
|
;; ---------------------------------- ;;
|
||||||
|
|
||||||
|
(sec
|
||||||
|
> "/* -----------------------------------------------------------------------------" >
|
||||||
|
n> " *" >
|
||||||
|
n> " * " (r "Section title" title) >
|
||||||
|
n> " *" >
|
||||||
|
n> " * -------------------------------------------------------------------------- */" >
|
||||||
|
n)
|
||||||
|
|
||||||
|
;; ---------------------------------- ;;
|
||||||
|
;; Subsection header
|
||||||
|
;; ---------------------------------- ;;
|
||||||
|
|
||||||
|
(sub
|
||||||
|
> "/* -------------------------------------" >
|
||||||
|
n> " * " (r "Subsection title" title) >
|
||||||
|
n> " * ---------------------------------- */" >
|
||||||
|
n)
|
||||||
|
|
||||||
|
;; ---------------------------------- ;;
|
||||||
|
;; Subdivision header
|
||||||
|
;; ---------------------------------- ;;
|
||||||
|
|
||||||
|
(div
|
||||||
|
> "/* --- " (r "Subdivision title" title) " --- */" >
|
||||||
|
n)
|
||||||
|
|
||||||
|
;; ---------------------------------- ;;
|
||||||
|
;; Doc comment
|
||||||
|
;; ---------------------------------- ;;
|
||||||
|
|
||||||
|
(doc
|
||||||
|
> "/**" >
|
||||||
|
n> " * " (r "TODO: Doc me!") >
|
||||||
|
n> " */" >)
|
||||||
|
|
||||||
|
;; ---------------------------------- ;;
|
||||||
|
;; File doc comment
|
||||||
|
;; ---------------------------------- ;;
|
||||||
|
|
||||||
|
(file
|
||||||
|
> "/**" >
|
||||||
|
n> " * @file " (or (file-relative-name buffer-file-name
|
||||||
|
(project-root (project-current)))
|
||||||
|
(file-name-nondirectory (buffer-file-name))) >
|
||||||
|
n> " * @brief " (p "Brief description of file") >
|
||||||
|
n> " */" >
|
||||||
|
n)
|
||||||
|
|
||||||
|
;; ---------------------------------- ;;
|
||||||
|
;; Function header
|
||||||
|
;; ---------------------------------- ;;
|
||||||
|
|
||||||
|
(fn
|
||||||
|
> (i doc) >
|
||||||
|
n> (p "void") " " (p "fn_name") "(" p ")" >
|
||||||
|
n> "{" >
|
||||||
|
n> r> >
|
||||||
|
n> "}" >
|
||||||
|
n)
|
||||||
|
|
||||||
|
;; ---------------------------------- ;;
|
||||||
|
;; Module declarations
|
||||||
|
;; ---------------------------------- ;;
|
||||||
|
|
||||||
|
(module
|
||||||
|
> (i sec (title "Global module fragment")) >
|
||||||
|
n> "module;" >
|
||||||
|
n
|
||||||
|
n> (i sec (title "Module declaration")) >
|
||||||
|
n> "/**" >
|
||||||
|
n> " * @module " (p (file-name-base (or (buffer-file-name) "module_name")) module-name) >
|
||||||
|
n> " * @brief " (p "Brief description of module") >
|
||||||
|
n> " */" >
|
||||||
|
n> "export module " module-name ";" >
|
||||||
|
n
|
||||||
|
n> (i sec (title (concat namespace-name "::"))) >
|
||||||
|
n> "namespace " (p module-name namespace-name) " {" >
|
||||||
|
n
|
||||||
|
n> (i sub (title "Exports and prototypes"))
|
||||||
|
n> "export {}" >
|
||||||
|
n
|
||||||
|
n> r> >
|
||||||
|
n
|
||||||
|
n> "}" >)
|
68
elisp.eld
Normal file
68
elisp.eld
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
;;; elisp.eld --- Tempel template definitions file -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;; Author: Jessie Hildebrandt <jessieh.net>
|
||||||
|
;; Homepage: https://gitlab.com/jessieh/tempel-templates
|
||||||
|
|
||||||
|
;; This file is not part of GNU Emacs.
|
||||||
|
|
||||||
|
;;; Commentary:
|
||||||
|
|
||||||
|
;; This file provides Tempel template definitions.
|
||||||
|
|
||||||
|
;;; License:
|
||||||
|
|
||||||
|
;; This program is free software; you can redistribute it and/or
|
||||||
|
;; modify it under the terms of the GNU General Public License as
|
||||||
|
;; published by the Free Software Foundation; either version 2, or
|
||||||
|
;; (at your option) any later version.
|
||||||
|
;;
|
||||||
|
;; This program is distributed in the hope that it will be useful,
|
||||||
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
;; General Public License for more details.
|
||||||
|
;;
|
||||||
|
;; You should have received a copy of the GNU General Public License
|
||||||
|
;; along with this program; see the file COPYING. If not, write to
|
||||||
|
;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||||
|
;; Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
emacs-lisp-mode lisp-data-mode
|
||||||
|
|
||||||
|
;; ---------------------------------- ;;
|
||||||
|
;; Section header
|
||||||
|
;; ---------------------------------- ;;
|
||||||
|
|
||||||
|
(sec
|
||||||
|
> ";; -------------------------------------------------------------------------- ;;" >
|
||||||
|
n> ";;" >
|
||||||
|
n> ";; " (p "Section title") >
|
||||||
|
n> ";;" >
|
||||||
|
n> ";; -------------------------------------------------------------------------- ;;" >
|
||||||
|
n)
|
||||||
|
|
||||||
|
;; ---------------------------------- ;;
|
||||||
|
;; Subsection header
|
||||||
|
;; ---------------------------------- ;;
|
||||||
|
|
||||||
|
(sub
|
||||||
|
> ";; ---------------------------------- ;;" >
|
||||||
|
n> ";; " (p "Subsection title") >
|
||||||
|
n> ";; ---------------------------------- ;;" >
|
||||||
|
n)
|
||||||
|
|
||||||
|
;; ---------------------------------- ;;
|
||||||
|
;; Autoload flag
|
||||||
|
;; ---------------------------------- ;;
|
||||||
|
|
||||||
|
(autoload
|
||||||
|
> ";;;###autoload" >)
|
||||||
|
|
||||||
|
;; ---------------------------------- ;;
|
||||||
|
;; File header
|
||||||
|
;; ---------------------------------- ;;
|
||||||
|
|
||||||
|
(file
|
||||||
|
> ";;; " (file-name-nondirectory (buffer-file-name)) " --- " (p "Description of file") " -*- lexical-binding: t; -*-" >
|
||||||
|
n)
|
70
javascript.eld
Normal file
70
javascript.eld
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
;;; javascript.eld --- Tempel template definitions file -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;; Author: Jessie Hildebrandt <jessieh.net>
|
||||||
|
;; Homepage: https://gitlab.com/jessieh/tempel-templates
|
||||||
|
|
||||||
|
;; This file is not part of GNU Emacs.
|
||||||
|
|
||||||
|
;;; Commentary:
|
||||||
|
|
||||||
|
;; This file provides Tempel template definitions.
|
||||||
|
|
||||||
|
;;; License:
|
||||||
|
|
||||||
|
;; This program is free software; you can redistribute it and/or
|
||||||
|
;; modify it under the terms of the GNU General Public License as
|
||||||
|
;; published by the Free Software Foundation; either version 2, or
|
||||||
|
;; (at your option) any later version.
|
||||||
|
;;
|
||||||
|
;; This program is distributed in the hope that it will be useful,
|
||||||
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
;; General Public License for more details.
|
||||||
|
;;
|
||||||
|
;; You should have received a copy of the GNU General Public License
|
||||||
|
;; along with this program; see the file COPYING. If not, write to
|
||||||
|
;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||||
|
;; Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
js-mode js-ts-mode typescript-mode typescript-ts-mode
|
||||||
|
|
||||||
|
;; ---------------------------------- ;;
|
||||||
|
;; Section header
|
||||||
|
;; ---------------------------------- ;;
|
||||||
|
|
||||||
|
(sec
|
||||||
|
> "/* -----------------------------------------------------------------------------" >
|
||||||
|
n> " *" >
|
||||||
|
n> " * " (r "Section title" title) >
|
||||||
|
n> " *" >
|
||||||
|
n> " * -------------------------------------------------------------------------- */" >
|
||||||
|
n)
|
||||||
|
|
||||||
|
;; ---------------------------------- ;;
|
||||||
|
;; Subsection header
|
||||||
|
;; ---------------------------------- ;;
|
||||||
|
|
||||||
|
(sub
|
||||||
|
> "/* -------------------------------------" >
|
||||||
|
n> " * " (r "Subsection title" title) >
|
||||||
|
n> " * ---------------------------------- */" >
|
||||||
|
n)
|
||||||
|
|
||||||
|
;; ---------------------------------- ;;
|
||||||
|
;; Subdivision header
|
||||||
|
;; ---------------------------------- ;;
|
||||||
|
|
||||||
|
(div
|
||||||
|
> "/* --- " (r "Subdivision title" title) " --- */" >
|
||||||
|
n)
|
||||||
|
|
||||||
|
;; ---------------------------------- ;;
|
||||||
|
;; Doc comment
|
||||||
|
;; ---------------------------------- ;;
|
||||||
|
|
||||||
|
(doc
|
||||||
|
> "/**" >
|
||||||
|
n> " * " (r "TODO: Doc me!") >
|
||||||
|
n> " */" >)
|
Loading…
Reference in New Issue
Block a user