Skip to content

Commit

Permalink
Move emacs-snippets -> doom-snippets
Browse files Browse the repository at this point in the history
The repo was renamed upstream.
  • Loading branch information
hlissner committed Jul 14, 2019
1 parent de85f67 commit 62af55d
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 35 deletions.
14 changes: 0 additions & 14 deletions modules/config/default/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ private module.
* Table of Contents :TOC:
- [[#install][Install]]
- [[#configuration][Configuration]]
- [[#using-another-snippets-library][Using another snippets library]]
- [[#im-not-an-evil-user][I'm not an evil user...]]
- [[#appendix][Appendix]]
- [[#commands][Commands]]
Expand All @@ -29,19 +28,6 @@ private module.
This module has no external dependencies.

* Configuration
** Using another snippets library
Don't want to use provided one? Then add this to your private module,

#+BEGIN_SRC emacs-lisp
;; in config/$USER/packages.el
(package! emacs-snippets :ignore t)

;; in config/$USER/config.el
(def-package-hook! emacs-snippets :disabled t)
(after! yasnippet
(push "~/path/to/my/private/snippets" yas-snippet-dirs))
#+END_SRC

** I'm not an evil user...
That's fine. All evil configuration is ignored if =:editor evil= is disabled.

Expand Down
30 changes: 20 additions & 10 deletions modules/editor/snippets/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
#+STARTUP: inlineimages

* Table of Contents :TOC:
- [[Description][Description]]
- [[Module Flags][Module Flags]]
- [[Plugins][Plugins]]
- [[Hacks][Hacks]]
- [[Prerequisites][Prerequisites]]
- [[Features][Features]]
- [[Configuration][Configuration]]
- [[Troubleshooting][Troubleshooting]]
- [[#description][Description]]
- [[#module-flags][Module Flags]]
- [[#plugins][Plugins]]
- [[#hacks][Hacks]]
- [[#prerequisites][Prerequisites]]
- [[#features][Features]]
- [[#configuration][Configuration]]
- [[#disabling-the-built-in-snippets][Disabling the built-in snippets]]
- [[#troubleshooting][Troubleshooting]]

* Description
This module adds snippets to Emacs, powered by yasnippet.
Expand All @@ -22,7 +23,7 @@ This module exposes no flags.
** Plugins
+ [[https://github.com/joaotavora/yasnippet][yasnippet]]
+ [[https://github.com/abo-abo/auto-yasnippet][auto-yasnippet]]
+ [[https://github.com/hlissner/emacs-snippets][emacs-snippets]]
+ [[https://github.com/hlissner/doom-snippets][doom-snippets]]

** TODO Hacks

Expand All @@ -31,6 +32,15 @@ This module has no external dependencies.

* TODO Features

* TODO Configuration
* Configuration
** Disabling the built-in snippets
Don't want to use provided one? Then add this to your private module,

#+BEGIN_SRC emacs-lisp
;; in ~/.doom.d/packages.el
(package! doom-snippets :ignore t)
;; If you want to replace it with yasnippet's default snippets
(package! yasnippet-snippets)
#+END_SRC

* TODO Troubleshooting
4 changes: 2 additions & 2 deletions modules/editor/snippets/autoload/snippets.el
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ You will be prompted for a snippet to alias."
(list
(+snippet--completing-read-uuid "Select snippet to alias: "
current-prefix-arg)))
(unless (require 'emacs-snippets nil t)
(user-error "This command requires the `emacs-snippets' library bundled with Doom Emacs"))
(unless (require 'doom-snippets nil t)
(user-error "This command requires the `doom-snippets' library bundled with Doom Emacs"))
(let ((default-directory (expand-file-name (symbol-name major-mode) +snippets-dir)))
(+snippet--ensure-dir default-directory)
(with-current-buffer (switch-to-buffer "untitled-snippet")
Expand Down
2 changes: 1 addition & 1 deletion modules/editor/snippets/config.el
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@


;; default snippets library
(def-package! emacs-snippets
(def-package! doom-snippets
:after yasnippet)
6 changes: 3 additions & 3 deletions modules/editor/snippets/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
(package! yasnippet)
(package! auto-yasnippet)

(package! emacs-snippets
(package! doom-snippets
:recipe (:fetcher github
:repo "hlissner/emacs-snippets"
:files ("*")))
:repo "hlissner/doom-snippets"
:files ("*.el" "snippets")))
2 changes: 1 addition & 1 deletion modules/lang/cc/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ This module adds support for the C-family of languages: C, C++, and Objective-C.
+ Syntax-checking (~flycheck-irony~)
+ Code navigation (~rtags~)
+ File Templates ([[../../editor/file-templates/templates/c-mode][c-mode]], [[../../editor/file-templates/templates/c++-mode][c++-mode]])
+ Snippets ([[https://github.com/hlissner/emacs-snippets/tree/master/cc-mode][cc-mode]], [[https://github.com/hlissner/emacs-snippets/tree/master/c-mode][c-mode]], [[https://github.com/hlissner/emacs-snippets/tree/master/c++-mode][c++-mode]])
+ Snippets ([[https://github.com/hlissner/doom-snippets/tree/master/cc-mode][cc-mode]], [[https://github.com/hlissner/doom-snippets/tree/master/c-mode][c-mode]], [[https://github.com/hlissner/doom-snippets/tree/master/c++-mode][c++-mode]])
+ Several improvements to C++11 indentation and syntax highlighting.

** Module Flags
Expand Down
2 changes: 1 addition & 1 deletion modules/lang/coq/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
This module adds [[https://coq.inria.fr][coq]] support, powered by [[https://proofgeneral.github.io][Proof General]].

+ Code completion ([[https://github.com/cpitclaudel/company-coq][company-coq]])
+ [[https://github.com/hlissner/emacs-snippets/tree/master/coq-mode][Snippets]]
+ [[https://github.com/hlissner/doom-snippets/tree/master/coq-mode][Snippets]]
2 changes: 1 addition & 1 deletion modules/lang/go/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This module adds [[https://golang.org][Go]] support.
+ Auto-formatting on save (~gofmt~)
+ Code navigation & refactoring (~go-guru~)
+ [[../../editor/file-templates/templates/go-mode][File templates]]
+ [[https://github.com/hlissner/emacs-snippets/tree/master/go-mode][Snippets]]
+ [[https://github.com/hlissner/doom-snippets/tree/master/go-mode][Snippets]]

** Module Flags
This module provides no flags.
Expand Down
2 changes: 1 addition & 1 deletion modules/lang/haskell/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ or [[https://github.com/emacs-lsp/lsp-haskell][LSP]].
+ REPL (~ghci~)
+ Syntax-checking (~flycheck~)
+ Code navigation (~dante~)
+ [[https://github.com/hlissner/emacs-snippets/tree/master/haskell-mode][Snippets]]
+ [[https://github.com/hlissner/doom-snippets/tree/master/haskell-mode][Snippets]]

** External resources
Here are a few resources I've found indespensible in my Haskell adventures:
Expand Down
2 changes: 1 addition & 1 deletion modules/lang/php/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This module adds support for PHP 5.3+ (including PHP7).
+ Unit-test commands (~phpunit~)
+ Support for ~laravel~ and ~composer~ projects (with project-specific snippets)
+ [[../../editor/file-templates/templates/php-mode][File templates]]
+ [[https://github.com/hlissner/emacs-snippets/tree/master/php-mode][Snippets]]
+ [[https://github.com/hlissner/doom-snippets/tree/master/php-mode][Snippets]]

#+begin_quote
PHP was the first programming language I got paid to code in, back in the Cretaceous period (2003). My sincerest apologies go out to all the programmers who inherited my earliest PHP work. I know you're out there, writhing in your straitjackets.
Expand Down

0 comments on commit 62af55d

Please sign in to comment.