From acc2433b659b10d92cff78baac1207e469d249d3 Mon Sep 17 00:00:00 2001 From: Aspen Smith Date: Tue, 20 Feb 2024 16:31:30 -0500 Subject: feat(aspen/emacs): Begin a complete emacs config revamp I'm still on doom, but without all the cruft I've accumulated over the last ~6 years it's actually good and fast and nice. Also, the config is literate now! The old emacs is still in .emacs.d, since occasionally I want to reference it, but eventually I'll just get rid of it Change-Id: Icda840d798594f7e6b188dba044494597d5f6043 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10999 Reviewed-by: aspen Tested-by: BuildkiteCI --- .../aspen/emacs/snippets/haskell-mode/test-module | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 users/aspen/emacs/snippets/haskell-mode/test-module (limited to 'users/aspen/emacs/snippets/haskell-mode/test-module') diff --git a/users/aspen/emacs/snippets/haskell-mode/test-module b/users/aspen/emacs/snippets/haskell-mode/test-module new file mode 100644 index 000000000000..036b0ae9983a --- /dev/null +++ b/users/aspen/emacs/snippets/haskell-mode/test-module @@ -0,0 +1,27 @@ +# -*- mode: snippet -*- +# name: test-module +# key: test +# expand-env: ((yas-indent-line 'fixed)) +# -- +-------------------------------------------------------------------------------- +module ${1:`(if (not buffer-file-name) "Module" + (let ((name (file-name-sans-extension (buffer-file-name))) + (case-fold-search nil)) + (if (cl-search "test/" name) + (replace-regexp-in-string "/" "." + (replace-regexp-in-string "^\/[^A-Z]*" "" + (car (last (split-string name "src"))))) + (file-name-nondirectory name))))`} (main, test) where +-------------------------------------------------------------------------------- +import Test.Prelude +-------------------------------------------------------------------------------- +import ${1:$(s-chop-suffix "Spec" yas-text)} +-------------------------------------------------------------------------------- + +main :: IO () +main = defaultMain test + +test :: TestTree +test = testGroup "$1" + [ $0 + ] \ No newline at end of file -- cgit 1.4.1