diff options
author | David Morgan <djm_uk@protonmail.com> | 2021-08-17 12:49:29 +0100 |
---|---|---|
committer | David Morgan <djm_uk@protonmail.com> | 2021-08-17 12:49:29 +0100 |
commit | 7e0dab42d7b74f293423e2a743cccffae38773ae (patch) | |
tree | 90d8ee208da49f1f6eebe77f134492ce67301479 /emacs-prelude/personal/lisp | |
parent | d0db5660caa836755ea8c99471d816484ea9e837 (diff) | |
download | dotfiles-7e0dab42d7b74f293423e2a743cccffae38773ae.tar.gz |
Remove emacs prelude config
Diffstat (limited to 'emacs-prelude/personal/lisp')
18 files changed, 0 insertions, 886 deletions
diff --git a/emacs-prelude/personal/lisp/init-clojure.el b/emacs-prelude/personal/lisp/init-clojure.el deleted file mode 100644 index a69b632..0000000 --- a/emacs-prelude/personal/lisp/init-clojure.el +++ /dev/null @@ -1,44 +0,0 @@ -(require 'init-lisp) - -(prelude-require-package 'yasnippet) -(use-package yasnippet - :diminish yas-minor-mode) - -(prelude-require-package 'flycheck-clj-kondo) -(use-package clojure-mode - :config - (require 'flycheck-clj-kondo)) - -(prelude-require-package 'clj-refactor) -(use-package clj-refactor - :diminish - :after yasnippet - :bind ("C-c '" . hydra-cljr-help-menu/body) - :config - (cljr-add-keybindings-with-prefix "C-c C-m") - (setq cljr-suppress-no-project-warning t) - :hook - (clojure-mode . - (lambda () - (clj-refactor-mode 1) - (yas-minor-mode 1)))) - -(use-package cider - :diminish - :after key-chord - :config - (setq cider-repl-pop-to-buffer-on-connect 'display-only - cider-repl-display-help-banner nil - cider-repl-history-highlight-current-entry t - cider-repl-history-highlight-inserted-item t - cider-repl-use-clojure-font-lock t - cider-repl-use-pretty-printing t - ;cider-invert-insert-eval-p t - ;cider-switch-to-repl-on-insert nil - cider-repl-history-file "~/.emacs.d/cider-history" - clojure-toplevel-inside-comment-form t) - (key-chord-define-global "??" 'cider-xref-fn-refs-select) - (key-chord-define-global "qq" 'cider-xref-fn-refs) - :hook (cider-repl-mode . (lambda () (display-line-numbers-mode -1)))) - -(provide 'init-clojure) diff --git a/emacs-prelude/personal/lisp/init-clojure.elc b/emacs-prelude/personal/lisp/init-clojure.elc deleted file mode 100644 index 026004a..0000000 --- a/emacs-prelude/personal/lisp/init-clojure.elc +++ /dev/null Binary files differdiff --git a/emacs-prelude/personal/lisp/init-completion.el b/emacs-prelude/personal/lisp/init-completion.el deleted file mode 100644 index 05b775b..0000000 --- a/emacs-prelude/personal/lisp/init-completion.el +++ /dev/null @@ -1,347 +0,0 @@ -(use-package emacs - :init - ;; for corfu - (setq completion-cycle-threshold 3) - (setq tab-always-indent 'complete) - - ;; for vertico - ;; Do not allow the cursor in the minibuffer prompt - (setq minibuffer-prompt-properties - '(read-only t cursor-intangible t face minibuffer-prompt)) - (add-hook 'minibuffer-setup-hook #'cursor-intangible-mode) - (setq enable-recursive-minibuffers t)) - -;; orderless is used by corfu and vertico -(prelude-require-package 'orderless) -(use-package orderless - :bind (:map minibuffer-local-completion-map - ("C-l" . my/match-components-literally)) - :custom (orderless-component-separator 'orderless-escapable-split-on-space) - :init - (setq completion-styles '(orderless basic) - completion-category-defaults nil - completion-category-overrides '((file (styles . (partial-completion orderless))))) - - (defun my/match-components-literally () - "Components match literally for the rest of the session." - (interactive) - (setq-local orderless-matching-styles '(orderless-literal) - orderless-style-dispatchers nil)) - :config - (defun flex-if-twiddle (pattern _index _total) - (when (string-suffix-p "~" pattern) - `(orderless-flex . ,(substring pattern 0 -1)))) - - (defun literal-if-hat (pattern _index _total) - (when (string-suffix-p "^" pattern) - `(orderless-literal . ,(substring pattern 0 -1)))) - - (defun literal-if-apostrophe (pattern _index _total) - (cond - ((equal "'" pattern) - '(orderless-literal . "")) - ((string-prefix-p "'" pattern) - `(orderless-literal . ,(substring pattern 1))))) - - (defun initialism-if-comma (pattern _index _total) - (cond - ((equal "," pattern) - '(orderless-literal . "")) - ((string-prefix-p "," pattern) - `(orderless-initialism . ,(substring pattern 1))))) - - (defun without-if-bang (pattern _index _total) - (cond - ((equal "!" pattern) - '(orderless-literal . "")) - ((string-prefix-p "!" pattern) - `(orderless-without-literal . ,(substring pattern 1))))) - - (setq orderless-matching-styles '(orderless-literal orderless-regexp orderless-strict-leading-initialism) - orderless-style-dispatchers '(flex-if-twiddle - literal-if-hat - literal-if-apostrophe - initialism-if-comma - without-if-bang))) - -(use-package savehist - :init - (savehist-mode)) - - -;; code completion - corfu -(prelude-require-package 'corfu) -(use-package corfu - ;; Optional customizations - :custom - (corfu-cycle t) ;; Enable cycling for `corfu-next/previous' - :bind (:map corfu-map - ("TAB" . corfu-next) - ([tab] . corfu-next) - ("S-TAB" . corfu-previous) - ([backtab] . corfu-previous)) - :init - (corfu-global-mode)) - -(prelude-require-package 'fancy-dabbrev) -(use-package fancy-dabbrev - :diminish - :config - (global-fancy-dabbrev-mode)) - -;; minibuffer completion - vertico et al -(prelude-require-package 'vertico) -(use-package vertico - :init - (vertico-mode) - (setq vertico-cycle t) - (advice-add #'vertico--format-candidate :around - (lambda (orig cand prefix suffix index) - (setq cand (funcall orig cand prefix suffix index)) - (concat - (if (= vertico--index index) - (propertize "» " 'face 'vertico-current) - " ") - cand))) - :config - (defun down-from-outside () - "Move to next candidate in minibuffer, even when minibuffer isn't selected." - (interactive) - (with-selected-window (active-minibuffer-window) - (execute-kbd-macro [down]))) - - (defun up-from-outside () - "Move to previous candidate in minibuffer, even when minibuffer isn't selected." - (interactive) - (with-selected-window (active-minibuffer-window) - (execute-kbd-macro [up]))) - - (defun preview-from-outside () - "Preview the selected candidate, even when minibuffer isn't selected." - (interactive) - (with-selected-window (active-minibuffer-window) - (execute-kbd-macro (kbd "M-.")))) - - (defun to-and-fro-minibuffer () - "Go back and forth between minibuffer and other window." - (interactive) - (if (window-minibuffer-p (selected-window)) - (select-window (minibuffer-selected-window)) - (select-window (active-minibuffer-window)))) - - (key-chord-define-global "XX" 'to-and-fro-minibuffer) - ;(key-chord-define-global ">>" 'preview-from-outside) - :bind (("C-M-<" . up-from-outside) - ("C-M->" . down-from-outside) - ("C-M-+" . preview-from-outside) - ("M-X" . to-and-fro-minibuffer) - ("C-M-S-g" . minibuffer-keyboard-quit))) - -(prelude-require-package 'consult) -(use-package consult - :after projectile - :bind (;; C-c bindings (mode-specific-map) - ("C-c h" . consult-history) - ("C-c m" . consult-mode-command) - ("C-c b" . consult-bookmark) - ("C-c k" . consult-kmacro) - ;; C-x bindings (ctl-x-map) - ("C-x M-:" . consult-complex-command) ;; orig. repeat-complex-command - ("C-x b" . consult-buffer) ;; orig. switch-to-buffer - ("C-x B" . consult-buffer-no-preview) ;; orig. switch-to-buffer - ("C-x 4 b" . consult-buffer-other-window) ;; orig. switch-to-buffer-other-window - ("C-x 5 b" . consult-buffer-other-frame) ;; orig. switch-to-buffer-other-frame - ;; Custom M-# bindings for fast register access - ("M-#" . consult-register-load) - ("M-'" . consult-register-store) ;; orig. abbrev-prefix-mark (unrelated) - ("C-M-#" . consult-register) - ;; Other custom bindings - ("C-S-s" . consult-line) - ("C-M-S" . consult-line-symbol-at-point) - ("M-y" . consult-yank-pop) ;; orig. yank-pop - ("<help> a" . consult-apropos) ;; orig. apropos-command - ;; M-g bindings (goto-map) - ("M-g e" . consult-compile-error) - ("M-g f" . consult-flycheck) - ("M-g g" . consult-goto-line) ;; orig. goto-line - ("M-g M-g" . consult-goto-line) ;; orig. goto-line - ("M-g o" . consult-outline) ;; Alternative: consult-org-heading - ("M-g m" . consult-mark) - ("M-g k" . consult-global-mark) - ("M-g i" . consult-imenu) - ("M-g I" . consult-project-imenu) - ;; C-c c bindings (search-map) - ("C-c c C-f" . consult-recent-file) - ("C-c c f" . consult-fd) - ("C-c c F" . consult-find) - ("C-c c L" . consult-locate) - ("C-c c g" . consult-grep) - ("C-c c G" . consult-git-grep) - ("C-c c r" . consult-ripgrep) - ("C-c r" . consult-ripgrep) - ("C-c c R" . consult-ripgrep-auto-preview) - ("C-c c M-r" . consult-ripgrep-unrestricted) - ("C-c c s" . consult-ripgrep-symbol-at-point) - ("C-c c l" . consult-line) - ("C-c c m" . consult-multi-occur) - ("C-c c k" . consult-keep-lines) - ("C-c c u" . consult-focus-lines) - ;; Isearch integration - ("C-c c e" . consult-isearch) - :map isearch-mode-map - ("M-e" . consult-isearch) ;; orig. isearch-edit-string - ("C-c c e" . consult-isearch) ;; orig. isearch-edit-string - ("C-c c l" . consult-line)) ;; needed by consult-line to detect isearch - - :init - - ;; Optionally configure the register formatting. This improves the register - ;; preview for `consult-register', `consult-register-load', - ;; `consult-register-store' and the Emacs built-ins. - (setq register-preview-delay 0 - register-preview-function #'consult-register-format) - - ;; Optionally tweak the register preview window. - ;; This adds thin lines, sorting and hides the mode line of the window. - (advice-add #'register-preview :override #'consult-register-window) - - ;; Optionally replace `completing-read-multiple' with an enhanced version. - (advice-add #'completing-read-multiple :override #'consult-completing-read-multiple) - - ;; Use Consult to select xref locations with preview - (setq xref-show-xrefs-function #'consult-xref - xref-show-definitions-function #'consult-xref) - - :config - - ;; Optionally configure preview. The default value - ;; is 'any, such that any key triggers the preview. - ;; (setq consult-preview-key 'any) - ;; (setq consult-preview-key (kbd "M-.")) - ;; (setq consult-preview-key (list (kbd "<S-down>") (kbd "<S-up>"))) - ;; For some commands and buffer sources it is useful to configure the - ;; :preview-key on a per-command basis using the `consult-customize' macro. - (consult-customize - consult-theme - :preview-key '(:debounce 0.2 any) - consult-ripgrep consult-git-grep consult-grep - consult-ripgrep-unrestricted consult-ripgrep-symbol-at-point - consult-bookmark consult-recent-file consult-xref consult-buffer-no-preview - consult--source-file consult--source-project-file consult--source-bookmark - :preview-key (kbd "M-.")) - - ;; Optionally configure the narrowing key. - ;; Both < and C-+ work reasonably well. - (setq consult-narrow-key "<") ;; (kbd "C-+") - - ;; Optionally make narrowing help available in the minibuffer. - ;; You may want to use `embark-prefix-help-command' or which-key instead. - ;; (define-key consult-narrow-map (vconcat consult-narrow-key "?") #'consult-narrow-help) - - (autoload 'projectile-project-root "projectile") - (setq consult-project-root-function #'projectile-project-root) - - (defvar consult-initial-narrow-config - '((consult-buffer . ?p) - (consult-buffer-no-preview . ?p))) - ;; Add initial narrowing hook - (defun consult-initial-narrow () - (when-let (key (alist-get this-command consult-initial-narrow-config)) - (setq unread-command-events (append unread-command-events (list key 32))))) - (add-hook 'minibuffer-setup-hook #'consult-initial-narrow) - - (defun consult-fd (&optional dir initial) - (interactive "P") - (let ((consult-find-command "fd --color=never --full-path ARG OPTS")) - (consult-find dir initial))) - (defun consult-ripgrep-symbol-at-point (&optional dir initial) - (interactive - (list prefix-arg (when-let ((s (symbol-at-point))) - (symbol-name s)))) - (consult-ripgrep dir initial)) - (defun consult-ripgrep-auto-preview (&optional dir initial) - (interactive "P") - (consult-ripgrep dir initial)) - (defun consult-ripgrep-unrestricted (&optional dir initial) - (interactive "P") - (let ((consult-ripgrep-command "rg --null --line-buffered --color=ansi --max-columns=1000 --smart-case --no-heading -uu --line-number . -e ARG OPTS")) - (consult-ripgrep dir initial))) - (defun consult-buffer-no-preview () - (interactive) - (consult-buffer)) - (defun consult-line-symbol-at-point () - (interactive) - (consult-line (thing-at-point 'symbol)))) - -(prelude-require-package 'consult-flycheck) -(use-package consult-flycheck) - -(prelude-require-package 'consult-lsp) -(use-package consult-lsp - :bind (:map lsp-mode-map - ([remap xref-find-apropos] . consult-lsp-symbols))) - -(prelude-require-package 'marginalia) -(use-package marginalia - :bind (("M-A" . marginalia-cycle) - :map minibuffer-local-map - ("M-A" . marginalia-cycle)) - :init - (marginalia-mode) - :config - ;; For Projectile - (add-to-list 'marginalia-prompt-categories '("Switch to project" . file)) - (add-to-list 'marginalia-prompt-categories '("Find file" . project-file)) - (add-to-list 'marginalia-prompt-categories '("Recently visited files" . project-file)) - (add-to-list 'marginalia-prompt-categories '("Switch to buffer" . buffer))) - -(prelude-require-package 'embark) -(use-package embark - :bind - (("C-." . embark-act) - ("C-;" . embark-dwim) - ("C-c C-o" . embark-export) - ("C-h b" . embark-bindings) - ("C-h B" . describe-bindings)) - :init - ;; Optionally replace the key help with a completing-read interface - (setq prefix-help-command #'embark-prefix-help-command) - :config - ;; Hide the mode line of the Embark live/completions buffers - (add-to-list 'display-buffer-alist - '("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*" - nil - (window-parameters (mode-line-format . none))))) - -(prelude-require-package 'embark-consult) -(use-package embark-consult - :after (embark consult) - :demand t ; only necessary if you have the hook below - ;; if you want to have consult previews as you move around an - ;; auto-updating embark collect buffer - :hook - (embark-collect-mode . consult-preview-at-point-mode)) - -;; async fuzzy finder (uses consult and orderless) -(prelude-require-package 'affe) -(use-package affe - :after orderless - :config - ;; Configure Orderless - (setq affe-regexp-function #'orderless-pattern-compiler - affe-highlight-function #'orderless--highlight) - ;; Manual preview key for `affe-grep' - (consult-customize affe-grep :preview-key (kbd "M-.")) - (defun my/affe-grep-symbol-at-point (&optional dir initial) - (interactive - (list prefix-arg (when-let ((s (symbol-at-point))) - (symbol-name s)))) - (affe-grep dir initial)) - :bind - (("C-#" . affe-grep) - ("C-~" . my/affe-grep-symbol-at-point) - ("C-c z" . affe-find)) - :custom - (affe-find-command "fd --color never -t f")) - -(provide 'init-completion) diff --git a/emacs-prelude/personal/lisp/init-completion.elc b/emacs-prelude/personal/lisp/init-completion.elc deleted file mode 100644 index 9e43339..0000000 --- a/emacs-prelude/personal/lisp/init-completion.elc +++ /dev/null Binary files differdiff --git a/emacs-prelude/personal/lisp/init-dashboard.el b/emacs-prelude/personal/lisp/init-dashboard.el deleted file mode 100644 index 538bc4c..0000000 --- a/emacs-prelude/personal/lisp/init-dashboard.el +++ /dev/null @@ -1,18 +0,0 @@ -(prelude-require-package 'dashboard) -(use-package dashboard - :init - (setq dashboard-center-content t - dashboard-startup-banner 'logo - dashboard-set-footer nil - dashboard-week-agenda t - dashboard-projects-backend 'projectile - dashboard-projects-switch-function 'projectile-persp-switch-project - dashboard-items '((recents . 15) - (bookmarks . 5) - (projects . 5) - (agenda . 5) - (registers . 5))) - :config - (dashboard-setup-startup-hook)) - -(provide 'init-dashboard) diff --git a/emacs-prelude/personal/lisp/init-git.el b/emacs-prelude/personal/lisp/init-git.el deleted file mode 100644 index 973b637..0000000 --- a/emacs-prelude/personal/lisp/init-git.el +++ /dev/null @@ -1,50 +0,0 @@ -(use-package magit - :after key-chord - :init - (defun my/magit-set-upstream () - (interactive) - (magit-shell-command-topdir "git upstream")) - ;; update stale git info on the modeline (based on code removed from doom modeline) - (defun my/magit-refresh-state () - (interactive) - (dolist (buf (buffer-list)) - (when (and (not (buffer-modified-p buf)) - (buffer-file-name buf) - (file-exists-p (buffer-file-name buf)) - (file-in-directory-p (buffer-file-name buf) (magit-toplevel))) - (with-current-buffer buf - (vc-refresh-state))))) - :config - (key-chord-define-global "UU" 'my/magit-set-upstream) - (key-chord-define-global "RR" 'my/magit-refresh-state) - ;; :custom-face - ;; (diff-added ((t (:foreground "green4")))) - ;; (magit-diff-added ((t (:foreground "green4")))) - ;; (magit-diff-added-highlight ((t (:foreground "green4")))) - ;; (diff-removed ((t (:foreground "red3")))) - ;; (magit-diff-removed ((t (:foreground "red3")))) - ;; (magit-diff-removed-highlight ((t (:foreground "red3")))) - :custom - (magit-diff-refine-hunk 'all) - ;; (magit-diff-paint-whitespace t) - ;; (magit-diff-paint-whitespace-lines 'all) - ;; (magit-diff-highlight-trailing t) - ;; (magit-diff-highlight-indentation t) - ) - -(prelude-require-package 'forge) -(use-package forge - :after magit) - -(prelude-require-package 'git-gutter) -(use-package git-gutter - :diminish - :bind - ("C-c j g" . git-gutter-mode) - ("C-c j S-g" . git-gutter) - ("C-c j n" . git-gutter:next-hunk) - ("C-c j p" . git-gutter:previous-hunk) - ("C-c j r" . git-gutter:revert-hunk) - ("C-c j d" . git-gutter:popup-hunk)) - -(provide 'init-git) diff --git a/emacs-prelude/personal/lisp/init-hydra.el b/emacs-prelude/personal/lisp/init-hydra.el deleted file mode 100644 index 666a147..0000000 --- a/emacs-prelude/personal/lisp/init-hydra.el +++ /dev/null @@ -1,4 +0,0 @@ -(prelude-require-package 'hydra) -(use-package hydra) - -(provide 'init-hydra) diff --git a/emacs-prelude/personal/lisp/init-lisp.el b/emacs-prelude/personal/lisp/init-lisp.el deleted file mode 100644 index e09c882..0000000 --- a/emacs-prelude/personal/lisp/init-lisp.el +++ /dev/null @@ -1,13 +0,0 @@ -(require 'init-paredit) - -(prelude-require-package 'eval-expr) -(use-package eval-expr - :bind ("M-:" . eval-expr) - :config - (defun eval-expr-minibuffer-setup () - (local-set-key (kbd "<tab>") #'completion-at-point) - (set-syntax-table emacs-lisp-mode-syntax-table) - (paredit-mode))) - -(provide 'init-lisp) - diff --git a/emacs-prelude/personal/lisp/init-lsp.el b/emacs-prelude/personal/lisp/init-lsp.el deleted file mode 100644 index 761ce49..0000000 --- a/emacs-prelude/personal/lisp/init-lsp.el +++ /dev/null @@ -1,31 +0,0 @@ -(use-package lsp-mode - :diminish - :after key-chord - :hook (clojure-mode . lsp) - :config - (setq ;gc-cons-threshold (* 100 1024 1024) - read-process-output-max (* 1024 1024) - lsp-ui-doc-delay 1 - lsp-lens-enable nil - lsp-ui-doc-enable t - lsp-ui-doc-show-with-cursor t - lsp-ui-doc-show-with-mouse t - lsp-headerline-breadcrumb-enable nil - lsp-enable-symbol-highlighting t - lsp-ui-sideline-show-diagnostics t - lsp-ui-sideline-show-code-actions nil - lsp-modeline-code-actions-enable nil - lsp-modeline-diagnostics-enable nil - lsp-ui-doc-position 'top - lsp-treemacs-theme "Iconless" - ;; user cider for indendation and completion instead - lsp-enable-indentation nil - lsp-completion-enable nil) - (key-chord-define-global "QQ" 'lsp-find-references) - (key-chord-define-global "PP" 'lsp-peek-find-references) - (key-chord-define-global "GG" 'lsp-find-definition) - (key-chord-define-global "DD" 'lsp-peek-find-definition)) - -(use-package lsp-treemacs) - -(provide 'init-lsp) diff --git a/emacs-prelude/personal/lisp/init-mac.el b/emacs-prelude/personal/lisp/init-mac.el deleted file mode 100644 index 26e4889..0000000 --- a/emacs-prelude/personal/lisp/init-mac.el +++ /dev/null @@ -1,7 +0,0 @@ -(when (eq system-type 'darwin) - (setq mac-option-modifier 'meta) - (setq mac-right-option-modifier 'none) - (setq mac-command-modifier 'super)) - -(provide 'init-mac) - diff --git a/emacs-prelude/personal/lisp/init-misc.el b/emacs-prelude/personal/lisp/init-misc.el deleted file mode 100644 index eb5507a..0000000 --- a/emacs-prelude/personal/lisp/init-misc.el +++ /dev/null @@ -1,46 +0,0 @@ -(prelude-require-package 'envrc) -(use-package envrc - :diminish - :config - (envrc-global-mode)) - -(prelude-require-package 'rg) -(use-package rg - :config - (rg-enable-default-bindings)) - -(prelude-require-package 'restclient) -(use-package restclient - :mode (("\\.http\\'" . restclient-mode))) - -(prelude-require-package 'es-mode) -(use-package es-mode - :mode "\.es\'") - -(prelude-require-package 'multi-vterm) -(use-package multi-vterm - :init (unbind-key "C-c t" prelude-mode-map) - :bind (("C-c t" . multi-vterm-next) - ("C-c C-M-t" . multi-vterm) - (:map vterm-mode-map - ("C-a" . vterm-send-C-a) ; TODO the crux binding is taking precedence - ("C-c C-a" . vterm-send-C-a) - ("M-[" . multi-vterm-prev) - ("M-]" . multi-vterm-next)))) - -(use-package dired - :ensure nil - :custom - (dired-kill-when-opening-new-dired-buffer t)) - -(prelude-require-package 'eshell-z) -(use-package eshell-z - :defer t - :hook (eshell-mode . (lambda () (require 'eshell-z)))) - -(prelude-require-package 'tagedit) -(use-package tagedit - :config (tagedit-add-paredit-like-keybindings) - :hook (html-mode . (lambda () (tagedit-mode 1)))) - -(provide 'init-misc) diff --git a/emacs-prelude/personal/lisp/init-modeline.el b/emacs-prelude/personal/lisp/init-modeline.el deleted file mode 100644 index b95eb80..0000000 --- a/emacs-prelude/personal/lisp/init-modeline.el +++ /dev/null @@ -1,33 +0,0 @@ -(prelude-require-package 'simple-modeline) - -(use-package simple-modeline - :hook (after-init . simple-modeline-mode) - :custom - (simple-modeline-segments - '((simple-modeline-segment-modified - simple-modeline-segment-buffer-name - simple-modeline-segment-position) - (simple-modeline-segment-minor-modes - simple-modeline-segment-vc - simple-modeline-segment-misc-info - simple-modeline-segment-process - simple-modeline-segment-major-mode)))) - -(prelude-require-package 'flycheck-indicator) -(use-package flycheck-indicator - :after flycheck - :hook (flycheck-mode . flycheck-indicator-mode) - :custom - (flycheck-indicator-icon-error 9632) - (flycheck-indicator-icon-info 9679) - (flycheck-indicator-icon-warning 9650) - (flycheck-indicator-status-icons - '((running . "◉") - (errored . "◙") - (finished . "●") - (interrupted . "◘") - (suspicious . "◘") - (no-checker . "○") - (not-checked . "○")))) - -(provide 'init-modeline) diff --git a/emacs-prelude/personal/lisp/init-paredit.el b/emacs-prelude/personal/lisp/init-paredit.el deleted file mode 100644 index 6eb20d8..0000000 --- a/emacs-prelude/personal/lisp/init-paredit.el +++ /dev/null @@ -1,27 +0,0 @@ -(defun add-hooks (modes func) - (dolist (mode modes) - (add-hook (intern (concat (symbol-name mode) "-hook")) func))) - -(setq lisp-modes - '(scheme-mode emacs-lisp-mode lisp-mode clojure-mode cider-repl-mode - eval-expression-minibuffer-setup ielm-mode lisp-interaction-mode)) - -(defun add-lisp-hook (func) - (add-hooks lisp-modes func)) - -(prelude-require-package 'paredit) -(use-package paredit - :diminish - :bind (([remap mark-sexp] . sp-mark-sexp) ;; sp does this better! - ("M-[" . paredit-wrap-square)) - :config - (add-lisp-hook #'turn-off-smartparens-mode) - (add-lisp-hook #'enable-paredit-mode)) - -(use-package paredit-functions - :after paredit - :ensure nil - :load-path "~/.emacs.d/personal/lisp/paredit-functions.el") - -(provide 'init-paredit) - diff --git a/emacs-prelude/personal/lisp/init-prelude.el b/emacs-prelude/personal/lisp/init-prelude.el deleted file mode 100644 index 436f90b..0000000 --- a/emacs-prelude/personal/lisp/init-prelude.el +++ /dev/null @@ -1,43 +0,0 @@ -;; config for misc packages included with prelude - -(use-package flycheck - :config - (global-flycheck-mode)) - -(use-package which-key - :diminish) - -(use-package whitespace - :diminish) - -(use-package smartparens - :diminish) - -(use-package subword - :diminish) - -(use-package ace-window - :diminish - :custom-face - (aw-leading-char-face - ((t (:foreground "white" :background "red" - :weight bold :height 2.5 :box (:line-width 10 :color "red")))))) - -(use-package crux - :init - (unbind-key "C-c s" prelude-mode-map) - (unbind-key "C-c r" prelude-mode-map) - (unbind-key "C-c o" prelude-mode-map) - :bind (:map prelude-mode-map - (("C-c C-s" . crux-swap-windows) - ("C-c C-r" . crux-rename-file-and-buffer)))) - -(use-package key-chord - :init - (key-chord-unset-global "jl") - (key-chord-define-global "LL" 'avy-goto-line) - (key-chord-define-global ",," 'avy-goto-char-in-line)) - -(diminish 'prelude-mode) - -(provide 'init-prelude) diff --git a/emacs-prelude/personal/lisp/init-projectile.el b/emacs-prelude/personal/lisp/init-projectile.el deleted file mode 100644 index e46e221..0000000 --- a/emacs-prelude/personal/lisp/init-projectile.el +++ /dev/null @@ -1,33 +0,0 @@ -(prelude-require-packages '(perspective persp-projectile ripgrep)) - -(use-package perspective - :init (persp-mode) - :custom (persp-modestring-short t)) - -(use-package persp-projectile) - -(use-package projectile - :diminish - :config - (def-projectile-commander-method ?B - "consult-buffer" - (progn - (setq unread-command-events (listify-key-sequence "p ")) - (consult-buffer))) - (def-projectile-commander-method ?r - "consult-ripgrep" - (consult-ripgrep)) - (def-projectile-commander-method ?p - "DWIM" - (cond ((> (length (projectile-project-buffer-names)) 4) (projectile-switch-to-buffer)) ;; TODO consult-buffer - ((> (length (projectile-recentf-files)) 0) (projectile-recentf)) - (t (projectile-find-file)))) - :custom - (projectile-switch-project-action 'projectile-commander)) - -(defun projectile-add-new-project (project-root) - (interactive (list (read-directory-name "Select project directory: " "~/src/"))) ;; TODO var - (projectile-add-known-project project-root) - (projectile-persp-switch-project project-root)) ;; TODO var - -(provide 'init-projectile) diff --git a/emacs-prelude/personal/lisp/init-ui.el b/emacs-prelude/personal/lisp/init-ui.el deleted file mode 100644 index a0d5cb1..0000000 --- a/emacs-prelude/personal/lisp/init-ui.el +++ /dev/null @@ -1,81 +0,0 @@ -(toggle-frame-maximized) - -(menu-bar-mode -1) -(tool-bar-mode -1) -(scroll-bar-mode -1) - -(prelude-require-package 'solarized-theme) -;(load-theme 'solarized-dark t) -(prelude-require-package 'modus-themes) - -;(setq modus-themes-syntax '(alt-syntax green-strings yellow-comments)) -(setq modus-themes-syntax '(green-strings yellow-comments) - modus-themes-paren-match '(bold intense underline) - ;modus-themes-diffs '(desaturated) - modus-themes-lang-checkers '(text-also background)) -(load-theme 'modus-vivendi t) - -(setq whitespace-line-column 120) - -(require 'hi-lock) -(defun my/toggle-highlight-symbol-at-point () - (interactive) - (if hi-lock-interactive-patterns - (unhighlight-regexp (car (car hi-lock-interactive-patterns))) - (highlight-symbol-at-point))) -(global-set-key (kbd "s-.") 'my/toggle-highlight-symbol-at-point) - -(unless (eq system-type 'darwin) - (prelude-require-package 'idle-highlight-mode) - (use-package idle-highlight-mode - :hook (prog-mode . idle-highlight-mode))) - -(use-package paren - :config - (show-paren-mode +1)) - -(global-set-key (kbd "C-x C-S-k") 'kill-this-buffer) - -(use-package miniedit - :commands minibuffer-edit - :init (miniedit-install)) - -(prelude-require-package 'ctrlf) -(use-package ctrlf - :init - (ctrlf-mode +1) - :bind - ("C-*" . ctrlf-forward-symbol-at-point) - ("M-s M-s" . ctrlf-toggle-symbol) - ("C-M-g" . ctrlf-cancel) - ("C-c o" . ctrlf-occur)) - -(prelude-require-package 'buffer-move) -(use-package buffer-move - :bind (("C-S-<up>" . buf-move-up) - ("C-S-<down>" . buf-move-down) - ("C-S-<left>" . buf-move-left) - ("C-S-<right>" . buf-move-right))) - -(prelude-require-package 'smartscan) -(use-package smartscan - :config - (global-smartscan-mode t) - :hook - (cider-repl-mode . (lambda () (smartscan-mode -1))) - (vterm-mode . (lambda () (smartscan-mode -1))) - (eshell-mode . (lambda () (smartscan-mode -1)))) - -;;(prelude-require-package 'fullframe) -;; (use-package fullframe -;; :after magit -;; :config -;; (fullframe magit-status magit-mode-quit-window)) - -(smartrep-define-key global-map - "C-x" '(("}" . enlarge-window-horizontally) - ("{" . shrink-window-horizontally) - ("^" . enlarge-window) - ("-" . shrink-window-if-larger-than-buffer))) - -(provide 'init-ui) diff --git a/emacs-prelude/personal/lisp/init-use-package.el b/emacs-prelude/personal/lisp/init-use-package.el deleted file mode 100644 index 35280f5..0000000 --- a/emacs-prelude/personal/lisp/init-use-package.el +++ /dev/null @@ -1,7 +0,0 @@ -(prelude-require-package 'use-package) -(require 'use-package) - -(setq use-package-always-ensure t) - -(provide 'init-use-package) - diff --git a/emacs-prelude/personal/lisp/paredit-functions.el b/emacs-prelude/personal/lisp/paredit-functions.el deleted file mode 100644 index 12fd4e0..0000000 --- a/emacs-prelude/personal/lisp/paredit-functions.el +++ /dev/null @@ -1,102 +0,0 @@ -(with-eval-after-load 'paredit -;; From emacswiki -(defun paredit-barf-all-the-way-backward () - (interactive) - (paredit-split-sexp) - (paredit-backward-down) - (paredit-splice-sexp)) - -(defun paredit-barf-all-the-way-forward () - (interactive) - (paredit-split-sexp) - (paredit-forward-down) - (paredit-splice-sexp) - (if (eolp) (delete-horizontal-space))) - -(defun paredit-slurp-all-the-way-backward () - (interactive) - (catch 'done - (while (not (bobp)) - (save-excursion - (paredit-backward-up) - (if (eq (char-before) ?\() - (throw 'done t))) - (paredit-backward-slurp-sexp)))) - -(defun paredit-slurp-all-the-way-forward () - (interactive) - (catch 'done - (while (not (eobp)) - (save-excursion - (paredit-forward-up) - (if (eq (char-after) ?\)) - (throw 'done t))) - (paredit-forward-slurp-sexp)))) - -(nconc paredit-commands - '("Extreme Barfage & Slurpage" - (("C-M-)") - paredit-slurp-all-the-way-forward - ("(foo (bar |baz) quux zot)" - "(foo (bar |baz quux zot))") - ("(a b ((c| d)) e f)" - "(a b ((c| d)) e f)")) - (("C-M-}" "M-F") - paredit-barf-all-the-way-forward - ("(foo (bar |baz quux) zot)" - "(foo (bar|) baz quux zot)")) - (("C-M-(") - paredit-slurp-all-the-way-backward - ("(foo bar (baz| quux) zot)" - "((foo bar baz| quux) zot)") - ("(a b ((c| d)) e f)" - "(a b ((c| d)) e f)")) - (("C-M-{" "M-B") - paredit-barf-all-the-way-backward - ("(foo (bar baz |quux) zot)" - "(foo bar baz (|quux) zot)")))) - -(paredit-define-keys) -(paredit-annotate-mode-with-examples) -(paredit-annotate-functions-with-examples) - -;; From bodil -;; Inverse M-( -(defun paredit-wrap-round-from-behind () - (interactive) - (forward-sexp -1) - (paredit-wrap-round) - (insert " ") - (forward-char -1)) -(eval-after-load "paredit" - '(define-key paredit-mode-map (kbd "M-)") - 'paredit-wrap-round-from-behind)) - -;; From bodil -;; Duplicate sexp -(defun paredit-duplicate-after-point - () - "Duplicates the content of the line that is after the point." - (interactive) - ;; skips to the next sexp - (while (looking-at " ") - (forward-char)) - (set-mark-command nil) - ;; while we find sexps we move forward on the line - (while (and (<= (point) (car (bounds-of-thing-at-point 'sexp))) - (not (= (point) (line-end-position)))) - (forward-sexp) - (while (looking-at " ") - (forward-char))) - (kill-ring-save (mark) (point)) - ;; go to the next line and copy the sexprs we encountered - (paredit-newline) - (set-mark-command nil) - (yank) - (exchange-point-and-mark))) -(eval-after-load "paredit" - '(define-key paredit-mode-map (kbd "C-c C-d") - 'paredit-duplicate-after-point)) - -(provide 'paredit-functions) - |