Port configuration from programming module
This commit is contained in:
parent
28f6ca7dcd
commit
b17f98a06a
38
config.el
38
config.el
@ -65,6 +65,9 @@
|
||||
:inherit avy-lead-face)
|
||||
`(avy-lead-face-2 :foreground ,avy-lead-face-2-fg
|
||||
:inherit avy-lead-face))))
|
||||
(after! symbol-overlay
|
||||
(custom-theme-set-faces! nil
|
||||
'(symbol-overlay-default-face :inherit hl-line)))
|
||||
|
||||
;; This determines the style of line numbers in effect. If set to `nil', line
|
||||
;; numbers are disabled. For relative line numbers, set this to `relative'.
|
||||
@ -233,10 +236,20 @@
|
||||
:desc "VTerm" "t" #'+vterm/other-window
|
||||
:desc "VTerm (same window)" "T" #'+vterm/here)))
|
||||
|
||||
;; Tab key should indent and absolutely nothing more.
|
||||
(after! yasnippet
|
||||
(map! (:map yas-minor-mode-map
|
||||
"<tab>" nil
|
||||
"TAB" nil
|
||||
"<C-return>" #'yas-expand)))
|
||||
|
||||
;; -----------------------------------------------------------------------------
|
||||
;; Configuration for additional packages on top of doom and its modules.
|
||||
;; -----------------------------------------------------------------------------
|
||||
|
||||
;; Nicer box comments.
|
||||
(use-package! box-comments
|
||||
:bind (("C-x C-'" . +x-box-comment/box-comment)))
|
||||
|
||||
;; A nicer interface for ripgrep. Note that since doom required rg we don't
|
||||
;; consider the case if it's not installed.
|
||||
@ -253,12 +266,26 @@
|
||||
"Open the result in other window without changing to it."
|
||||
(interactive)
|
||||
(save-selected-window (deadgrep-visit-result-other-window)))
|
||||
"<RET>" #'deadgrep-visit-result-other-window)))
|
||||
"RET" #'deadgrep-visit-result-other-window)))
|
||||
|
||||
;; Duplicate things.
|
||||
(use-package! duplicate-thing
|
||||
:bind (("M-C" . duplicate-thing)))
|
||||
|
||||
;; Navigate betweeon occurences of the same symbol.
|
||||
(use-package! symbol-overlay
|
||||
:bind (("M-RET" . symbol-overlay-put)
|
||||
("M-n" . symbol-overlay-switch-forward)
|
||||
("M-p" . symbol-overlay-switch-backward)
|
||||
("<C-M-return>" . symbol-overlay-remove-all))
|
||||
:hook (prog-mode . symbol-overlay-mode)
|
||||
:config
|
||||
;; Since we're reusing colours from orderless which only has four faces.
|
||||
(setq symbol-overlay-faces '(orderless-match-face-0
|
||||
orderless-match-face-1
|
||||
orderless-match-face-2
|
||||
orderless-match-face-3)))
|
||||
|
||||
;; It's the 21st century, a file explorer should be pretty.
|
||||
(use-package! treemacs-icons-dired
|
||||
:after dired
|
||||
@ -274,6 +301,13 @@
|
||||
(use-package! x-lib
|
||||
:defer t)
|
||||
|
||||
;; Load `yank-indent' without deferring.
|
||||
(use-package! yank-indent
|
||||
:config
|
||||
(advice-add 'yank :after #'+x-yank-indent-a)
|
||||
(advice-add 'yank-pop :after #'+x-yank-indent-a)
|
||||
(advice-add 'consult-yank-pop :after #'+x-yank-indent-a))
|
||||
|
||||
;; -----------------------------------------------------------------------------
|
||||
;; Global configuration.
|
||||
;; -----------------------------------------------------------------------------
|
||||
@ -309,6 +343,8 @@
|
||||
(defalias #'end-of-visual-line #'end-of-line)
|
||||
(defalias #'beginning-of-visual-line #'beginning-of-line)
|
||||
|
||||
;; Enable the fill column indicator.
|
||||
(add-hook 'prog-mode-hook #'display-fill-column-indicator-mode)
|
||||
|
||||
;; -----------------------------------------------------------------------------
|
||||
;; Global keybindings.
|
||||
|
@ -12,10 +12,13 @@
|
||||
:recipe (:local-repo "repos/x-lib"))
|
||||
(package! deadgrep)
|
||||
(package! duplicate-thing)
|
||||
(package! symbol-overlay)
|
||||
(package! treemacs-icons-dired)
|
||||
(package! whole-line-or-region)
|
||||
(package! x-lib
|
||||
:recipe (:local-repo "repos/x-lib"))
|
||||
(package! yank-indent
|
||||
:recipe (:local-repo "repos/x-lib"))
|
||||
|
||||
;; To install a package directly from a remote git repo, you must specify a
|
||||
;; `:recipe'. You'll find documentation on what `:recipe' accepts here:
|
||||
|
Loading…
Reference in New Issue
Block a user