Skip to content

Commit

Permalink
git: Update snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
mohkale committed Aug 31, 2024
1 parent 62dcea0 commit f17db3f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
6 changes: 6 additions & 0 deletions etc/abbrev.el
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,9 @@
("fr" "from" nil :count 1)
("im" "import" nil :count 1)
))

(define-abbrev-table 'git-commit-mode-abbrev-table+
'(
("cab" "Co-Authored-By:" nil :count 1)
("cl" "Closes:" nil :count 1)
))
14 changes: 14 additions & 0 deletions etc/snippets.org
Original file line number Diff line number Diff line change
Expand Up @@ -3695,6 +3695,20 @@
break}
#+end_src
* git-commit-mode
#+BEGIN_SRC text :tangle snippets/git-commit-mode/.yas-parents :shebang
text-mode
#+END_SRC
** type
#+begin_src snippet :tangle snippets/git-commit-mode/type
# contributer: mohkale <[email protected]>
# name: type
# key: type
# --
${1:$$(yas-choose-value '("fix" "hotfix" "add" "update" "change" "clean" "disable" "remove" "upgrade" "revert"))}: $0
#+end_src
* Aliases
#+BEGIN_SRC text :tangle snippets/c++-ts-mode/.yas-parents :shebang
c++-mode
Expand Down
7 changes: 4 additions & 3 deletions init.org
Original file line number Diff line number Diff line change
Expand Up @@ -18841,10 +18841,11 @@ Welcome to my personal Emacs configuration 😎.
(defvar +abbrev-mode-text-mode-parent-tables (list text-mode-abbrev-table))

:config
(defvar git-commit-mode-abbrev-table)
(define-abbrev-table 'git-commit-mode-abbrev-table '()
(defvar git-commit-mode-abbrev-table+)
(define-abbrev-table 'git-commit-mode-abbrev-table+ '()
:parents +abbrev-mode-text-mode-parent-tables)
(push `(git-commit-mode . ,git-commit-mode-abbrev-table)
(abbrev-table-put git-commit-mode-abbrev-table+ :parents +abbrev-mode-text-mode-parent-tables)
(push `(git-commit-mode . ,git-commit-mode-abbrev-table+)
abbrev-minor-mode-table-alist)

:config
Expand Down

0 comments on commit f17db3f

Please sign in to comment.