Klimi's new dotfiles with stow.
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

68 satır
2.0 KiB

5 yıl önce
  1. ;;; yasnippet-snippets.el --- Collection of yasnippet snippets
  2. ;; Copyright (C) 2017 Andrea Crotti
  3. ;; Author: Andrea Crotti <andrea.crotti.0@gmail.com>
  4. ;; Keywords: snippets
  5. ;; Version: 0.2
  6. ;; Package-Requires: ((yasnippet "0.8.0"))
  7. ;; Keywords: convenience, snippets
  8. ;;; Commentary:
  9. ;; Official snippet collection for the yasnippet package.
  10. ;;; License:
  11. ;; This program is free software; you can redistribute it and/or modify
  12. ;; it under the terms of the GNU General Public License as published by
  13. ;; the Free Software Foundation, either version 3 of the License, or
  14. ;; (at your option) any later version.
  15. ;; This program is distributed in the hope that it will be useful,
  16. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. ;; GNU General Public License for more details.
  19. ;; You should have received a copy of the GNU General Public License
  20. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
  21. ;;; Code:
  22. (require 'yasnippet)
  23. (defconst yasnippet-snippets-dir
  24. (expand-file-name
  25. "snippets"
  26. (file-name-directory
  27. ;; Copied from ‘f-this-file’ from f.el.
  28. (cond
  29. (load-in-progress load-file-name)
  30. ((and (boundp 'byte-compile-current-file) byte-compile-current-file)
  31. byte-compile-current-file)
  32. (:else (buffer-file-name))))))
  33. ;;;###autoload
  34. (defun yasnippet-snippets-initialize ()
  35. "Load the `yasnippet-snippets' snippets directory."
  36. (add-to-list 'yas-snippet-dirs 'yasnippet-snippets-dir t)
  37. (yas-load-directory yasnippet-snippets-dir t))
  38. (defgroup yasnippet-snippets nil
  39. "Options for yasnippet setups.
  40. This is useful for customizing options declared in
  41. .yas-setup.el files. For example, you could declare a
  42. customizable variable used for a snippet expansion.
  43. See Info node `(elisp)Customization Types'."
  44. :group 'yasnippet)
  45. ;;;###autoload
  46. (eval-after-load 'yasnippet
  47. '(yasnippet-snippets-initialize))
  48. (provide 'yasnippet-snippets)
  49. ;;; yasnippet-snippets.el ends here