diff options
author | Marc Coquand <marc@coquand.email> | 2024-12-14 20:40:25 +0100 |
---|---|---|
committer | Marc Coquand <marc@coquand.email> | 2024-12-14 20:40:25 +0100 |
commit | fa0f8110854c7c2b3c00c51aa6a0ca903b04301d (patch) | |
tree | 339d4c8cecd96ef0e0bf8e21ab88f8975cf6e33c | |
parent | ed2c64449037b61a76d8e07546c718b2d553f6d4 (diff) | |
download | guix-fa0f8110854c7c2b3c00c51aa6a0ca903b04301d.tar.gz guix-fa0f8110854c7c2b3c00c51aa6a0ca903b04301d.tar.bz2 guix-fa0f8110854c7c2b3c00c51aa6a0ca903b04301d.zip |
.
-rw-r--r-- | home/dots/.emacs | 48 |
1 files changed, 37 insertions, 11 deletions
diff --git a/home/dots/.emacs b/home/dots/.emacs index 55ea088..ee1a40b 100644 --- a/home/dots/.emacs +++ b/home/dots/.emacs @@ -263,11 +263,11 @@ (corfu-cycle t) ;; Enable cycling for `corfu-next/previous' ;; (corfu-auto t) ;; Enable auto completion ;; (corfu-quit-at-boundary nil) ;; Never quit at completion boundary - ;; (corfu-quit-no-match nil) ;; Never quit, even if there is no match - ;; (corfu-preview-current nil) ;; Disable current candidate preview + (corfu-quit-no-match t) ;; Never quit, even if there is no match + (corfu-preview-current t) ;; Disable current candidate preview (corfu-preselect 'prompt) ;; Preselect the prompt (corfu-quit-no-match t) - ;; (corfu-on-exact-match nil) ;; Configure handling of exact matches + (corfu-on-exact-match 'show) ;; Configure handling of exact matches ;; Recommended: Enable Corfu globally. This is recommended since Dabbrev can ;; be used globally (M-/). See also the customization variable @@ -1180,14 +1180,26 @@ :custom (skeleton-end-hook nil) :init - (define-skeleton s/go-tmpl-translate - "Translate" nil - > "{{ T .p \"" - @ "\" }}") - - (define-skeleton s/go-tmpl-insert - "Insert template" nil - > "{{template \"" - @ "\" .}}") + (define-skeleton s/scheme-define + "G-expression" + "Definition name: " + > "(define " str \n + > - @ ")" + ) + + (define-skeleton s/guix-gexpr + "G-expression" + nil + > "(with-imported-module" \n + - "'((guix build utils))" \n + - "#~(begin" \n + - "(use-modules" \n + - "(guix build utils))" \n + - @ "))" + ) + + ;; elisp (define-skeleton s/elisp-use-package "New package" "Package name: " @@ -1207,6 +1219,16 @@ "(interactive)" \n - @")") + ;; Go + (define-skeleton s/go-tmpl-translate + "Translate" nil + > "{{ T .p \"" - @ "\" }}") + + (define-skeleton s/go-tmpl-insert + "Insert template" nil + > "{{template \"" - @ "\" .}}") + + (define-skeleton s/golang-new-function "New function" "Function name: " @@ -1234,11 +1256,15 @@ -1 "}")) (use-package abbrev - :after (skeleton go-mode) + :after (skeleton go-mode scheme) :diminish abbrev-mode :init (setq-default abbrev-mode t) :config + (define-abbrev scheme-mode-abbrev-table "2de" + "" 's/scheme-define) + (define-abbrev scheme-mode-abbrev-table "2ge" + "" 's/guix-gexpr) (define-abbrev html-mode-abbrev-table "2tr" "" 's/go-tmpl-translate) (define-abbrev html-mode-abbrev-table "2te" |