Update emacs prelude config
This commit is contained in:
parent
b5e8c2052c
commit
3fbaf48718
|
@ -3,12 +3,20 @@
|
|||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(org-agenda-files '("~/foo.org"))
|
||||
'(cider-xref-actions
|
||||
'(("find-def" . cider--find-var)
|
||||
("display-doc" . cider-doc-lookup)
|
||||
("lookup-on-clojuredocs" . cider-clojuredocs-lookup)))
|
||||
'(company-quickhelp-color-background "#4F4F4F")
|
||||
'(company-quickhelp-color-foreground "#DCDCCC")
|
||||
'(org-agenda-files nil)
|
||||
'(package-selected-packages
|
||||
'(hydra helm-projectile counsel-projectile ivy-hydra easy-kill-extras paredit-functions eval-expr lsp clj-refactor flycheck-clj-kondo yasnippet paredit dashboard doom-modeline minions all-the-icons helm emacs-dashboard company-quickhelp company-box company-prescient ivy-prescient yaml-mode web-mode lsp-ui lsp-mode json-mode js2-mode rainbow-mode elisp-slime-nav cider clojure-mode rainbow-delimiters company counsel swiper ivy exec-path-from-shell zop-to-char zenburn-theme which-key volatile-highlights undo-tree super-save smartrep smartparens operate-on-number nlinum move-text magit projectile imenu-anywhere hl-todo guru-mode gitignore-mode gitconfig-mode git-timemachine gist flycheck expand-region epl editorconfig easy-kill diminish diff-hl discover-my-major crux browse-kill-ring anzu ag ace-window)))
|
||||
'(solarized-theme flycheck-indicator simple-modeline miniedit smart-mode-line ivy-rich prelude subword-mode smartparens-mode projectile-mode prelude-mode rg f equake forge vterm dash magit-section markdown-mode popup s transient envrc hydra counsel-projectile ivy-hydra easy-kill-extras paredit-functions eval-expr lsp clj-refactor flycheck-clj-kondo yasnippet paredit dashboard emacs-dashboard company-quickhelp company-box company-prescient ivy-prescient yaml-mode web-mode lsp-ui lsp-mode json-mode js2-mode rainbow-mode elisp-slime-nav cider clojure-mode rainbow-delimiters company counsel swiper ivy exec-path-from-shell zop-to-char zenburn-theme which-key volatile-highlights undo-tree super-save smartrep smartparens operate-on-number nlinum move-text magit projectile imenu-anywhere hl-todo guru-mode gitignore-mode gitconfig-mode git-timemachine gist flycheck expand-region epl editorconfig easy-kill diminish diff-hl discover-my-major crux browse-kill-ring anzu ag ace-window))
|
||||
'(pdf-view-midnight-colors '("#DCDCCC" . "#383838")))
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(aw-leading-char-face ((t (:foreground "white" :background "red" :weight bold :height 2.5 :box (:line-width 10 :color "red"))))))
|
||||
'(aw-leading-char-face ((t (:foreground "white" :background "red" :weight bold :height 2.5 :box (:line-width 10 :color "red")))))
|
||||
'(hi-yellow ((t (:background "yellow")))))
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
(prelude-require-package 'yasnippet)
|
||||
(use-package yasnippet
|
||||
:diminish yas)
|
||||
:diminish yas-minor-mode)
|
||||
|
||||
(prelude-require-package 'flycheck-clj-kondo)
|
||||
(use-package clojure-mode
|
||||
|
@ -12,6 +12,7 @@
|
|||
(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")
|
||||
|
@ -23,13 +24,18 @@
|
|||
(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-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
|
||||
clojure-toplevel-inside-comment-form t)
|
||||
(key-chord-define-global "??" 'cider-xref-fn-refs-select)
|
||||
(key-chord-define-global "qq" 'cider-xref-fn-refs))
|
||||
|
||||
(provide 'init-clojure)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
:hook (after-init . company-tng-mode)
|
||||
:config
|
||||
(global-company-mode)
|
||||
(setq company-idle-delay 0.3
|
||||
(setq ;company-idle-delay 0.3
|
||||
company-selection-wrap-around t
|
||||
company-show-numbers t
|
||||
company-tooltip-align-annotations t
|
||||
|
@ -22,48 +22,15 @@
|
|||
:hook (company-mode . company-box-mode)
|
||||
:config
|
||||
(setq company-box-backends-colors nil ;; TODO why?
|
||||
company-box-doc-delay 0.3))
|
||||
|
||||
(prelude-require-package 'ivy-prescient)
|
||||
(use-package ivy-prescient
|
||||
:diminish
|
||||
:config
|
||||
(ivy-prescient-mode 1))
|
||||
;company-box-doc-delay 0.3
|
||||
))
|
||||
|
||||
(prelude-require-package 'company-prescient)
|
||||
(use-package company-prescient
|
||||
:diminish
|
||||
:config
|
||||
(company-prescient-mode 1))
|
||||
|
||||
(use-package counsel
|
||||
:diminish ivy-mode counsel-mode
|
||||
:config
|
||||
(setq counsel-grep-base-command "rg -i -M 120 --no-heading --line-number --color never '%s' %s"
|
||||
counsel-rg-base-command "rg -i -M 120 --no-heading --line-number --color never '%s' %s")
|
||||
:bind (("C-c h" . counsel-command-history)
|
||||
;("C-c i" . counsel-git)
|
||||
;("C-c j" . counsel-git-grep)
|
||||
("C-c c g" . counsel-grep)
|
||||
("C-c c r" . counsel-rg)
|
||||
("C-c c o" . counsel-outline)
|
||||
("C-c z" . counsel-fzf)
|
||||
("C-c c z" . counsel-fzf)
|
||||
("C-c c a" . counsel-apropos)
|
||||
("C-c c f" . counsel-recentf)
|
||||
("C-c C-f" . counsel-recentf)
|
||||
:map counsel-mode-map
|
||||
([remap swiper] . counsel-grep-or-swiper)
|
||||
([remap swiper-backward] . counsel-grep-or-swiper-backward)
|
||||
;([remap recentf-open-files] . counsel-recentf)
|
||||
([remap dired] . counsel-dired))
|
||||
:hook ((after-init . ivy-mode)
|
||||
(ivy-mode . counsel-mode)))
|
||||
|
||||
(prelude-require-package 'counsel-projectile)
|
||||
(use-package counsel-projectile
|
||||
:config
|
||||
(counsel-projectile-mode))
|
||||
(company-prescient-mode 1)
|
||||
(prescient-persist-mode +1))
|
||||
|
||||
(provide 'init-completion)
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
:init
|
||||
(setq dashboard-center-content t
|
||||
dashboard-set-footer nil
|
||||
dashboard-items '((recents . 5)
|
||||
dashboard-items '((recents . 15)
|
||||
(bookmarks . 5)
|
||||
(projects . 5)
|
||||
(agenda . 5)
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
(defun magit-set-upstream ()
|
||||
(interactive)
|
||||
(magit-shell-command-topdir "git upstream"))
|
||||
|
||||
(use-package magit
|
||||
:after key-chord
|
||||
:config
|
||||
(key-chord-define-global "UU" 'magit-set-upstream))
|
||||
; :bind (("C-c g y" . magit-upstream))) ;; TODO
|
||||
|
||||
(use-package forge
|
||||
:after magit)
|
||||
|
||||
(provide 'init-git)
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
(prelude-require-package 'ivy-prescient)
|
||||
(use-package ivy-prescient
|
||||
:diminish
|
||||
:config
|
||||
(ivy-prescient-mode 1))
|
||||
|
||||
(prelude-require-package 'ivy-rich)
|
||||
(use-package ivy-rich
|
||||
:config
|
||||
(setcdr (assq t ivy-format-functions-alist) #'ivy-format-function-line)
|
||||
(ivy-rich-mode 1))
|
||||
|
||||
(use-package counsel
|
||||
:diminish ivy-mode counsel-mode
|
||||
:config
|
||||
(setq ;counsel-grep-base-command "rg -i -M 120 --no-heading --line-number --color never '%s' %s"
|
||||
counsel-rg-base-command "rg -S -M 120 --no-heading --line-number --color never %s .")
|
||||
:bind (("C-c h" . counsel-command-history)
|
||||
;("C-c i" . counsel-git)
|
||||
;("C-c j" . counsel-git-grep)
|
||||
("C-c c g" . counsel-grep)
|
||||
("C-c c r" . counsel-rg)
|
||||
("C-c c o" . counsel-outline)
|
||||
("C-c z" . counsel-fzf)
|
||||
("C-c c z" . counsel-fzf)
|
||||
("C-c c a" . counsel-apropos)
|
||||
("C-c c f" . counsel-recentf)
|
||||
("C-c C-f" . counsel-recentf)
|
||||
:map counsel-mode-map
|
||||
([remap swiper] . counsel-grep-or-swiper)
|
||||
([remap swiper-backward] . counsel-grep-or-swiper-backward)
|
||||
;([remap recentf-open-files] . counsel-recentf)
|
||||
([remap dired] . counsel-dired))
|
||||
:hook ((after-init . ivy-mode)
|
||||
(ivy-mode . counsel-mode)))
|
||||
|
||||
(defun counsel-projectile-rg-glob ()
|
||||
(interactive)
|
||||
(let ((glob (ivy-completing-read "Glob?: " '("*.cljs"
|
||||
"*.clj"
|
||||
"*.md"
|
||||
"*.css"))))
|
||||
(counsel-projectile-rg (concat "--glob " glob))))
|
||||
|
||||
(prelude-require-package 'counsel-projectile)
|
||||
(use-package counsel-projectile
|
||||
:config
|
||||
(counsel-projectile-mode)
|
||||
:bind (:map projectile-mode-map
|
||||
("C-c p s R" . counsel-projectile-rg-glob)))
|
||||
|
||||
(provide 'init-ivy)
|
||||
|
|
@ -15,9 +15,11 @@
|
|||
lsp-ui-sideline-show-code-actions nil
|
||||
lsp-modeline-code-actions-enable nil ;; TODO this causes errors in *Messages* if t
|
||||
lsp-modeline-diagnostics-enable nil
|
||||
lsp-ui-doc-position 'top
|
||||
;; user cider for indendation and completion instead
|
||||
lsp-enable-indentation nil
|
||||
lsp-completion-enable nil))
|
||||
lsp-completion-enable nil)
|
||||
(key-chord-define-global "QQ" 'lsp-find-references)) ;; TODO?
|
||||
|
||||
(provide 'init-lsp)
|
||||
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
(when (eq system-type 'darwin)
|
||||
(setq mac-option-modifier 'meta)
|
||||
(setq mac-right-option-modifier 'none)
|
||||
(setq mac-command-modifier 'super))
|
||||
|
||||
(provide 'init-mac)
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
(prelude-require-package 'envrc)
|
||||
(use-package envrc
|
||||
:diminish
|
||||
:config
|
||||
(envrc-global-mode))
|
||||
|
||||
(prelude-require-package 'rg)
|
||||
(use-package rg
|
||||
:config
|
||||
(rg-enable-default-bindings))
|
||||
|
||||
|
||||
(provide 'init-misc)
|
||||
|
|
@ -1,14 +1,24 @@
|
|||
(prelude-require-package 'doom-modeline)
|
||||
(use-package doom-modeline
|
||||
:hook (after-init . doom-modeline-mode)
|
||||
:config ;(add-hook 'after-init-hook #'doom-modeline-mode)
|
||||
(setq doom-modeline-minor-modes t
|
||||
doom-modeline-major-mode-icon t))
|
||||
(prelude-require-package 'simple-modeline)
|
||||
|
||||
(prelude-require-package 'minions)
|
||||
(use-package minions
|
||||
:hook (doom-modeline-mode . minions-mode))
|
||||
(use-package simple-modeline
|
||||
:hook (after-init . simple-modeline-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)
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
;; config for misc packages included with prelude
|
||||
|
||||
(use-package flycheck
|
||||
:diminish
|
||||
:config
|
||||
(global-flycheck-mode))
|
||||
|
||||
|
@ -11,6 +10,15 @@
|
|||
(use-package whitespace
|
||||
:diminish)
|
||||
|
||||
(use-package projectile
|
||||
:diminish)
|
||||
|
||||
(use-package smartparens
|
||||
:diminish)
|
||||
|
||||
(use-package subword
|
||||
:diminish)
|
||||
|
||||
(use-package ace-window
|
||||
:diminish
|
||||
:custom-face
|
||||
|
@ -18,5 +26,11 @@
|
|||
((t (:foreground "white" :background "red"
|
||||
:weight bold :height 2.5 :box (:line-width 10 :color "red"))))))
|
||||
|
||||
;; allow other things to use C-c s
|
||||
(define-key prelude-mode-map (kbd "C-c s") nil)
|
||||
(define-key prelude-mode-map (kbd "C-c S") 'crux-swap-windows)
|
||||
|
||||
(diminish 'prelude-mode)
|
||||
|
||||
(provide 'init-prelude)
|
||||
|
||||
|
|
|
@ -1,16 +1,32 @@
|
|||
;(prelude-require-package 'all-the-icons)
|
||||
|
||||
(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)
|
||||
;(set-face-background 'hi-yellow "yellow")
|
||||
|
||||
(setq whitespace-line-column 120)
|
||||
|
||||
(require 'hi-lock)
|
||||
(defun 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-.") 'toggle-highlight-symbol-at-point)
|
||||
|
||||
(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))
|
||||
|
||||
(provide 'init-ui)
|
||||
|
||||
|
|
|
@ -1,16 +1,19 @@
|
|||
(add-to-list 'load-path (expand-file-name "personal/lisp" user-emacs-directory))
|
||||
|
||||
;; TODO persp/perspective/projectile-persp, dired/counsel-dired/..?, lsp-ivy
|
||||
(require 'init-use-package)
|
||||
(require 'init-prelude)
|
||||
(require 'init-ui)
|
||||
(require 'init-hydra)
|
||||
(require 'init-modeline)
|
||||
;(require 'init-dashboard)
|
||||
(require 'init-dashboard)
|
||||
(require 'init-completion)
|
||||
(require 'init-ivy)
|
||||
(require 'init-lisp)
|
||||
(require 'init-clojure)
|
||||
(require 'init-lsp)
|
||||
(require 'init-git)
|
||||
(require 'init-mac)
|
||||
(require 'init-misc)
|
||||
|
||||
(global-unset-key (kbd "<left>"))
|
||||
(global-unset-key (kbd "<right>"))
|
||||
|
|
Loading…
Reference in New Issue