blah
This commit is contained in:
@@ -63,8 +63,9 @@
|
||||
(require 'syd-projects)
|
||||
(require 'syd-scratch)
|
||||
(require 'syd-smartparens)
|
||||
(require 'syd-snippets)
|
||||
(require 'syd-tabs)
|
||||
(require 'syd-tooling)
|
||||
(require 'syd-tramp)
|
||||
(require 'syd-trust)
|
||||
(require 'syd-ui)
|
||||
|
||||
|
||||
@@ -24,11 +24,12 @@
|
||||
;; Managed by Nix: libenchant dependency.
|
||||
:straight nil
|
||||
:commands (jinx-mode jinx-correct jinx-correct-word)
|
||||
:init (defun syd-jinx--jinx-or-ispell ()
|
||||
(interactive)
|
||||
(if (bound-and-true-p jinx-mode)
|
||||
(call-interactively #'jinx-correct-word)
|
||||
(call-interactively #'ispell-word)))
|
||||
:init
|
||||
(defun syd-jinx--jinx-or-ispell ()
|
||||
(interactive)
|
||||
(if (bound-and-true-p jinx-mode)
|
||||
(call-interactively #'jinx-correct-word)
|
||||
(call-interactively #'ispell-word)))
|
||||
:general (:states '(normal visual)
|
||||
"z =" #'syd-jinx--jinx-or-ispell)
|
||||
:config
|
||||
|
||||
@@ -72,7 +72,13 @@
|
||||
"r r" #'cider-ns-refresh
|
||||
"r R" #'cider-restart
|
||||
"r q" #'cider-quit
|
||||
"d d" #'cider-debug-defun-at-point
|
||||
"M-:" #'cider-read-and-eval
|
||||
"h d" #'cider-doc
|
||||
"h c" #'cider-cheatsheet)
|
||||
(:keymaps 'cider-repl-mode-map
|
||||
:states 'insert
|
||||
"S-<return>" #'cider-repl-newline-and-indent)
|
||||
:config
|
||||
(add-hook 'cider-mode-hook #'eldoc-mode)
|
||||
(add-hook 'cider-repl-mode-hook #'syd-lisp-mode)
|
||||
@@ -91,7 +97,9 @@
|
||||
(,(rx bol "*cider-doc*")
|
||||
:slot 2 :vslot -8 :quit t :select t)))
|
||||
;; DEPRECATED: Remove once syd-strategies is working.
|
||||
(syd-add-hook 'clojure-mode-hook
|
||||
(syd-add-hook '(clojure-mode-hook
|
||||
clojurescript-mode-hook
|
||||
cider-repl-mode-hook)
|
||||
(defun syd-clojure-set-handlers-h ()
|
||||
(setq-local syd-lookup-documentation-handlers
|
||||
(list #'cider-doc))))
|
||||
|
||||
9
modules/home/users/crumb/emacs/modules/syd-snippets.el
Normal file
9
modules/home/users/crumb/emacs/modules/syd-snippets.el
Normal file
@@ -0,0 +1,9 @@
|
||||
;;; syd-snippets.el -*- lexical-binding: t; -*-
|
||||
|
||||
(use-package yasnippet
|
||||
:hook (on-first-input . yas-global-mode))
|
||||
|
||||
(use-package yasnippet-snippets
|
||||
:after yasnippet)
|
||||
|
||||
(provide 'syd-snippets)
|
||||
7
modules/home/users/crumb/emacs/modules/syd-trust.el
Normal file
7
modules/home/users/crumb/emacs/modules/syd-trust.el
Normal file
@@ -0,0 +1,7 @@
|
||||
;;; syd-trust.el -*- lexical-binding: t; -*-
|
||||
|
||||
(setq safe-local-variable-directories
|
||||
(list "/persist/dots"
|
||||
(expand-file-name "~/org")))
|
||||
|
||||
(provide 'syd-trust)
|
||||
@@ -0,0 +1,27 @@
|
||||
;;; .yas-setup.el -*- lexical-binding: t; -*-
|
||||
|
||||
(require 'dash)
|
||||
(require 's)
|
||||
|
||||
(defun snippet-bibtex--make-id ()
|
||||
(let ((surname (--> (or (yas-field-value 2)
|
||||
"surname")
|
||||
(s-downcase it)
|
||||
(string-to-list it)
|
||||
(-take-while (lambda (x) (/= x ?,)) it)
|
||||
(-filter (lambda (x) (not (memq x '(?- ?\s)))) it)
|
||||
(apply #'string it)))
|
||||
(year (--> (or (yas-field-value 3)
|
||||
"1234")
|
||||
(string-to-list it)
|
||||
(-take-while (lambda (x) (<= ?0 x ?9)) it)
|
||||
(apply #'string it)))
|
||||
(keyword (or (-some--> (or (yas-field-value 1)
|
||||
"keyword")
|
||||
(s-downcase it)
|
||||
(s-split-words it)
|
||||
(-find (lambda (x)
|
||||
(not (member x '("the" "on" "of" "a" "when"))))
|
||||
it))
|
||||
"keyword")))
|
||||
(concat surname year keyword)))
|
||||
13
modules/home/users/crumb/emacs/snippets/bibtex-mode/@art
Normal file
13
modules/home/users/crumb/emacs/snippets/bibtex-mode/@art
Normal file
@@ -0,0 +1,13 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: Article
|
||||
# uuid:
|
||||
# key: @art
|
||||
# condition: t
|
||||
# --
|
||||
@article{${1:$(snippet-bibtex--make-id)}
|
||||
, title = {${1:Principia Mathematica}}
|
||||
, author = {${2:of Sinope, Diogenes}}
|
||||
, year = {${3:1992}}
|
||||
, url = {${4:https://example.com/}}
|
||||
, urldate = {${5:`(format-time-string "%Y-%m-%d")`}}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: foreign
|
||||
# uuid: haskell-foreign
|
||||
# key: foreign
|
||||
# condition: t
|
||||
# --
|
||||
|
||||
foreign import ccall unsafe "src/bridge.c $1"
|
||||
$1 :: $2
|
||||
21
modules/home/users/crumb/emacs/snippets/nix-mode/__module
Normal file
21
modules/home/users/crumb/emacs/snippets/nix-mode/__module
Normal file
@@ -0,0 +1,21 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: Nix module
|
||||
# uuid:
|
||||
# key: __module
|
||||
# condition: t
|
||||
# expand-env: ((yas-indent-line 'fixed) (yas-wrap-around-region 'nil) (this-current-file-name (file-name-base (buffer-file-name (current-buffer)))))
|
||||
# --
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let cfg = config.${1:`this-current-file-name`};
|
||||
in {
|
||||
options.$1 = {
|
||||
enable = mkEnableOption "$2";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
$3
|
||||
};
|
||||
}
|
||||
7
modules/home/users/crumb/emacs/snippets/nix-mode/enable
Normal file
7
modules/home/users/crumb/emacs/snippets/nix-mode/enable
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: enable
|
||||
# uuid:
|
||||
# key: enable
|
||||
# condition: t
|
||||
# --
|
||||
enable = lib.mkEnableOption "$1";
|
||||
Reference in New Issue
Block a user