From 62af55dad0f257e1c44f3b116b437fe0117a820a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 14 Jul 2019 14:43:45 +0200 Subject: [PATCH] Move emacs-snippets -> doom-snippets The repo was renamed upstream. --- modules/config/default/README.org | 14 --------- modules/editor/snippets/README.org | 30 +++++++++++++------- modules/editor/snippets/autoload/snippets.el | 4 +-- modules/editor/snippets/config.el | 2 +- modules/editor/snippets/packages.el | 6 ++-- modules/lang/cc/README.org | 2 +- modules/lang/coq/README.org | 2 +- modules/lang/go/README.org | 2 +- modules/lang/haskell/README.org | 2 +- modules/lang/php/README.org | 2 +- 10 files changed, 31 insertions(+), 35 deletions(-) diff --git a/modules/config/default/README.org b/modules/config/default/README.org index 6256a39709c..1d9788956a2 100644 --- a/modules/config/default/README.org +++ b/modules/config/default/README.org @@ -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]] @@ -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. diff --git a/modules/editor/snippets/README.org b/modules/editor/snippets/README.org index 9dd3a0957e3..a5b3b955ea6 100644 --- a/modules/editor/snippets/README.org +++ b/modules/editor/snippets/README.org @@ -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. @@ -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 @@ -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 diff --git a/modules/editor/snippets/autoload/snippets.el b/modules/editor/snippets/autoload/snippets.el index bfdefc8f3dc..1aaa9df148a 100644 --- a/modules/editor/snippets/autoload/snippets.el +++ b/modules/editor/snippets/autoload/snippets.el @@ -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") diff --git a/modules/editor/snippets/config.el b/modules/editor/snippets/config.el index d4f1c5ba265..941a5030f93 100644 --- a/modules/editor/snippets/config.el +++ b/modules/editor/snippets/config.el @@ -68,5 +68,5 @@ ;; default snippets library -(def-package! emacs-snippets +(def-package! doom-snippets :after yasnippet) diff --git a/modules/editor/snippets/packages.el b/modules/editor/snippets/packages.el index a0f023c42f4..64123c6d3c9 100644 --- a/modules/editor/snippets/packages.el +++ b/modules/editor/snippets/packages.el @@ -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"))) diff --git a/modules/lang/cc/README.org b/modules/lang/cc/README.org index 4942c4ac966..f965fb24d74 100644 --- a/modules/lang/cc/README.org +++ b/modules/lang/cc/README.org @@ -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 diff --git a/modules/lang/coq/README.org b/modules/lang/coq/README.org index 57459aa7e36..bb18d19de59 100644 --- a/modules/lang/coq/README.org +++ b/modules/lang/coq/README.org @@ -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]] diff --git a/modules/lang/go/README.org b/modules/lang/go/README.org index be726307ea3..68546291793 100644 --- a/modules/lang/go/README.org +++ b/modules/lang/go/README.org @@ -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. diff --git a/modules/lang/haskell/README.org b/modules/lang/haskell/README.org index 9f8fe77e69b..88a4c09b098 100644 --- a/modules/lang/haskell/README.org +++ b/modules/lang/haskell/README.org @@ -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: diff --git a/modules/lang/php/README.org b/modules/lang/php/README.org index 1b09a4cb110..9c2c874620a 100644 --- a/modules/lang/php/README.org +++ b/modules/lang/php/README.org @@ -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.