diff options
| author | benj <benj@rse8.com> | 2023-11-25 10:02:42 -0800 |
|---|---|---|
| committer | benj <benj@rse8.com> | 2023-11-25 10:02:42 -0800 |
| commit | 4cfa8246ea7eec4139ba6c34d3fb3a4545956824 (patch) | |
| tree | 450ba709847d3740eef79753c428095bdb08fe62 /templates/snippets | |
| parent | 4f78ee33bfc828707a79cd79d296bf4a9c25b5b9 (diff) | |
| download | emacs-4cfa8246ea7eec4139ba6c34d3fb3a4545956824.tar emacs-4cfa8246ea7eec4139ba6c34d3fb3a4545956824.tar.gz emacs-4cfa8246ea7eec4139ba6c34d3fb3a4545956824.tar.bz2 emacs-4cfa8246ea7eec4139ba6c34d3fb3a4545956824.tar.lz emacs-4cfa8246ea7eec4139ba6c34d3fb3a4545956824.tar.xz emacs-4cfa8246ea7eec4139ba6c34d3fb3a4545956824.tar.zst emacs-4cfa8246ea7eec4139ba6c34d3fb3a4545956824.zip | |
rewrite emacs init.el and go back to basics
This is a complete rewrite leveraging the very popular use-package to
see how I like it. We reduce init.el to a bare minimum configuration
and remove the previous homebrew organizational scheme. A number of
packages have yet to be setup, but we'll wait and do in JIT.
Diffstat (limited to '')
22 files changed, 0 insertions, 185 deletions
diff --git a/templates/snippets/c++-mode/doxycomments b/templates/snippets/c++-mode/doxycomments deleted file mode 120000 index 62fd598..0000000 --- a/templates/snippets/c++-mode/doxycomments +++ /dev/null @@ -1 +0,0 @@ -../doxygen/doxycomments
\ No newline at end of file diff --git a/templates/snippets/c-mode/doxycomments b/templates/snippets/c-mode/doxycomments deleted file mode 120000 index 62fd598..0000000 --- a/templates/snippets/c-mode/doxycomments +++ /dev/null @@ -1 +0,0 @@ -../doxygen/doxycomments
\ No newline at end of file diff --git a/templates/snippets/c-mode/headerDEF b/templates/snippets/c-mode/headerDEF deleted file mode 100644 index a07587b..0000000 --- a/templates/snippets/c-mode/headerDEF +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: headerDEF -# key: #if -# -- -#ifndef -#define - -#endif
\ No newline at end of file diff --git a/templates/snippets/clojure-mode/defn b/templates/snippets/clojure-mode/defn deleted file mode 100644 index 0907e4a..0000000 --- a/templates/snippets/clojure-mode/defn +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: defn -# key: defn -# -- -defn ${1:name} - "${2:docstring}" - [${3:arg-list}] - $0
\ No newline at end of file diff --git a/templates/snippets/clojure-mode/let b/templates/snippets/clojure-mode/let deleted file mode 100644 index 426caa2..0000000 --- a/templates/snippets/clojure-mode/let +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: let -# key: let -# -- -let [$0] diff --git a/templates/snippets/doxygen/doxycomments b/templates/snippets/doxygen/doxycomments deleted file mode 100644 index 94209bc..0000000 --- a/templates/snippets/doxygen/doxycomments +++ /dev/null @@ -1,48 +0,0 @@ -# -*- mode: snippet -*- -# name: doxcomments -# key: dox -# type: command -# -- -;; Command to generate doxygen comments for c functions - -(defun flatten (ls) - "Implements standard flatten function" - (cond - ((atom ls) (list ls)) - ((null (cdr ls)) (flatten (car ls))) - (t (append (flatten (car ls)) (flatten (cdr ls)))))) - -(defun find-retval () - "Returns the return value of the next parsed function" - (interactive) - (let ((struct-type "struct")) - (search-forward "(" nil t) - (move-beginning-of-line nil) - (let ((return-type (thing-at-point 'symbol))) - (if (string= return-type struct-type) - "NOT_IMPLEMENTED" - return-type)))) - -(defun find-args () - "Returns a list of function args for the next parsed function" - (interactive) - (let* ((struct-type "struct") - (start (search-forward "(" nil t)) - (end (search-forward ")" nil t)) - (args-string (buffer-substring-no-properties start (1- end))) - (args (mapcar 'string-trim-left (split-string args-string "," t)))) - (mapcar (lambda (x) (car (reverse x))) (mapcar 'split-string args)))) - -(let* ((retval (find-retval)) - (args (find-args)) - (args-len (length args)) - (brief "@brief $1\n *") - (params (mapcar (lambda (x) (format "@param: %s ${%d:}" (cdr x) (car x))) - (mapcar* 'cons - (mapcar '1+ (number-sequence 1 args-len)) - args))) - (retval (format "@return %s $0" retval)) - (snippet-text (mapconcat 'identity (flatten (list "/**" brief params (concat "\n * " retval))) - "\n * "))) - (move-beginning-of-line nil) - (yas-expand-snippet (concat snippet-text "\n*/\n"))) diff --git a/templates/snippets/org-mode/blockquote b/templates/snippets/org-mode/blockquote deleted file mode 100644 index 82a837c..0000000 --- a/templates/snippets/org-mode/blockquote +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: blockquote -# key: > -# -- -#+begin_quote -$0 -#+end_quote
\ No newline at end of file diff --git a/templates/snippets/org-mode/codeblock b/templates/snippets/org-mode/codeblock deleted file mode 100644 index 88ddca4..0000000 --- a/templates/snippets/org-mode/codeblock +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: codeblock -# key: ``` -# -- -#+begin_src $1 -$0 -#+end_src
\ No newline at end of file diff --git a/templates/snippets/org-mode/screenplay-block-left b/templates/snippets/org-mode/screenplay-block-left deleted file mode 100644 index e825b88..0000000 --- a/templates/snippets/org-mode/screenplay-block-left +++ /dev/null @@ -1,6 +0,0 @@ -# key: "l -# name: screenplay-block-left -# -- -#+BEGIN_SCREENPLAY_LEFT -$0 -#+END_SCREENPLAY_LEFT
\ No newline at end of file diff --git a/templates/snippets/org-mode/screenplay-block-right b/templates/snippets/org-mode/screenplay-block-right deleted file mode 100644 index 84b7136..0000000 --- a/templates/snippets/org-mode/screenplay-block-right +++ /dev/null @@ -1,6 +0,0 @@ -# key: "r -# name: screenplay-block-right -# -- -#+BEGIN_SCREENPLAY_RIGHT -$0 -#+END_SCREENPLAY_RIGHT
\ No newline at end of file diff --git a/templates/snippets/python-mode/import_from b/templates/snippets/python-mode/import_from deleted file mode 100644 index 767f344..0000000 --- a/templates/snippets/python-mode/import_from +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: import_from -# key: from -# -- -from $1 import $0 diff --git a/templates/snippets/python-mode/lambda b/templates/snippets/python-mode/lambda deleted file mode 100644 index 08b268b..0000000 --- a/templates/snippets/python-mode/lambda +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: lambda -# key: lam -# -- -lambda ${1:x}: $0
\ No newline at end of file diff --git a/templates/snippets/python-mode/print b/templates/snippets/python-mode/print deleted file mode 100644 index 2392fbd..0000000 --- a/templates/snippets/python-mode/print +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: print -# key: print -# -- -print("$0")
\ No newline at end of file diff --git a/templates/snippets/python-mode/print format b/templates/snippets/python-mode/print format deleted file mode 100644 index 704cb53..0000000 --- a/templates/snippets/python-mode/print format +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: print format -# key: printf -# -- -print("$1".format($0))
\ No newline at end of file diff --git a/templates/snippets/python-mode/script b/templates/snippets/python-mode/script deleted file mode 100644 index 3113da9..0000000 --- a/templates/snippets/python-mode/script +++ /dev/null @@ -1,10 +0,0 @@ -# -*- mode: snippet -*- -# name: script -# key: script -# -- -#!/usr/bin/env python -def main(): - ${1:pass} - -if __name__ == '__main__': - main()
\ No newline at end of file diff --git a/templates/snippets/rustic-mode/assert b/templates/snippets/rustic-mode/assert deleted file mode 100644 index 4d823f3..0000000 --- a/templates/snippets/rustic-mode/assert +++ /dev/null @@ -1,4 +0,0 @@ -me : assert -#key : as -# -- -assert!(${1:truth}); diff --git a/templates/snippets/rustic-mode/assert_eq b/templates/snippets/rustic-mode/assert_eq deleted file mode 100644 index 18e9e8b..0000000 --- a/templates/snippets/rustic-mode/assert_eq +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -#name : assert_eq -#key : ase -# -- -assert_eq!(${1:a}, ${2:b}); diff --git a/templates/snippets/rustic-mode/derive_debug b/templates/snippets/rustic-mode/derive_debug deleted file mode 100644 index 6d64312..0000000 --- a/templates/snippets/rustic-mode/derive_debug +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: derive-debug -# key: debug -# -- -#[derive(Debug)] diff --git a/templates/snippets/rustic-mode/print_debug b/templates/snippets/rustic-mode/print_debug deleted file mode 100644 index 5ae259f..0000000 --- a/templates/snippets/rustic-mode/print_debug +++ /dev/null @@ -1,5 +0,0 @@ -# -*- mode: snippet -*- -# name: println!("{:#?}", value); -# key: log -# -- -println!("{:#?}", ${1:value}); diff --git a/templates/snippets/rustic-mode/test b/templates/snippets/rustic-mode/test deleted file mode 100644 index 837276f..0000000 --- a/templates/snippets/rustic-mode/test +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: test -# key: test -# -- -#[test] -fn it_works() { - assert_eq!(2 + 2, 4); -} diff --git a/templates/snippets/sql-mode/primitive-return-function b/templates/snippets/sql-mode/primitive-return-function deleted file mode 100644 index bb7e79e..0000000 --- a/templates/snippets/sql-mode/primitive-return-function +++ /dev/null @@ -1,13 +0,0 @@ -# key: fnp -# name: Create function with primitive return value. -# -- -drop function if exists $1(); -create or replace function $1( - $0 -) -returns $2 as $$ -declare -begin - -end; -$$ language plpgsql;
\ No newline at end of file diff --git a/templates/snippets/sql-mode/record-return-fuction b/templates/snippets/sql-mode/record-return-fuction deleted file mode 100644 index a3894c4..0000000 --- a/templates/snippets/sql-mode/record-return-fuction +++ /dev/null @@ -1,18 +0,0 @@ -# key: fn -# name: create a function which returns a full record -# -- -drop type if exists $1_ret cascade; -create type $1_ret as ( - $2 -); - -drop function if exists $1(); -create or replace function $1( - $3 -) -returns setof $1_ret as $$ -declare -begin - $0 -end; -$$ language plpgsql; |
