Browse Source

Add swiper, fix problems with delimiters, improve lisp config.

master
Taylor Bockman 2 years ago
parent
commit
9d3155ac3d
  1. 2
      elisp/custom.el
  2. 15
      elisp/modes/default-modes.el
  3. 40
      elisp/modes/lisp-mode-settings.el
  4. 21
      elisp/ui.el

2
elisp/custom.el

@ -4,7 +4,7 @@
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(package-selected-packages
'(exwm-config all-the-icons-ibuffer slime ivy zerodark-theme zerodark neotree all-the-icons paredit flycheck aggressive-indent aggressive-indent-mode lsp-python-ms py-autopep8 pyenv-mode elpy lsp-ui use-package)))
'(counsel rainbow-identifiers exwm-config all-the-icons-ibuffer slime ivy zerodark-theme zerodark neotree all-the-icons paredit flycheck aggressive-indent aggressive-indent-mode lsp-python-ms py-autopep8 pyenv-mode elpy lsp-ui use-package)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.

15
elisp/modes/default-modes.el

@ -1,8 +1,9 @@
;; Default mode definitions.
;; Force code to always be indented correctly.
(use-package aggressive-indent
:ensure t)
;; Easier to identify identifiers
(use-package rainbow-identifiers
:ensure t
:hook ((prog-mode-hook . rainbow-identifiers-mode)))
;; Flycheck is enabled globally.
(use-package flycheck
@ -19,11 +20,6 @@
:bind-keymap
("C-c p" . projectile-command-map))
(use-package ivy
:ensure t
:config
(ivy-mode 1))
(use-package lsp-mode
:ensure t
:hook ((python-mode . lsp-deferred))
@ -33,8 +29,5 @@
:ensure t
:hook (lsp-mode . lsp-ui-mode))
(use-package rainbow-delimiters
:ensure t)
(with-eval-after-load 'magit-mode
(add-hook 'after-save-hook 'magit-after-save-refresh-status t))

40
elisp/modes/lisp-mode-settings.el

@ -3,7 +3,28 @@
;; script)
(use-package paredit
:ensure t)
:ensure t
:hook ((emacs-lisp-mode . enable-paredit-mode)
(eval-expression-minibuffer-setup . enable-paredit-mode)
(ielm-mode . enable-paredit-mode)
(lisp-mode . enable-paredit-mode)
(lisp-interaction-mode . enable-paredit-mode)
(scheme-mode . enable-paredit-mode)))
(use-package rainbow-delimiters
:ensure t
:hook ((clojure-mode . rainbow-delimiters-mode)
(lisp-mode . rainbow-delimiters-mode)
(scheme-mode . rainbow-delimiters-mode)
(emacs-lisp-mode . rainbow-delimiters-mode)))
;; Force code to always be indented correctly.
(use-package aggressive-indent
:ensure t
:hook ((emacs-lisp-mode . aggressive-indent-mode)
(lisp-mode . aggressive-indent-mode)
(scheme-mode . aggressive-indent-mode)
(clojure-mode . aggressive-indent-mode)))
(use-package slime
:ensure t
@ -18,23 +39,6 @@
;; Enable paredit for lisp
(autoload 'enable-paredit-mode "paredit" "Turn on pseudo-structural editing of Lisp code." t)
(add-hook 'emacs-lisp-mode-hook #'enable-paredit-mode)
(add-hook 'eval-expression-minibuffer-setup-hook #'enable-paredit-mode)
(add-hook 'ielm-mode-hook #'enable-paredit-mode)
(add-hook 'lisp-mode-hook #'enable-paredit-mode)
(add-hook 'lisp-interaction-mode-hook #'enable-paredit-mode)
(add-hook 'scheme-mode-hook #'enable-paredit-mode)
(add-hook 'clojure-mode-hook 'rainbow-delimiters-mode)
(add-hook 'lisp-mode-hook 'rainbow-delimiters-mode)
(add-hook 'scheme-mode-hook 'rainbow-delimiters-mode)
(add-hook 'emacs-lisp-mode-hook 'rainbow-delimiters-mode)
;; Only enable aggressive indent on lisp-likes
(add-hook 'emacs-lisp-mode-hook #'aggressive-indent-mode)
(add-hook 'lisp-mode-hook #'aggressive-indent-mode)
(add-hook 'scheme-mode-hook #'aggressive-indent-mode)
(add-hook 'clojure-mode-hook #'aggressive-indent-mode)
;; Autoload the indent function
(autoload 'common-lisp-indent-function "cl-indent" "Common Lisp indent.")

21
elisp/ui.el

@ -9,6 +9,27 @@
;; Enable column numbers
(column-number-mode 1)
;; Ivy
(use-package ivy
:ensure t
:config
(ivy-mode 1)
(setq ivy-use-virtual-buffers t)
(setq enable-recursive-minibuffers t)
(setq ivy-use-selectable-prompt t))
;; Swiper to replace ISearch
(use-package swiper
:ensure t
:bind (("C-s" . swiper)))
;; Counsel to force other stuff in emacs to use
;; ivy for completion
(use-package counsel
:ensure t
:config
(counsel-mode 1))
;; Enable semantic for language-aware editing commands
(setq semantic-mode 't)

Loading…
Cancel
Save