mirror of
https://codeberg.org/scip/dot-emacs.git
synced 2026-08-23 21:24:18 +02:00
Compare commits
3 Commits
f7ba06bdbb
...
586caeffba
| Author | SHA1 | Date | |
|---|---|---|---|
| 586caeffba | |||
| 1907af8f1d | |||
| a6ae2d862e |
@@ -7,7 +7,9 @@
|
||||
:config
|
||||
(setq gofmt-args '("-s"))
|
||||
(setq tab-width 4)
|
||||
;; (setq indent-tabs-mode 1)
|
||||
|
||||
;; by default this runs godef-jump, but I like consult-imenu much more
|
||||
(unbind-key "C-c C-j" go-mode-map)
|
||||
|
||||
:init
|
||||
;; disabled, I'm now trying lsp-mode, see below:
|
||||
@@ -20,13 +22,7 @@
|
||||
(add-hook 'before-save-hook #'lsp-organize-imports t t))
|
||||
|
||||
(add-hook 'go-mode-hook #'lsp-deferred)
|
||||
(add-hook 'go-mode-hook #'lsp-go-install-save-hooks)
|
||||
;; (add-hook 'go-mode-hook #'ivy-mode)
|
||||
|
||||
;; overwrite dump-jump settions here
|
||||
;; (bind-key* (kbd "C-c j") #'lsp-find-definition)
|
||||
;; (bind-key* (kbd "C-c b") #'xref-pop-marker-stack)
|
||||
)
|
||||
(add-hook 'go-mode-hook #'lsp-go-install-save-hooks))
|
||||
|
||||
:bind (:map go-mode-map
|
||||
("C-c j" . #'lsp-find-definition)
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
("C-c D" . tvd-lsp-doc-toggle))
|
||||
|
||||
:init
|
||||
(setq lsp-ui-doc-enable nil ;; enable on the fly with "C-c D"
|
||||
(setq lsp-ui-doc-enable t ;; enable on the fly with "C-c D"
|
||||
lsp-ui-doc-use-webkit nil
|
||||
lsp-ui-doc-header t
|
||||
lsp-ui-doc-delay 0.2
|
||||
|
||||
@@ -104,8 +104,6 @@ a remote file anytime and from everywhere I am by just entering :"
|
||||
("TAB" . #'minibuffer-complete)))
|
||||
|
||||
|
||||
|
||||
|
||||
(use-package orderless
|
||||
:init
|
||||
;; I am using the actual orderless completion style as a last
|
||||
@@ -132,8 +130,6 @@ a remote file anytime and from everywhere I am by just entering :"
|
||||
completion-ignore-case t))
|
||||
|
||||
|
||||
|
||||
(when nil
|
||||
(use-package embark
|
||||
:ensure t
|
||||
|
||||
@@ -143,7 +139,6 @@ a remote file anytime and from everywhere I am by just entering :"
|
||||
|
||||
|
||||
:init
|
||||
|
||||
;; Optionally replace the key help with a completing-read interface
|
||||
(setq prefix-help-command #'embark-prefix-help-command)
|
||||
|
||||
@@ -153,14 +148,51 @@ a remote file anytime and from everywhere I am by just entering :"
|
||||
;; (setq eldoc-documentation-strategy #'eldoc-documentation-compose-eagerly)
|
||||
|
||||
: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))))))
|
||||
(window-parameters (mode-line-format . none))))
|
||||
|
||||
|
||||
(defun embark-which-key-indicator ()
|
||||
"An embark indicator that displays keymaps using which-key.
|
||||
The which-key help message will show the type and value of the
|
||||
current target followed by an ellipsis if there are further
|
||||
targets."
|
||||
(lambda (&optional keymap targets prefix)
|
||||
(if (null keymap)
|
||||
(which-key--hide-popup-ignore-command)
|
||||
(which-key--show-keymap
|
||||
(if (eq (plist-get (car targets) :type) 'embark-become)
|
||||
"Become"
|
||||
(format "Act on %s '%s'%s"
|
||||
(plist-get (car targets) :type)
|
||||
(embark--truncate-target (plist-get (car targets) :target))
|
||||
(if (cdr targets) "…" "")))
|
||||
(if prefix
|
||||
(pcase (lookup-key keymap prefix 'accept-default)
|
||||
((and (pred keymapp) km) km)
|
||||
(_ (key-binding prefix 'accept-default)))
|
||||
keymap)
|
||||
nil nil t (lambda (binding)
|
||||
(not (string-suffix-p "-argument" (cdr binding))))))))
|
||||
|
||||
(setq embark-indicators
|
||||
'(embark-which-key-indicator
|
||||
embark-highlight-indicator
|
||||
embark-isearch-highlight-indicator))
|
||||
|
||||
(defun embark-hide-which-key-indicator (fn &rest args)
|
||||
"Hide the which-key indicator immediately when using the completing-read prompter."
|
||||
(which-key--hide-popup-ignore-command)
|
||||
(let ((embark-indicators
|
||||
(remq #'embark-which-key-indicator embark-indicators)))
|
||||
(apply fn args)))
|
||||
|
||||
(advice-add #'embark-completing-read-prompter
|
||||
:around #'embark-hide-which-key-indicator))
|
||||
|
||||
(use-package consult
|
||||
;; Replace bindings. Lazily loaded due by `use-package'.
|
||||
:bind (;; C-c bindings in `mode-specific-map'
|
||||
@@ -210,12 +242,9 @@ a remote file anytime and from everywhere I am by just entering :"
|
||||
("C-x C-d" . consult-dir)))
|
||||
|
||||
|
||||
|
||||
(when nil
|
||||
(use-package
|
||||
embark-consult
|
||||
:after (embark consult)))
|
||||
|
||||
:after (embark consult))
|
||||
|
||||
|
||||
;; Persist history over Emacs restarts. Vertico sorts by history position.
|
||||
@@ -253,6 +282,5 @@ a remote file anytime and from everywhere I am by just entering :"
|
||||
(global-set-key "\C-s" 'swiper))
|
||||
|
||||
|
||||
|
||||
(provide 'init-smarter-than-emacs)
|
||||
;;; init-smarter-than-emacs ends here
|
||||
|
||||
Reference in New Issue
Block a user