dotfiles-emacs/.emacs.d/config/dev.el

62 lines
2.3 KiB
EmacsLisp
Raw Normal View History

(use-package paredit
:ensure t
:config
(autoload 'enable-paredit-mode "paredit" "Turn on pseudo-structural editing of Lisp code." 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))
2019-07-10 23:27:54 +02:00
(use-package highlight-parentheses
:ensure t
:config
(global-highlight-parentheses-mode t))
(use-package rainbow-delimiters
:ensure t
:hook
(prog-mode . rainbow-delimiters-mode)
:custom-face
(rainbow-delimiters-depth-2-face ((t (:inherit rainbow-delimiters-base-face :foreground "cornflower blue"))))
(rainbow-delimiters-depth-3-face ((t (:inherit rainbow-delimiters-base-face :foreground "sandy brown"))))
(rainbow-delimiters-depth-4-face ((t (:inherit rainbow-delimiters-base-face :foreground "yellow green"))))
(rainbow-delimiters-depth-5-face ((t (:inherit rainbow-delimiters-base-face :foreground "powder blue"))))
(rainbow-delimiters-depth-6-face ((t (:inherit rainbow-delimiters-base-face :foreground "orchid"))))
(rainbow-delimiters-depth-7-face ((t (:inherit rainbow-delimiters-base-face :foreground "lemon chiffon"))))
(rainbow-delimiters-depth-8-face ((t (:inherit rainbow-delimiters-base-face :foreground "goldenrod"))))
(rainbow-delimiters-depth-9-face ((t (:inherit rainbow-delimiters-base-face :foreground "dark cyan")))))
2019-07-10 23:27:54 +02:00
;; Hack to show only files known to git inside dired; needs the
;; `git-find' shell script shim (taken from :open https://r0tty.org/git/dotfiles/emacs/tree/.emacs.d/config/development.el)
(defun git-dired (dir)
(interactive (list (read-directory-name "Find files in directory: " nil "" t)))
(let ((find-program "git-find"))
(find-dired dir "")))
;; enable flyspell checks for comments in code
(add-hook 'prog-mode-hook #'flyspell-prog-mode)
(use-package lsp-mode
:ensure t)
(use-package lsp-ui
:ensure t
:bind
("C-c i" . lsp-ui-doc-show)
:config
(setq lsp-ui-doc-position 'at-point)
(setq lsp-ui-doc-show-with-mouse nil))
2024-10-17 09:23:15 +02:00
(use-package yasnippet
:ensure t)
(use-package company
:ensure t
:bind (:map company-active-map
2024-10-17 09:22:56 +02:00
("RET" . nil)
("<return>" . nil)
("M-RET" . company-complete-selection)))