Skip to content

Commit

Permalink
tweak: make yasnippet conf obsolete
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Mar 22, 2023
1 parent a7e02d1 commit e8025e9
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions modules/obsolete/me-yasnippet.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
;;; me-yasnippet.el --- Yasnippet config -*- lexical-binding: t; -*-

;; Copyright (C) 2022-2023 Abdelhak Bougouffa

;; Author: Abdelhak Bougouffa (concat "abougouffa" "@" "fedora" "project" "." "org")


(use-package yasnippet
:straight t
:hook (minemacs-lazy . yas-global-mode)
:init
(defvar yas-verbosity 2)
:custom
(yas-snippet-dirs nil)
(yas-triggers-in-field t))

(use-package cape-yasnippet
:straight (:host github :repo "elken/cape-yasnippet")
:after cape yasnippet
:demand t
:hook ((prog-mode text-mode conf-mode) . +cape-yasnippet--setup-h)
:config
;; To avoid auto-expanding snippets
;; TODO: Make "RET" expand the snippet
(plist-put cape-yasnippet--properties :exit-function #'always)
(defun +cape-yasnippet--setup-h ()
(when (bound-and-true-p yas-minor-mode)
(add-to-list 'completion-at-point-functions #'cape-yasnippet))))

(use-package yasnippet-snippets
:straight t
:after yasnippet
:demand t)

(use-package doom-snippets
:straight (:host github :repo "hlissner/doom-snippets" :files ("*.el" "*"))
:after yasnippet
:demand t)

(use-package license-snippets
:straight t
:after yasnippet
:demand t
:config
(license-snippets-init))


(provide 'obsolete/me-yasnippet)

0 comments on commit e8025e9

Please sign in to comment.