Merge branch 'master' into corfu-update-smart-tab
This commit is contained in:
commit
390f5920a2
95 changed files with 928 additions and 1520 deletions
|
@ -8,16 +8,12 @@
|
|||
:config
|
||||
(set-yas-minor-mode! 'emacs-everywhere-mode)
|
||||
|
||||
;; HACK Inhibit MAJOR-MODE-local-vars-hook in emacs-everywhere buffers,
|
||||
;; HACK: Inhibit MAJOR-MODE-local-vars-hook in emacs-everywhere buffers,
|
||||
;; because Doom commonly starts servers and other extraneous services on
|
||||
;; this hook, which will rarely work well in emacs-everywhere's temporary
|
||||
;; buffers anyway.
|
||||
(setq-hook! 'emacs-everywhere-init-hooks doom-inhibit-local-var-hooks t)
|
||||
|
||||
;; REVIEW: Fixes tecosaur/emacs-everywhere#75. Remove when dealt with
|
||||
;; upstream.
|
||||
(define-key emacs-everywhere-mode-map "\C-c\C-c" #'emacs-everywhere-finish)
|
||||
|
||||
(after! doom-modeline
|
||||
(doom-modeline-def-segment emacs-everywhere
|
||||
(concat
|
||||
|
@ -36,7 +32,7 @@
|
|||
(doom-modeline-def-modeline 'emacs-everywhere
|
||||
'(bar modals emacs-everywhere buffer-position
|
||||
word-count parrot selection-info)
|
||||
'(input-method major-mode checker
|
||||
'(input-method major-mode check
|
||||
#(" " 0 1 ; "Exit to app" icon + a little padding
|
||||
(rear-nonsticky t
|
||||
display (raise -0.25)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; app/everywhere/packages.el
|
||||
|
||||
(package! emacs-everywhere :pin "fbeff19825336777dccaefedf3f376dd622cd294")
|
||||
(package! emacs-everywhere :pin "bc91164151ab012ff884af92321557f9b37eeed1")
|
||||
|
|
|
@ -51,16 +51,19 @@
|
|||
:hook (flycheck-mode . +syntax-init-popups-h)
|
||||
:config
|
||||
(setq flycheck-popup-tip-error-prefix "X ")
|
||||
(after! evil
|
||||
;; Don't display popups while in insert or replace mode, as it can affect
|
||||
;; the cursor's position or cause disruptive input delays.
|
||||
(add-hook! '(evil-insert-state-entry-hook evil-replace-state-entry-hook)
|
||||
#'flycheck-popup-tip-delete-popup)
|
||||
(defadvice! +syntax--disable-flycheck-popup-tip-maybe-a (&rest _)
|
||||
:before-while #'flycheck-popup-tip-show-popup
|
||||
(if evil-local-mode
|
||||
(eq evil-state 'normal)
|
||||
(not (bound-and-true-p company-backend))))))
|
||||
|
||||
;; HACK: Only display the flycheck popup if we're in normal mode (for evil
|
||||
;; users) or if no selection or completion is active. This popup can
|
||||
;; interfere with the active evil mode, clear active regions, and other
|
||||
;; funny business (see #7242).
|
||||
(defadvice! +syntax--disable-flycheck-popup-tip-maybe-a (&rest _)
|
||||
:before-while #'flycheck-popup-tip-show-popup
|
||||
(if (and (bound-and-true-p evil-local-mode)
|
||||
(not (evil-emacs-state-p)))
|
||||
(evil-normal-state-p)
|
||||
(and (not (region-active-p))
|
||||
(not (bound-and-true-p company-backend))
|
||||
(not (ignore-errors (>= corfu--index 0)))))))
|
||||
|
||||
|
||||
(use-package! flycheck-posframe
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; completion/company/packages.el
|
||||
|
||||
(package! company :pin "02903bd7088d65a87df0ae0f0d0a7118de147b69")
|
||||
(package! company :pin "b0a522ac5bf8ba3d2f4f22e3aa846a4f82978a16")
|
||||
(package! company-dict :pin "cd7b8394f6014c57897f65d335d6b2bd65dab1f4")
|
||||
(when (modulep! +childframe)
|
||||
(package! company-box :pin "b6f53e26adf948aca55c3ff6c22c21a6a6614253"))
|
||||
(package! company-box :pin "c4f2e243fba03c11e46b1600b124e036f2be7691"))
|
||||
|
|
|
@ -212,6 +212,14 @@ A few variables may be set to change behavior of this module:
|
|||
Whether to prefer navigating org tables over cycling candidates when pressing
|
||||
[[kbd:][TAB]] and [[kbd:][S-TAB]].
|
||||
|
||||
** Turning off auto-completion
|
||||
To disable idle (as-you-type) completion, unset ~corfu-auto~:
|
||||
#+begin_src emacs-lisp
|
||||
;;; in $DOOMDIR/config.el
|
||||
(after! corfu
|
||||
(setq corfu-auto nil))
|
||||
#+end_src
|
||||
|
||||
** Adding CAPFs to a mode
|
||||
To add other CAPFs on a mode-per-mode basis, put either of the following in your
|
||||
~config.el~:
|
||||
|
@ -242,7 +250,7 @@ all CAPFs are interactive to be called this way, in which case you can use
|
|||
* Troubleshooting
|
||||
[[doom-report:][Report an issue?]]
|
||||
|
||||
** Performance issues with ~cape-dabbrev~
|
||||
** Troubleshooting ~cape-dabbrev~
|
||||
|
||||
If you have performance issues with ~cape-dabbrev~, the first thing I recommend
|
||||
doing is to look at the list of buffers Dabbrev is scanning:
|
||||
|
@ -255,6 +263,22 @@ doing is to look at the list of buffers Dabbrev is scanning:
|
|||
... and modify ~dabbrev-ignored-buffer-regexps~ or ~dabbrev-ignored-buffer-modes~
|
||||
accordingly.
|
||||
|
||||
If you see garbage completion candidates, you can use the following command to
|
||||
debug the issue:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
;;;###autoload
|
||||
(defun search-in-dabbrev-buffers (search-string)
|
||||
"Search for SEARCH-STRING in all buffers returned by `dabbrev--select-buffers'."
|
||||
(interactive "sSearch string: ")
|
||||
(let ((buffers (dabbrev--select-buffers)))
|
||||
(multi-occur buffers search-string)))
|
||||
|
||||
;; Example usage:
|
||||
;; Why are these weird characters appearing in my completions?
|
||||
(search-in-dabbrev-buffers "\342\200\231")
|
||||
#+end_src
|
||||
|
||||
** Fixing TAB Keybindings
|
||||
|
||||
If you encounter an issue where your ~TAB~ keybindings are not responding in Doom
|
||||
|
|
|
@ -40,7 +40,8 @@ TAB/S-TAB.")
|
|||
('aggressive
|
||||
(not (or (bound-and-true-p mct--active)
|
||||
(bound-and-true-p vertico--input)
|
||||
(eq (current-local-map) read-passwd-map)
|
||||
(and (featurep 'auth-source)
|
||||
(eq (current-local-map) read-passwd-map))
|
||||
(and (featurep 'helm-core) (helm--alive-p))
|
||||
(and (featurep 'ido) (ido-active))
|
||||
(where-is-internal 'minibuffer-complete
|
||||
|
@ -53,7 +54,7 @@ TAB/S-TAB.")
|
|||
(corfu-mode +1))))
|
||||
:config
|
||||
(setq corfu-auto t
|
||||
corfu-auto-delay 0.1
|
||||
corfu-auto-delay 0.18
|
||||
corfu-auto-prefix 2
|
||||
global-corfu-modes '((not
|
||||
erc-mode
|
||||
|
@ -67,8 +68,10 @@ TAB/S-TAB.")
|
|||
corfu-count 16
|
||||
corfu-max-width 120
|
||||
corfu-on-exact-match nil
|
||||
corfu-quit-at-boundary (if (modulep! +orderless) 'separator t)
|
||||
corfu-quit-no-match (if (modulep! +orderless) 'separator t)
|
||||
corfu-quit-at-boundary (if (or (modulep! :completion vertico)
|
||||
(modulep! +orderless))
|
||||
'separator t)
|
||||
corfu-quit-no-match corfu-quit-at-boundary
|
||||
tab-always-indent 'complete)
|
||||
(add-to-list 'completion-category-overrides `(lsp-capf (styles ,@completion-styles)))
|
||||
(add-to-list 'corfu-auto-commands #'lispy-colon)
|
||||
|
@ -112,10 +115,10 @@ TAB/S-TAB.")
|
|||
(use-package! cape
|
||||
:defer t
|
||||
:init
|
||||
(add-hook! prog-mode
|
||||
(add-hook! 'prog-mode-hook
|
||||
(defun +corfu-add-cape-file-h ()
|
||||
(add-hook 'completion-at-point-functions #'cape-file -10 t)))
|
||||
(add-hook! (org-mode markdown-mode)
|
||||
(add-hook! '(org-mode-hook markdown-mode-hook)
|
||||
(defun +corfu-add-cape-elisp-block-h ()
|
||||
(add-hook 'completion-at-point-functions #'cape-elisp-block 0 t)))
|
||||
;; Enable Dabbrev completion basically everywhere as a fallback.
|
||||
|
@ -124,17 +127,23 @@ TAB/S-TAB.")
|
|||
;; Set up `cape-dabbrev' options.
|
||||
(defun +dabbrev-friend-buffer-p (other-buffer)
|
||||
(< (buffer-size other-buffer) +corfu-buffer-scanning-size-limit))
|
||||
(add-hook! (prog-mode text-mode conf-mode comint-mode minibuffer-setup
|
||||
eshell-mode)
|
||||
(add-hook! '(prog-mode-hook
|
||||
text-mode-hook
|
||||
conf-mode-hook
|
||||
comint-mode-hook
|
||||
minibuffer-setup-hook
|
||||
eshell-mode-hook)
|
||||
(defun +corfu-add-cape-dabbrev-h ()
|
||||
(add-hook 'completion-at-point-functions #'cape-dabbrev 20 t)))
|
||||
(after! dabbrev
|
||||
(setq dabbrev-friend-buffer-function #'+dabbrev-friend-buffer-p
|
||||
dabbrev-ignored-buffer-regexps
|
||||
'("^ "
|
||||
'("\\` "
|
||||
"\\(TAGS\\|tags\\|ETAGS\\|etags\\|GTAGS\\|GRTAGS\\|GPATH\\)\\(<[0-9]+>\\)?")
|
||||
dabbrev-upcase-means-case-search t)
|
||||
(add-to-list 'dabbrev-ignored-buffer-modes 'pdf-view-mode)))
|
||||
(add-to-list 'dabbrev-ignored-buffer-modes 'pdf-view-mode)
|
||||
(add-to-list 'dabbrev-ignored-buffer-modes 'doc-view-mode)
|
||||
(add-to-list 'dabbrev-ignored-buffer-modes 'tags-table-mode)))
|
||||
|
||||
;; Make these capfs composable.
|
||||
(advice-add #'lsp-completion-at-point :around #'cape-wrap-noninterruptible)
|
||||
|
|
|
@ -1,12 +1,16 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; completion/corfu/packages.el
|
||||
|
||||
(package! corfu :pin "c1e7b6190b00158e67347b4db0a8f7964e5d2f8b")
|
||||
(package! cape :pin "a397a0c92de38277b7f835fa999fac400a764908")
|
||||
(package! corfu :pin "35cd5a0f3cba89766072e3e933d1fe2ee02f2289")
|
||||
(package! cape :pin "e01e4430234850263d326ad4521849cd46e64059")
|
||||
(when (modulep! +icons)
|
||||
(package! nerd-icons-corfu :pin "7077bb76fefc15aed967476406a19dc5c2500b3c"))
|
||||
(when (modulep! +orderless)
|
||||
(package! orderless :pin "b24748093b00b37c3a572c4909f61c08fa27504f"))
|
||||
(when (and (not (modulep! :completion vertico))
|
||||
(modulep! +orderless))
|
||||
;; enabling +orderless without vertico should be fairly niche enough that to
|
||||
;; save contributor headaches we should only pin vertico's orderless and leave
|
||||
;; this one unpinned
|
||||
(package! orderless))
|
||||
(when (modulep! :os tty)
|
||||
(package! corfu-terminal :pin "501548c3d51f926c687e8cd838c5865ec45d03cc"))
|
||||
(when (modulep! :editor snippets)
|
||||
|
|
|
@ -43,7 +43,9 @@ Can be negative.")
|
|||
;; symbol at point.
|
||||
helm-imenu-execute-action-at-once-if-one nil
|
||||
;; Disable special behavior for left/right, M-left/right keys.
|
||||
helm-ff-lynx-style-map nil)
|
||||
helm-ff-lynx-style-map nil
|
||||
;; Don't commandeer the entire frame for helm commands.
|
||||
helm-always-two-windows nil)
|
||||
|
||||
(map! [remap apropos] #'helm-apropos
|
||||
[remap find-library] #'helm-locate-library
|
||||
|
@ -188,7 +190,13 @@ Can be negative.")
|
|||
|
||||
|
||||
(use-package! helm-descbinds
|
||||
:hook (helm-mode . helm-descbinds-mode))
|
||||
:hook (helm-mode . helm-descbinds-mode)
|
||||
:config
|
||||
;; HACK: Upstream claims that the two packages are incompatible, but changing
|
||||
;; `prefix-help-command' seems to smooth the incompatibility over. More
|
||||
;; testing is needed...
|
||||
(setq helm-descbinds-disable-which-key nil
|
||||
prefix-help-command #'helm-descbinds))
|
||||
|
||||
|
||||
(use-package! helm-icons
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; completion/helm/packages.el
|
||||
|
||||
(package! helm :pin "f34ea6b702648e5c7535a704bdb6c4d7afb4b3b8")
|
||||
(package! helm :pin "28f62344fed0d8be0bcef5aa8a018ba58198ba0c")
|
||||
(package! helm-company :pin "4622b82353220ee6cc33468f710fa5b6b253b7f1")
|
||||
(package! helm-c-yasnippet :pin "c5880e740da101fde7a995e94a7b16c330e57583")
|
||||
(package! helm-descbinds :pin "b72515982396b6e336ad7beb6767e95a80fca192")
|
||||
(package! helm-descbinds :pin "ca03f02da4e54a1d0a2d5498b86e1639aa808d8c")
|
||||
(package! helm-describe-modes :pin "11fb36af119b784539d31c6160002de1957408aa")
|
||||
(package! helm-projectile :pin "e2e38825c975269a4971df25e79b2ae98929624e")
|
||||
(package! helm-rg :pin "ee0a3c09da0c843715344919400ab0a0190cc9dc")
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; completion/ivy/packages.el
|
||||
|
||||
(package! swiper :pin "8c30f4cab5948aa8d942a3b2bbf5fb6a94d9441d")
|
||||
(package! swiper :pin "1f88e5499046d166d22bf733a3877aec3b424947")
|
||||
(package! ivy)
|
||||
(package! ivy-hydra)
|
||||
(package! ivy-avy)
|
||||
|
@ -13,7 +13,7 @@
|
|||
(package! wgrep :pin "208b9d01cfffa71037527e3a324684b3ce45ddc4")
|
||||
|
||||
(if (modulep! +prescient)
|
||||
(package! ivy-prescient :pin "4b875be52e75f7b81e68a16b62cfbb2f2584042c")
|
||||
(package! ivy-prescient :pin "c39bf07c56b427bf41aafd7d20eaef5cf3c312b5")
|
||||
(when (modulep! +fuzzy)
|
||||
(package! flx :pin "4b1346eb9a8a76ee9c9dede69738c63ad97ac5b6")))
|
||||
|
||||
|
|
|
@ -83,6 +83,9 @@ orderless."
|
|||
((string= "!" pattern) `(orderless-literal . ""))
|
||||
;; Without literal
|
||||
((string-prefix-p "!" pattern) `(orderless-without-literal . ,(substring pattern 1)))
|
||||
;; Annotation
|
||||
((string-prefix-p "&" pattern) `(orderless-annotation . ,(substring pattern 1)))
|
||||
((string-suffix-p "&" pattern) `(orderless-annotation . ,(substring pattern 0 -1)))
|
||||
;; Character folding
|
||||
((string-prefix-p "%" pattern) `(char-fold-to-regexp . ,(substring pattern 1)))
|
||||
((string-suffix-p "%" pattern) `(char-fold-to-regexp . ,(substring pattern 0 -1)))
|
||||
|
@ -157,13 +160,16 @@ orderless."
|
|||
(consult-customize
|
||||
consult-ripgrep consult-git-grep consult-grep
|
||||
consult-bookmark consult-recent-file
|
||||
+default/search-project +default/search-other-project
|
||||
+default/search-project-for-symbol-at-point
|
||||
+default/search-cwd +default/search-other-cwd
|
||||
+default/search-notes-for-symbol-at-point
|
||||
+default/search-emacsd
|
||||
consult--source-recent-file consult--source-project-recent-file consult--source-bookmark
|
||||
:preview-key "C-SPC")
|
||||
(when (modulep! :config default)
|
||||
(consult-customize
|
||||
+default/search-project +default/search-other-project
|
||||
+default/search-project-for-symbol-at-point
|
||||
+default/search-cwd +default/search-other-cwd
|
||||
+default/search-notes-for-symbol-at-point
|
||||
+default/search-emacsd
|
||||
:preview-key "C-SPC"))
|
||||
(consult-customize
|
||||
consult-theme
|
||||
:preview-key (list "C-SPC" :debounce 0.5 'any))
|
||||
|
@ -195,13 +201,20 @@ orderless."
|
|||
|
||||
|
||||
(use-package! consult-dir
|
||||
:bind (([remap list-directory] . consult-dir)
|
||||
:defer t
|
||||
:init
|
||||
(map! [remap list-directory] #'consult-dir
|
||||
(:after vertico
|
||||
:map vertico-map
|
||||
("C-x C-d" . consult-dir)
|
||||
("C-x C-j" . consult-dir-jump-file))
|
||||
"C-x C-d" #'consult-dir
|
||||
"C-x C-j" #'consult-dir-jump-file))
|
||||
:config
|
||||
;; DEPRECATED: Remove when Doom core replaces projectile with project.el
|
||||
(setq consult-dir-project-list-function #'consult-dir-projectile-dirs)
|
||||
|
||||
(when (modulep! :tools docker)
|
||||
;; TODO Replace with `tramp-container--completion-function' when we drop support for <29
|
||||
;; TODO: Replace with `tramp-container--completion-function' when we drop
|
||||
;; support for <29
|
||||
(defun +vertico--consult-dir-container-hosts (host)
|
||||
"Get a list of hosts from HOST."
|
||||
(cl-loop for line in (cdr
|
||||
|
@ -209,10 +222,7 @@ orderless."
|
|||
(apply #'process-lines +vertico-consult-dir-container-executable
|
||||
(append +vertico-consult-dir-container-args (list "ps")))))
|
||||
for cand = (split-string line "[[:space:]]+" t)
|
||||
collect (let ((user (unless (string-empty-p (car cand))
|
||||
(concat (car cand) "@")))
|
||||
(hostname (car (last cand))))
|
||||
(format "/%s:%s%s:/" host user hostname))))
|
||||
collect (format "/%s:%s:/" host (car (last cand)))))
|
||||
|
||||
(defun +vertico--consult-dir-podman-hosts ()
|
||||
(let ((+vertico-consult-dir-container-executable "podman"))
|
||||
|
@ -229,7 +239,7 @@ orderless."
|
|||
:face consult-file
|
||||
:history file-name-history
|
||||
:items ,#'+vertico--consult-dir-podman-hosts)
|
||||
"Podman candiadate source for `consult-dir'.")
|
||||
"Podman candidate source for `consult-dir'.")
|
||||
|
||||
(defvar +vertico--consult-dir-source-tramp-docker
|
||||
`(:name "Docker"
|
||||
|
@ -238,7 +248,7 @@ orderless."
|
|||
:face consult-file
|
||||
:history file-name-history
|
||||
:items ,#'+vertico--consult-dir-docker-hosts)
|
||||
"Docker candiadate source for `consult-dir'.")
|
||||
"Docker candidate source for `consult-dir'.")
|
||||
|
||||
(add-to-list 'consult-dir-sources '+vertico--consult-dir-source-tramp-podman t)
|
||||
(add-to-list 'consult-dir-sources '+vertico--consult-dir-source-tramp-docker t))
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; completion/vertico/packages.el
|
||||
|
||||
(package! vertico :pin "68cbd47589446e9674921bae0b98ff8fbe28be23")
|
||||
(package! vertico :pin "68e51fda552a2f91caab69e83564bc91275b09b1")
|
||||
|
||||
(package! orderless :pin "dc7a781acf2e58ac7d20d1b522be0cde5213e057")
|
||||
(package! orderless :pin "ac4aeb66f331f4c4a430d5556071e33177304c37")
|
||||
|
||||
(package! consult :pin "b48ff6bf0527baeb6bfd07c6da9d303ff0b79c3d")
|
||||
(package! consult :pin "c87b0bf06de0c3cb60bc8d257c770cb981ddcd19")
|
||||
(package! consult-dir :pin "3f5f4b71ebe819392cb090cda71bd39a93bd830a")
|
||||
(when (and (modulep! :checkers syntax)
|
||||
(not (modulep! :checkers syntax +flymake)))
|
||||
(package! consult-flycheck :pin "754f5497d827f7d58009256a21af614cc44378a3"))
|
||||
(package! embark :pin "c93abadc8220c0caa6fea805f7a736c346d47e7e")
|
||||
(package! embark-consult :pin "c93abadc8220c0caa6fea805f7a736c346d47e7e")
|
||||
(package! embark :pin "d3c9d1b4c890cf365846cc2b418f37341999e79f")
|
||||
(package! embark-consult :pin "d3c9d1b4c890cf365846cc2b418f37341999e79f")
|
||||
|
||||
(package! marginalia :pin "f6fe86b989a177355ab3ff7e97a384e10a7b0bb1")
|
||||
(package! marginalia :pin "3275d1f85cb020280979a050054b843f7563aea2")
|
||||
|
||||
(package! wgrep :pin "208b9d01cfffa71037527e3a324684b3ce45ddc4")
|
||||
|
||||
|
|
|
@ -434,8 +434,11 @@
|
|||
;;; <leader> c --- code
|
||||
(:prefix-map ("c" . "code")
|
||||
(:when (and (modulep! :tools lsp) (not (modulep! :tools lsp +eglot)))
|
||||
:desc "LSP Execute code action" "a" #'lsp-execute-code-action
|
||||
:desc "LSP Organize imports" "o" #'lsp-organize-imports
|
||||
:desc "LSP Execute code action" "a" #'lsp-execute-code-action
|
||||
:desc "LSP Organize imports" "o" #'lsp-organize-imports
|
||||
:desc "LSP" "l" #'+default/lsp-command-map
|
||||
:desc "LSP Rename" "r" #'lsp-rename
|
||||
:desc "Symbols" "S" #'lsp-treemacs-symbols
|
||||
(:when (modulep! :completion ivy)
|
||||
:desc "Jump to symbol in current workspace" "j" #'lsp-ivy-workspace-symbol
|
||||
:desc "Jump to symbol in any workspace" "J" #'lsp-ivy-global-workspace-symbol)
|
||||
|
@ -449,10 +452,7 @@
|
|||
:desc "Errors list" "X" #'lsp-treemacs-errors-list
|
||||
:desc "Incoming call hierarchy" "y" #'lsp-treemacs-call-hierarchy
|
||||
:desc "Outgoing call hierarchy" "Y" (cmd!! #'lsp-treemacs-call-hierarchy t)
|
||||
:desc "References tree" "R" (cmd!! #'lsp-treemacs-references t)
|
||||
:desc "Symbols" "S" #'lsp-treemacs-symbols
|
||||
:desc "LSP" "l" #'+default/lsp-command-map
|
||||
:desc "LSP Rename" "r" #'lsp-rename))
|
||||
:desc "References tree" "R" (cmd!! #'lsp-treemacs-references t)))
|
||||
(:when (modulep! :tools lsp +eglot)
|
||||
:desc "LSP Execute code action" "a" #'eglot-code-actions
|
||||
:desc "LSP Rename" "r" #'eglot-rename
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; editor/evil/packages.el
|
||||
|
||||
(package! evil :pin "5995f6f21f662484440ed67a28ce59e365feb9ad")
|
||||
(package! evil-args :pin "2671071a4a57eaee7cc8c27b9e4b6fc60fd2ccd3")
|
||||
(package! evil :pin "0251080640e0da6f0eec2b7d8dd70e9c9b9915d7")
|
||||
(package! evil-args :pin "a8151556f63c9d45d0c44c8a7ef9e5a542f3cdc7")
|
||||
(package! evil-easymotion :pin "f96c2ed38ddc07908db7c3c11bcd6285a3e8c2e9")
|
||||
(package! evil-embrace :pin "3081d37811b6a3dfaaf01d578c7ab7a746c6064d")
|
||||
(package! evil-escape
|
||||
|
@ -11,10 +11,10 @@
|
|||
(package! evil-exchange :pin "5f0a2d41434c17c6fb02e4f744043775de1c63a2")
|
||||
(package! evil-indent-plus :pin "f392696e4813f1d3a92c7eeed333248914ba6dae")
|
||||
(package! evil-lion :pin "1e838a53b8f18a3c8bdf3e952186abc2ee9cb98e")
|
||||
(package! evil-nerd-commenter :pin "3b197a2b559b06a7cf39978704b196f53dac802a")
|
||||
(package! evil-nerd-commenter :pin "ae52c5070a48793e2c24474c9c8dbf20175d18a0")
|
||||
(package! evil-numbers :pin "7a1b62afc12da2b582bf84d722e7b10ca8b97065")
|
||||
(package! evil-snipe :pin "c2108d3932fcd2f75ac3e48250d6badd668f5b4f")
|
||||
(package! evil-surround :pin "c7116cdc774b1e259eaf3e9e7a318a6c99c2da17")
|
||||
(package! evil-surround :pin "da05c60b0621cf33161bb4335153f75ff5c29d91")
|
||||
(package! evil-textobj-anyblock
|
||||
:recipe (:host github
|
||||
:repo "willghatch/evil-textobj-anyblock"
|
||||
|
@ -35,4 +35,4 @@
|
|||
(package! neotree)
|
||||
(autoload 'neotree-make-executor "neotree" nil nil 'macro))
|
||||
|
||||
(package! evil-collection :pin "8c84f9bc89fe56e71b56519f886085ddcbc671cf"))
|
||||
(package! evil-collection :pin "ca977acb83c0dd01fc57dbc6f3d3111e89f4ec9d"))
|
||||
|
|
|
@ -78,6 +78,18 @@ Targets `vimmish-fold', `hideshow', `ts-fold' and `outline' folds."
|
|||
((+fold--hideshow-fold-p) (+fold-from-eol (hs-toggle-hiding)))
|
||||
((+fold--ts-fold-p) (ts-fold-toggle)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +fold/open-rec ()
|
||||
"Recursively open the folded region at point.
|
||||
|
||||
Targets `vimmish-fold', `hideshow', `ts-fold' and `outline' folds."
|
||||
(interactive)
|
||||
(save-excursion
|
||||
(cond ((+fold--vimish-fold-p) (vimish-fold-unfold))
|
||||
((+fold--outline-fold-p) (outline-show-subtree))
|
||||
((+fold--hideshow-fold-p) (+fold-from-eol (hs-show-block)))
|
||||
((+fold--ts-fold-p) (ts-fold-open)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +fold/open ()
|
||||
"Open the folded region at point.
|
||||
|
@ -87,7 +99,7 @@ Targets `vimmish-fold', `hideshow', `ts-fold' and `outline' folds."
|
|||
(save-excursion
|
||||
(cond ((+fold--vimish-fold-p) (vimish-fold-unfold))
|
||||
((+fold--outline-fold-p)
|
||||
(outline-show-children)
|
||||
(outline-show-branches)
|
||||
(outline-show-entry))
|
||||
((+fold--hideshow-fold-p) (+fold-from-eol (hs-show-block)))
|
||||
((+fold--ts-fold-p) (ts-fold-open)))))
|
||||
|
@ -111,7 +123,7 @@ Targets `vimmish-fold', `hideshow', `ts-fold' and `outline' folds."
|
|||
(list (if current-prefix-arg (prefix-numeric-value current-prefix-arg))))
|
||||
(cond ((+fold--ts-fold-p)
|
||||
(ts-fold-open-all))
|
||||
((featurep 'vimish-fold)
|
||||
((and (featurep 'vimish-fold) (+fold--vimish-fold-p))
|
||||
(vimish-fold-unfold-all))
|
||||
((save-excursion
|
||||
(+fold--ensure-hideshow-mode)
|
||||
|
@ -138,8 +150,12 @@ Targets `vimmish-fold', `hideshow', `ts-fold' and `outline' folds."
|
|||
(+fold--ensure-hideshow-mode)
|
||||
(hs-life-goes-on
|
||||
(if (integerp level)
|
||||
(hs-hide-level-recursive (1- level) (point-min) (point-max))
|
||||
(hs-hide-all)))))))
|
||||
(progn
|
||||
(outline--show-headings-up-to-level (1+ level))
|
||||
(hs-hide-level-recursive (1- level) (point-min) (point-max)))
|
||||
(hs-hide-all)
|
||||
(when (fboundp 'outline-hide-sublevels)
|
||||
(outline-show-only-headings))))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +fold/next (count)
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
[remap evil-toggle-fold] #'+fold/toggle
|
||||
[remap evil-close-fold] #'+fold/close
|
||||
[remap evil-open-fold] #'+fold/open
|
||||
[remap evil-open-fold-rec] #'+fold/open
|
||||
[remap evil-open-fold-rec] #'+fold/open-rec
|
||||
[remap evil-close-folds] #'+fold/close-all
|
||||
[remap evil-open-folds] #'+fold/open-all)
|
||||
(after! evil
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; editor/snippets/packages.el
|
||||
|
||||
(package! yasnippet :pin "297546f0853a6a51f5b05e954d0c6aea8caa5ec2")
|
||||
(package! yasnippet :pin "eb5ba2664c3a68ae4a53bb38b85418dd131b208f")
|
||||
(package! auto-yasnippet :pin "6a9e406d0d7f9dfd6dff7647f358cb05a0b1637e")
|
||||
(package! doom-snippets
|
||||
:recipe (:host github
|
||||
:repo "doomemacs/snippets"
|
||||
:files (:defaults "*"))
|
||||
:pin "f022984ee1318a4015d5d081b3c3dab5a60dc6ff")
|
||||
:pin "c1384cc7975ee7ca7d551eb56c104d768440c3cb")
|
||||
|
|
|
@ -28,10 +28,13 @@
|
|||
"k" #'log-view-msg-prev))
|
||||
|
||||
|
||||
(after! vc-annotate
|
||||
(after! vc
|
||||
(set-popup-rules!
|
||||
'(("^\\*vc-diff" :select nil) ; *vc-diff*
|
||||
("^\\*vc-change" :select t))) ; *vc-change-log*
|
||||
'(("^\\*vc-diff" :select nil :size '+popup-shrink-to-fit)
|
||||
("^\\*vc-change-log" :select t))))
|
||||
|
||||
|
||||
(after! vc-annotate
|
||||
(set-evil-initial-state! 'vc-annotate-mode 'normal)
|
||||
|
||||
;; Clean up after itself
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
(package! smerge-mode :built-in t)
|
||||
|
||||
(package! browse-at-remote :pin "76aa27dfd469fcae75ed7031bb73830831aaccbf")
|
||||
(package! git-commit :pin "b68e0a3c3388af8daac662f25ccfd3e980590e12")
|
||||
(package! git-commit :pin "b5637d665c1e5bd5b76ffb072dbac387f37a5f63")
|
||||
(package! git-timemachine
|
||||
;; The original lives on codeberg.org; which has uptime issues.
|
||||
:recipe (:host github :repo "emacsmirror/git-timemachine")
|
||||
:pin "ac933e5cd29583c131401f3bd991d98129c316df")
|
||||
:pin "5ed73c3831cf6da10ba941e6abba708a86853e8f")
|
||||
(package! git-modes :pin "3cc94974c09c43462dfbfbe20396a414352dbb92")
|
||||
|
|
|
@ -33,8 +33,11 @@ default/fallback account."
|
|||
:enter-func
|
||||
(lambda () (mu4e-message "Switched to %s" label))
|
||||
:leave-func
|
||||
(lambda () (progn (setq +mu4e-personal-addresses nil)
|
||||
(mu4e-clear-caches)))
|
||||
(lambda ()
|
||||
(setq +mu4e-personal-addresses nil)
|
||||
;; REVIEW: `mu4e-clear-caches' was removed in 1.12.2, but
|
||||
;; may still be useful to users on older versions.
|
||||
(if (fboundp 'mu4e-clear-caches) (mu4e-clear-caches)))
|
||||
:match-func
|
||||
(lambda (msg)
|
||||
(when msg
|
||||
|
|
|
@ -75,6 +75,7 @@ is non-nil."
|
|||
(setq mu4e-get-mail-command "offlineimap -o -q")))
|
||||
|
||||
(setq mu4e-update-interval nil
|
||||
mu4e-notification-support t
|
||||
mu4e-sent-messages-behavior 'sent
|
||||
mu4e-hide-index-messages t
|
||||
;; configuration for sending mail
|
||||
|
@ -671,77 +672,3 @@ See `+mu4e-msg-gmail-p' and `mu4e-sent-messages-behavior'.")
|
|||
(`refile (mu4e-action-retag-message msg "-\\Inbox"))
|
||||
(`flag (mu4e-action-retag-message msg "+\\Starred"))
|
||||
(`unflag (mu4e-action-retag-message msg "-\\Starred"))))))))
|
||||
|
||||
;;
|
||||
;;; Alerts
|
||||
|
||||
(use-package! mu4e-alert
|
||||
:after mu4e
|
||||
:config
|
||||
(setq doom-modeline-mu4e t)
|
||||
|
||||
(mu4e-alert-enable-mode-line-display)
|
||||
(mu4e-alert-enable-notifications)
|
||||
|
||||
(when (version<= "1.6" mu4e-mu-version)
|
||||
(defadvice! +mu4e-alert-filter-repeated-mails-fixed-a (mails)
|
||||
"Filters the MAILS that have been seen already\nUses :message-id not :docid."
|
||||
:override #'mu4e-alert-filter-repeated-mails
|
||||
(cl-remove-if (lambda (mail)
|
||||
(prog1 (and (not mu4e-alert-notify-repeated-mails)
|
||||
(ht-get mu4e-alert-repeated-mails
|
||||
(plist-get mail :message-id)))
|
||||
(ht-set! mu4e-alert-repeated-mails
|
||||
(plist-get mail :message-id)
|
||||
t)))
|
||||
mails)))
|
||||
|
||||
(when (featurep :system 'linux)
|
||||
(mu4e-alert-set-default-style 'libnotify)
|
||||
|
||||
(defvar +mu4e-alert-bell-cmd '("paplay" . "/usr/share/sounds/freedesktop/stereo/message.oga")
|
||||
"Cons list with command to play a sound, and the sound file to play.
|
||||
Disabled when set to nil.")
|
||||
|
||||
(setq mu4e-alert-email-notification-types '(subjects))
|
||||
(defun +mu4e-alert-grouped-mail-notification-formatter-with-bell (mail-group _all-mails)
|
||||
"Default function to format MAIL-GROUP for notification.
|
||||
ALL-MAILS are the all the unread emails"
|
||||
(when +mu4e-alert-bell-cmd
|
||||
(start-process "mu4e-alert-bell" nil (car +mu4e-alert-bell-cmd) (cdr +mu4e-alert-bell-cmd)))
|
||||
(if (> (length mail-group) 1)
|
||||
(let* ((mail-count (length mail-group))
|
||||
(first-mail (car mail-group))
|
||||
(title-prefix (format "You have %d unread emails"
|
||||
mail-count))
|
||||
(field-value (mu4e-alert--get-group first-mail))
|
||||
(title-suffix (format (pcase mu4e-alert-group-by
|
||||
(`:from "from %s:")
|
||||
(`:to "to %s:")
|
||||
(`:maildir "in %s:")
|
||||
(`:priority "with %s priority:")
|
||||
(`:flags "with %s flags:"))
|
||||
field-value))
|
||||
(title (format "%s %s" title-prefix title-suffix)))
|
||||
(list :title title
|
||||
:body (s-join "\n"
|
||||
(mapcar (lambda (mail)
|
||||
(format "%s<b>%s</b> • %s"
|
||||
(cond
|
||||
((plist-get mail :in-reply-to) "⮩ ")
|
||||
((string-match-p "\\`Fwd:"
|
||||
(plist-get mail :subject)) " ⮯ ")
|
||||
(t " "))
|
||||
(truncate-string-to-width (or (caar (plist-get mail :from))
|
||||
(cdar (plist-get mail :from)))
|
||||
20 nil nil t)
|
||||
(truncate-string-to-width
|
||||
(replace-regexp-in-string "\\`Re: \\|\\`Fwd: " ""
|
||||
(plist-get mail :subject))
|
||||
40 nil nil t)))
|
||||
mail-group))))
|
||||
(let* ((new-mail (car mail-group))
|
||||
(subject (plist-get new-mail :subject))
|
||||
(sender (caar (plist-get new-mail :from))))
|
||||
(list :title sender :body subject))))
|
||||
(setq mu4e-alert-grouped-mail-notification-formatter #'+mu4e-alert-grouped-mail-notification-formatter-with-bell)))
|
||||
|
|
|
@ -3,5 +3,3 @@
|
|||
|
||||
(when (modulep! +org)
|
||||
(package! org-msg :pin "0b65f0f77a7a71881ddfce19a8cdc60465bda057"))
|
||||
|
||||
(package! mu4e-alert :pin "6beda20fc69771f2778f507c4a9e069dbaf1b628")
|
||||
|
|
|
@ -78,7 +78,8 @@ This is ignored by ccls.")
|
|||
:return "return"
|
||||
:yield "#require")
|
||||
|
||||
(add-to-list 'find-sibling-rules '("/\\([^/]+\\)\\.c\\(c\\|pp\\)\\'" "\\1.\\(h\\|hh\\|hpp\\)"))
|
||||
(add-to-list 'find-sibling-rules '("/\\([^/]+\\)\\.c\\(c\\|pp\\)?\\'" "\\1.h\\(h\\|pp\\)?\\'"))
|
||||
(add-to-list 'find-sibling-rules '("/\\([^/]+\\)\\.h\\(h\\|pp\\)?\\'" "\\1.c\\(c\\|pp\\)?\\'"))
|
||||
|
||||
(when (modulep! +tree-sitter)
|
||||
(add-hook! '(c-mode-local-vars-hook
|
||||
|
|
|
@ -174,3 +174,8 @@
|
|||
:defer t
|
||||
:init
|
||||
(add-to-list 'sly-contribs 'sly-asdf 'append))
|
||||
|
||||
(use-package! sly-stepper
|
||||
:defer t
|
||||
:init
|
||||
(add-to-list 'sly-contribs 'sly-stepper))
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
|
||||
(when (package! sly :pin "ed17d2c2bd7aead0fbb09c3d22861c80a522a097")
|
||||
(package! sly-asdf :pin "6f9d751469bb82530db1673c22e7437ca6c95f45")
|
||||
(package! sly-quicklisp :pin "34c73d43dd9066262387c626c17a9b486db07b2d")
|
||||
(package! sly-stepper :recipe (:host github :repo "joaotavora/sly-stepper"
|
||||
:files (:defaults "*.lisp" "*.asd")))
|
||||
(package! sly-macrostep :pin "5113e4e926cd752b1d0bcc1508b3ebad5def5fad")
|
||||
(package! sly-repl-ansi-color :pin "b9cd52d1cf927bf7e08582d46ab0bcf1d4fb5048")
|
||||
(package! sly-overlay :pin "916b50297a1f3bb110f840b89b8717d194623e5f"))
|
||||
|
|
|
@ -413,20 +413,6 @@ This generally applies to your private config (`doom-user-dir') or Doom's source
|
|||
;;
|
||||
;;; Fontification
|
||||
|
||||
;;;###autoload
|
||||
(defun +emacs-lisp-truncate-pin ()
|
||||
"Truncates long SHA1 hashes in `package!' :pin's."
|
||||
(save-excursion
|
||||
(goto-char (match-beginning 0))
|
||||
(and (stringp (plist-get (sexp-at-point) :pin))
|
||||
(search-forward ":pin" nil t)
|
||||
(let ((start (re-search-forward "\"[^\"\n]\\{12\\}" nil t))
|
||||
(finish (and (re-search-forward "\"" (line-end-position) t)
|
||||
(match-beginning 0))))
|
||||
(when (and start finish)
|
||||
(put-text-property start finish 'display "...")))))
|
||||
nil)
|
||||
|
||||
(defvar +emacs-lisp--face nil)
|
||||
;;;###autoload
|
||||
(defun +emacs-lisp-highlight-vars-and-faces (end)
|
||||
|
|
|
@ -115,8 +115,6 @@ See `+emacs-lisp-non-package-mode' for details.")
|
|||
'emacs-lisp-mode
|
||||
(append `(;; custom Doom cookies
|
||||
("^;;;###\\(autodef\\|if\\|package\\)[ \n]" (1 font-lock-warning-face t)))
|
||||
;; Shorten the :pin of `package!' statements to 10 characters
|
||||
`(("(package!\\_>" (0 (+emacs-lisp-truncate-pin))))
|
||||
;; highlight defined, special variables & functions
|
||||
(when +emacs-lisp-enable-extra-fontification
|
||||
`((+emacs-lisp-highlight-vars-and-faces . +emacs-lisp--face)))))
|
||||
|
|
8
modules/lang/factor/autoload.el
Normal file
8
modules/lang/factor/autoload.el
Normal file
|
@ -0,0 +1,8 @@
|
|||
;;; lang/factor/autoload.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;###autoload
|
||||
(defun +factor/open-repl ()
|
||||
"Open the Factor Listener."
|
||||
(interactive)
|
||||
(call-interactively #'run-factor)
|
||||
(current-buffer))
|
|
@ -5,73 +5,79 @@
|
|||
:init
|
||||
(after! factor-mode
|
||||
(set-eval-handler! 'factor-mode #'fuel-eval-region)
|
||||
(set-repl-handler! 'factor-mode #'run-factor))
|
||||
(set-repl-handler! 'factor-mode #'+factor/open-repl
|
||||
:persist t
|
||||
:send-region #'fuel-eval-region
|
||||
:send-buffer #'fuel-run-file)
|
||||
(set-lookup-handlers! 'factor-mode
|
||||
:definition #'fuel-edit-word-at-point
|
||||
:references #'fuel-show-callers
|
||||
:documentation #'fuel-help)
|
||||
(map! :map factor-mode-map
|
||||
:localleader
|
||||
"t" #'fuel-test-vocab
|
||||
"F" #'fuel-run-file
|
||||
"f" #'run-factor
|
||||
"a" #'fuel-refresh-all
|
||||
"L" #'fuel-load-usings
|
||||
"u" #'fuel-vocab-usage
|
||||
"U" #'fuel-vocab-uses
|
||||
(:prefix ("c" . "change")
|
||||
"w" #'fuel-edit-word-at-point
|
||||
"d" #'fuel-edit-word-doc-at-point
|
||||
"v" #'fuel-edit-vocabulary)
|
||||
(:prefix ("e" . "eval")
|
||||
"d" #'fuel-eval-definition
|
||||
"R" #'fuel-eval-extended-region
|
||||
"r" #'fuel-eval-region)
|
||||
(:prefix ("h" . "help")
|
||||
"p" #'fuel-apropos
|
||||
"h" #'fuel-help
|
||||
"b" #'fuel-help-display-bookmarks
|
||||
"v" #'fuel-help-vocab
|
||||
"w" #'fuel-show-file-words
|
||||
"c" #'fuel-show-callees
|
||||
"e" #'fuel-stack-effect-region
|
||||
"s" #'fuel-stack-effect-sexp)
|
||||
(:prefix ("s" . "scaffold")
|
||||
"v" #'fuel-scaffold-vocab
|
||||
"h" #'fuel-scaffold-help
|
||||
"t" #'fuel-scaffold-tests)
|
||||
(:prefix ("r" . "refactor")
|
||||
"s" #'fuel-refactor-extract-sexp
|
||||
"w" #'fuel-refactor-extract-region
|
||||
"v" #'fuel-refactor-extract-vocab
|
||||
"i" #'fuel-refactor-inline-word
|
||||
"g" #'fuel-refactor-make-generic
|
||||
"u" #'fuel-update-usings
|
||||
"r" #'fuel-refactor-rename-word)))
|
||||
:config
|
||||
(set-lookup-handlers! 'factor-mode
|
||||
:definition #'fuel-edit-word-at-point
|
||||
:references #'fuel-show-callers
|
||||
:documentation #'fuel-help))
|
||||
(set-popup-rules!
|
||||
'(("^\\*fuel \\(debug\\|xref\\|messages\\)\\*$" :slot 1 :vslot -1)
|
||||
("^\\*fuel help\\*$" :slot 2 :vslot 2 :select t :size 0.35)
|
||||
("^\\*fuel listener\\*$" :size 0.3 :quit nil :ttl nil)))
|
||||
|
||||
(map! :after fuel-help
|
||||
:map fuel-help-mode-map
|
||||
:localleader
|
||||
"e" #'fuel-help-edit
|
||||
"d" #'fuel-help-delete-bookmark
|
||||
"B" #'fuel-help-display-bookmarks
|
||||
"n" #'fuel-help-next
|
||||
"d" #'fuel-help-kill-page
|
||||
"p" #'fuel-help-previous
|
||||
"b" #'fuel-help-bookmark-page
|
||||
"e" #'fuel-help-edit)
|
||||
(map! :after fuel-help
|
||||
:map fuel-help-mode-map
|
||||
:localleader
|
||||
"e" #'fuel-help-edit
|
||||
"d" #'fuel-help-delete-bookmark
|
||||
"B" #'fuel-help-display-bookmarks
|
||||
"n" #'fuel-help-next
|
||||
"d" #'fuel-help-kill-page
|
||||
"p" #'fuel-help-previous
|
||||
"b" #'fuel-help-bookmark-page
|
||||
"e" #'fuel-help-edit)
|
||||
|
||||
(map! :after factor-mode
|
||||
:map factor-mode-map
|
||||
:localleader
|
||||
"t" #'fuel-test-vocab
|
||||
"F" #'fuel-run-file
|
||||
"f" #'run-factor
|
||||
"a" #'fuel-refresh-all
|
||||
"L" #'fuel-load-usings
|
||||
"u" #'fuel-vocab-usage
|
||||
"U" #'fuel-vocab-uses
|
||||
(:prefix ("c" . "change")
|
||||
"w" #'fuel-edit-word-at-point
|
||||
"d" #'fuel-edit-word-doc-at-point
|
||||
"v" #'fuel-edit-vocabulary)
|
||||
(:prefix ("e" . "eval")
|
||||
"d" #'fuel-eval-definition
|
||||
"R" #'fuel-eval-extended-region
|
||||
"r" #'fuel-eval-region)
|
||||
(:prefix ("h" . "help")
|
||||
"p" #'fuel-apropos
|
||||
"h" #'fuel-help
|
||||
"b" #'fuel-help-display-bookmarks
|
||||
"v" #'fuel-help-vocab
|
||||
"w" #'fuel-show-file-words
|
||||
"c" #'fuel-show-callees
|
||||
"e" #'fuel-stack-effect-region
|
||||
"s" #'fuel-stack-effect-sexp)
|
||||
(:prefix ("s" . "scaffold")
|
||||
"v" #'fuel-scaffold-vocab
|
||||
"h" #'fuel-scaffold-help
|
||||
"t" #'fuel-scaffold-tests)
|
||||
(:prefix ("r" . "refactor")
|
||||
"s" #'fuel-refactor-extract-sexp
|
||||
"w" #'fuel-refactor-extract-region
|
||||
"v" #'fuel-refactor-extract-vocab
|
||||
"i" #'fuel-refactor-inline-word
|
||||
"g" #'fuel-refactor-make-generic
|
||||
"u" #'fuel-update-usings
|
||||
"r" #'fuel-refactor-rename-word))
|
||||
(map! :after fuel-listener
|
||||
:map fuel-listener-mode-map
|
||||
:localleader
|
||||
"b" #'fuel-switch-to-buffer
|
||||
"w" #'fuel-switch-to-buffer-other-window
|
||||
"f" #'fuel-switch-to-buffer-other-frame
|
||||
"e" #'fuel-edit-vocabulary
|
||||
"r" #'fuel-refresh-all
|
||||
"i" #'fuel-stack-mode
|
||||
"h" #'fuel-help
|
||||
"s" #'fuel-scaffold-vocab))
|
||||
|
||||
(map! :after fuel-listener
|
||||
:map fuel-listener-mode-map
|
||||
:localleader
|
||||
"b" #'fuel-switch-to-buffer
|
||||
"w" #'fuel-switch-to-buffer-other-window
|
||||
"f" #'fuel-switch-to-buffer-other-frame
|
||||
"e" #'fuel-edit-vocabulary
|
||||
"r" #'fuel-refresh-all
|
||||
"i" #'fuel-stack-mode
|
||||
"h" #'fuel-help
|
||||
"s" #'fuel-scaffold-vocab)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; lang/factor/packages.el
|
||||
|
||||
(package! fuel :pin "23fcfc70753abbbdc0e86af06330d63da6e4ea64")
|
||||
(package! fuel :pin "12fc9d5071e46cac7b558204db5f4f09ea56e9c7")
|
||||
|
|
|
@ -91,7 +91,7 @@ query GetContinents($continentCode: String!) {
|
|||
With this module, there are 3 ways to view schemas:
|
||||
+ =+graphql-doc-open-config= which uses a local [[https://github.com/jimkyndemeyer/graphql-config-examples][=.graphqlconfig=]] file to seed endpoints to query
|
||||
+ =graphql-doc= which prompts you to select an endpoint based on ones added manually by =graphql-doc-add-api=
|
||||
+ =graphql-doc-open-url= which prompts to to manually enter an endpoint url
|
||||
+ =graphql-doc-open-url= which prompts to manually enter an endpoint url
|
||||
|
||||
When using the doc viewer, there are a few bindings for navigating around.
|
||||
|
||||
|
|
|
@ -20,22 +20,23 @@ This module adds support for [[https://julialang.org/][the Julia language]] to D
|
|||
- +tree-sitter ::
|
||||
Leverages tree-sitter for better syntax highlighting and structural text
|
||||
editing. Requires [[doom-module::tools tree-sitter]].
|
||||
- +snail :: Use Snail, a development environment and REPL interaction package
|
||||
for Julia in the spirit of Common Lisp’s SLIME and Clojure’s CIDER. It enables
|
||||
convenient and dynamic REPL-driven development.
|
||||
- +snail ::
|
||||
Use Snail, a development environment and REPL interaction package for Julia in
|
||||
the spirit of Common Lisp’s SLIME and Clojure’s CIDER. It enables convenient
|
||||
and dynamic REPL-driven development.
|
||||
|
||||
** Packages
|
||||
- [[doom-package:julia-mode]]
|
||||
- [[doom-package:julia-repl]]
|
||||
- if [[doom-package:+lsp]]
|
||||
- if [[doom-module:+lsp]]
|
||||
- if [[doom-module::tools lsp]]
|
||||
- [[doom-package:lsp-julia]]
|
||||
- [[doom-package:lsp]]
|
||||
- if [[doom-module::tools lsp +eglot]]
|
||||
- [[doom-package:eglot-jl]]
|
||||
- [[doom-package:eglot]]
|
||||
- if [[doom-package:][+snail]]
|
||||
- [[doom-package:][julia-snail]]
|
||||
- if [[doom-module:+snail]]
|
||||
- [[doom-package:julia-snail]]
|
||||
|
||||
** Hacks
|
||||
/No hacks documented for this module./
|
||||
|
@ -63,8 +64,8 @@ Pkg.add("LanguageServer")
|
|||
Pkg.add("SymbolServer")
|
||||
#+end_src
|
||||
|
||||
Then configure [[doom-package:lsp-julia]] or [[doom-package:eglot-jl]] depending on whether you have enabled
|
||||
[[doom-module::tools lsp]] or [[doom-module::tools lsp +eglot]], respectively:
|
||||
Then configure [[doom-package:lsp-julia]] or [[doom-package:eglot-jl]] depending on whether you have enabled [[doom-module::tools
|
||||
lsp]] or [[doom-module::tools lsp +eglot]], respectively:
|
||||
|
||||
*** =lsp-julia=
|
||||
To instruct [[doom-package:lsp-julia]] not to use the built-in package:
|
||||
|
|
|
@ -53,7 +53,8 @@
|
|||
:hook (+julia-repl-start . +julia-override-repl-escape-char-h)
|
||||
:hook (+julia-repl-start . julia-repl-use-emacsclient)
|
||||
:config
|
||||
(set-popup-rule! "^\\*julia.*\\*$" :ttl nil)
|
||||
(unless (modulep! +snail)
|
||||
(set-popup-rule! "^\\*julia.*\\*$" :ttl nil))
|
||||
|
||||
(when (modulep! :ui workspaces)
|
||||
(defadvice! +julia--namespace-repl-buffer-to-workspace-a (&optional executable-key suffix)
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; lang/julia/packages.el
|
||||
|
||||
(package! julia-mode :pin "7a8c868e0d3e51ba4a2c621ee22ca9599e0e4bbb")
|
||||
(package! julia-mode :pin "2dfc869ff6b3878407fe7226669dfaae8d38d541")
|
||||
(package! julia-repl :pin "4947319bc948b3f80d61b0d65a719737275949b8")
|
||||
|
||||
(when (modulep! +lsp)
|
||||
(if (modulep! :tools lsp +eglot)
|
||||
(package! eglot-jl :pin "7dc604fe42a459a987853d065cd6d0f3c4cbc02a")
|
||||
(package! eglot-jl :pin "1d9cab682380f37ca1e9e9933cda13164600706d")
|
||||
(package! lsp-julia :pin "c869b2f6c05a97e5495ed3cc6710a33b4faf41a2")))
|
||||
|
||||
(when (modulep! +snail)
|
||||
(package! julia-snail :pin "d36653bb938050cfabbe3c1ea6d4575071085577"))
|
||||
(package! julia-snail :pin "a25ce847480a0c2bed24fad3f1ee62904c9c93a5"))
|
||||
|
|
|
@ -11,8 +11,6 @@
|
|||
:interpreter ("\\(?:cached-\\)?nix-shell" . +nix-shell-init-mode)
|
||||
:mode "\\.nix\\'"
|
||||
:init
|
||||
;; Treat flake.lock files as json. Fall back to js-mode because it's faster
|
||||
;; than js2-mode, and its extra features aren't needed there.
|
||||
(add-to-list 'auto-mode-alist
|
||||
(cons "/flake\\.lock\\'"
|
||||
(if (modulep! :lang json)
|
||||
|
|
|
@ -23,8 +23,7 @@
|
|||
(cond ((and (string-prefix-p "jupyter-" lang)
|
||||
(require 'jupyter nil t))
|
||||
(jupyter-eval-region beg end))
|
||||
((let ((major-mode (org-src-get-lang-mode lang)))
|
||||
(+eval/region beg end))))))))
|
||||
((+eval-region-as-major-mode beg end (org-src-get-lang-mode lang))))))))
|
||||
|
||||
|
||||
;;;###autoload
|
||||
|
|
|
@ -1188,7 +1188,7 @@ between the two."
|
|||
:hook (org-mode . org-eldoc-load)
|
||||
:init (setq org-eldoc-breadcrumb-separator " → ")
|
||||
:config
|
||||
;; HACK Fix #2972: infinite recursion when eldoc kicks in in 'org' or 'python'
|
||||
;; HACK Fix #2972: infinite recursion when eldoc kicks in 'org' or 'python'
|
||||
;; src blocks.
|
||||
;; TODO Should be reported upstream!
|
||||
(puthash "org" #'ignore org-eldoc-local-functions-cache)
|
||||
|
|
|
@ -54,35 +54,4 @@
|
|||
(lambda (path)
|
||||
(if (file-in-directory-p path org-download-image-dir)
|
||||
(file-relative-name path org-download-image-dir)
|
||||
path)))
|
||||
|
||||
(defadvice! +org--fix-org-download-delete-a (fn beg end &optional times)
|
||||
"Fix `org-download-delete' for a non-standard `org-download-link-format'."
|
||||
:around #'org-download--delete
|
||||
(save-excursion
|
||||
(save-match-data
|
||||
(goto-char beg)
|
||||
(let ((times (or times most-positive-fixnum))
|
||||
(linkname
|
||||
(or (and (string-match "\\[\\[\\(\\w+\\):" org-download-link-format)
|
||||
(match-string 1 org-download-link-format))
|
||||
"file")))
|
||||
(while (and (>= (cl-decf times) 0)
|
||||
(re-search-forward (format "\\[\\[%s:\\([^]]*\\)\\]\\]"
|
||||
(regexp-quote linkname))
|
||||
end t))
|
||||
(let ((str (match-string-no-properties 2)))
|
||||
(delete-region beg (match-end 0))
|
||||
(when (file-exists-p str)
|
||||
(delete-file str))))))))
|
||||
|
||||
(defadvice! +org--dragndrop-then-display-inline-images-a (_link filename)
|
||||
:after #'org-download-insert-link
|
||||
(when (image-type-from-file-name filename)
|
||||
(save-excursion
|
||||
(org-display-inline-images
|
||||
t t
|
||||
(progn (org-back-to-heading-or-point-min t) (point))
|
||||
(progn (org-end-of-subtree t t)
|
||||
(when (and (org-at-heading-p) (not (eobp))) (backward-char 1))
|
||||
(point)))))))
|
||||
path))))
|
||||
|
|
|
@ -31,25 +31,25 @@
|
|||
(format "(defun org-git-version (&rest _) \"%s-??-%s\")\n"
|
||||
version (cdr (doom-call-process "git" "rev-parse" "--short" "HEAD")))
|
||||
"(provide 'org-version)\n")))))
|
||||
:pin "7a6bb0904d01b50680f9028f7c0f3cfc6ae3aa6e")
|
||||
:pin "e9c288dfaccc2960e5b6889e6aabea700ad4e05a")
|
||||
(package! org-contrib
|
||||
:recipe (:host github
|
||||
:repo "emacsmirror/org-contrib")
|
||||
:pin "8fbaceb247a775ad1534af97859c740e82cc955a")
|
||||
:pin "d4056ce5d5611e1c971c151f182a2d407226fdb1")
|
||||
|
||||
(package! avy)
|
||||
(package! htmlize :pin "dd27bc3f26efd728f2b1f01f9e4ac4f61f2ffbf9")
|
||||
(package! htmlize :pin "09d43dfa44899f194095bb3500a45ec5b34d59c6")
|
||||
(package! org-yt
|
||||
:recipe (:host github :repo "TobiasZawada/org-yt")
|
||||
:pin "56166f48e04d83668f70ed84706b7a4d8b1e5438")
|
||||
(package! ox-clip :pin "ff117cf3c619eef12eccc0ccbfa3f11adb73ea68")
|
||||
(package! ox-clip :pin "a549cc8e1747beb6b7e567ffac27e31ba45cb8e8")
|
||||
(package! toc-org :pin "6d3ae0fc47ce79b1ea06cabe21a3c596395409cd")
|
||||
(package! org-cliplink :pin "13e0940b65d22bec34e2de4bc8cba1412a7abfbc")
|
||||
|
||||
;; TODO Adjust when this is added to GNU ELPA
|
||||
(when (modulep! +contacts)
|
||||
(package! org-contacts
|
||||
:pin "7f03eafaad2e5746949c0bebb98353e939c51ade"
|
||||
:pin "6660db078f7687af3bc31f702e3e957d4d7654bd"
|
||||
:recipe (:host nil
|
||||
:type git
|
||||
:repo "https://repo.or.cz/org-contacts.git")))
|
||||
|
@ -71,7 +71,7 @@
|
|||
(when (modulep! :tools pdf)
|
||||
(package! org-pdftools :pin "4e420233a153a9c4ab3d1a7e1d7d3211c836f0ac"))
|
||||
(when (modulep! :tools magit)
|
||||
(package! orgit :pin "84bcb5c318f01b9ffc8d5aa18a7c393fe9c714b2")
|
||||
(package! orgit :pin "a57beefa24712430fe6b5016b9273129931a8287")
|
||||
(when (modulep! :tools magit +forge)
|
||||
(package! orgit-forge :pin "f2ff9e5ad68b3e860379a1d368ad6d8a9696b719")))
|
||||
(when (modulep! +brain)
|
||||
|
@ -84,11 +84,11 @@
|
|||
(when (modulep! +ipython) ; DEPRECATED
|
||||
(package! ob-ipython :pin "7147455230841744fb5b95dcbe03320313a77124"))
|
||||
(when (modulep! +jupyter)
|
||||
(package! jupyter :pin "da306a6dbda6f1e285281765a311938a1d9db022"))
|
||||
(package! jupyter :pin "2059d79b2fecf6d25a6c796b69ab954645ec37d1"))
|
||||
(when (modulep! +journal)
|
||||
(package! org-journal :pin "605a7eb984a95fc6ec122df800632bf56ff59514"))
|
||||
(package! org-journal :pin "17b34ce8df9649a73b715c13698220bde1628668"))
|
||||
(when (modulep! +noter)
|
||||
(package! org-noter :pin "8be376384772c1f053cb2ce907ddf4d484b390dd"))
|
||||
(package! org-noter :pin "9e4f57957b8f54db20a4e13bf8d6b32e004ab3e8"))
|
||||
(when (modulep! +pomodoro)
|
||||
(package! org-pomodoro :pin "3f5bcfb80d61556d35fc29e5ddb09750df962cc6"))
|
||||
(when (modulep! +pretty)
|
||||
|
@ -100,11 +100,11 @@
|
|||
:recipe (:host github :repo "anler/centered-window-mode")
|
||||
:pin "80965f6c6afe8d918481433984b493de72af5399")
|
||||
(package! org-tree-slide :pin "e2599a106a26ce5511095e23df4ea04be6687a8a")
|
||||
(package! org-re-reveal :pin "7c39d15b841c7a8d197a24c89e5fef5d54e271aa")
|
||||
(package! org-re-reveal :pin "1944ac53d4cdd0fb250cc575447d5e6320fd5f81")
|
||||
(package! revealjs
|
||||
:recipe (:host github :repo "hakimel/reveal.js"
|
||||
:files ("css" "dist" "js" "plugin"))
|
||||
:pin "16f6633014672567de85aefd1f4639ffea0dde56"))
|
||||
:pin "6410c756ea91ded3fa5f6b40a872523e7b8fe723"))
|
||||
(cond
|
||||
((modulep! +roam)
|
||||
(package! org-roam
|
||||
|
@ -162,6 +162,6 @@
|
|||
(when (modulep! +hugo)
|
||||
(package! ox-hugo
|
||||
:recipe (:host github :repo "kaushalmodi/ox-hugo" :nonrecursive t)
|
||||
:pin "cb1b6cfd7b080e889352150416c1725f11ba937a"))
|
||||
:pin "c4156d9d383bf97853ba9e16271b7c4d5e697f49"))
|
||||
(when (modulep! :lang rst)
|
||||
(package! ox-rst :pin "99fa790da55b57a3f2e9aa187493ba434a64250e"))
|
||||
|
|
|
@ -48,7 +48,36 @@
|
|||
(if (modulep! :tools lsp +eglot)
|
||||
'eglot
|
||||
'lsp-mode))
|
||||
(add-hook 'rustic-mode-local-vars-hook #'rustic-setup-lsp 'append))
|
||||
(add-hook 'rustic-mode-local-vars-hook #'rustic-setup-lsp 'append)
|
||||
|
||||
;; HACK: Add @scturtle fix for signatures on hover on LSP mode. This code
|
||||
;; has not been upstreamed because it depends on the exact format of the
|
||||
;; response of Rust Analyzer, which is not stable enough for `lsp-mode'
|
||||
;; maintainers (see emacs-lsp/lsp-mode#1740).
|
||||
(unless (modulep! :tools lsp +eglot)
|
||||
(defadvice! +rust--dont-cache-results-from-ra-a (fn &rest args)
|
||||
:after #'lsp-eldoc-function
|
||||
(when (derived-mode-p 'rust-mode 'rust-ts-mode)
|
||||
(setq lsp--hover-saved-bounds nil)))
|
||||
|
||||
;; extract and show short signature for rust-analyzer
|
||||
(cl-defmethod lsp-clients-extract-signature-on-hover (contents (_server-id (eql rust-analyzer)))
|
||||
(let* ((value (if lsp-use-plists (plist-get contents :value) (gethash "value" contents)))
|
||||
(groups (--partition-by (s-blank? it) (s-lines (s-trim value))))
|
||||
(mod-group (cond ((s-equals? "```rust" (car (-fifth-item groups))) (-third-item groups))
|
||||
((s-equals? "```rust" (car (-third-item groups))) (-first-item groups))
|
||||
(t nil)))
|
||||
(cmt (if (null mod-group) "" (concat " // " (cadr mod-group))))
|
||||
(sig-group (cond ((s-equals? "```rust" (car (-fifth-item groups))) (-fifth-item groups))
|
||||
((s-equals? "```rust" (car (-third-item groups))) (-third-item groups))
|
||||
(t (-first-item groups))))
|
||||
(sig (->> sig-group
|
||||
(--drop-while (s-equals? "```rust" it))
|
||||
(--take-while (not (s-equals? "```" it)))
|
||||
(--map (s-replace-regexp "//.*" "" it))
|
||||
(--map (s-trim it))
|
||||
(s-join " "))))
|
||||
(lsp--render-element (concat "```rust\n" sig cmt "\n```"))))))
|
||||
|
||||
(when (modulep! +tree-sitter)
|
||||
(add-hook 'rustic-mode-local-vars-hook #'tree-sitter! 'append))
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; lang/scala/packages.el
|
||||
|
||||
(package! sbt-mode :pin "9fe1e8807c22cc1dc56a6233e000969518907f4d")
|
||||
(package! sbt-mode :pin "cc68728a6ef0600aad369157b3a2d0ce56afba9b")
|
||||
(package! scala-mode :pin "4c6d636b86e3bb1d95de819dc48dda92abdfbcf4")
|
||||
|
||||
(when (and (modulep! +lsp)
|
||||
(not (modulep! :tools lsp +eglot)))
|
||||
(package! lsp-metals :pin "da7e54ed65f4e153c94b9c54689908dce142ef37"))
|
||||
(package! lsp-metals :pin "e55d544996f7321622e1eeafdc3dd128f8e72ce5"))
|
||||
|
|
|
@ -8,7 +8,8 @@ be aligned.
|
|||
|
||||
If set to `nil', disable all the above behaviors.")
|
||||
|
||||
(add-to-list 'find-sibling-rules '("/\\([^/]+\\)\\.\\(\\(s[ac]\\|le\\)ss\\|styl\\)\\'" "\\1\\.css"))
|
||||
(add-to-list 'find-sibling-rules '("/\\([^/]+\\)\\.\\(\\(s[ac]\\|le\\)ss\\|styl\\)\\'" "\\1\\.css\\'"))
|
||||
(add-to-list 'find-sibling-rules '("/\\([^/]+\\)\\.css\\'" "\\1\\.\\(\\(s[ac]\\|le\\)ss\\|styl\\)\\'"))
|
||||
|
||||
|
||||
;;
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; term/eshell/packages.el
|
||||
|
||||
(package! eshell-up :pin "ff84e6069b98f2ed00857a0f78bff19d96e4955c")
|
||||
(package! eshell-up :pin "1999afaa509204b780db44e99ac9648fe7d92d32")
|
||||
(package! eshell-z :pin "337cb241e17bd472bd3677ff166a0800f684213c")
|
||||
(package! shrink-path :pin "c14882c8599aec79a6e8ef2d06454254bb3e1e41")
|
||||
(package! esh-help :pin "417673ed18a983930a66a6692dbfb288a995cb80")
|
||||
(package! eshell-did-you-mean :pin "80cd8c4b186a2fb29621cf634bcf2bcd914f1e3d")
|
||||
(package! eshell-syntax-highlighting :pin "4ac27eec6595ba116a6151dfaf0b0e0440101e10")
|
||||
(package! eshell-syntax-highlighting :pin "1d25386bf7d1a97e083d33750a98fbd1c6598138")
|
||||
|
||||
(unless (featurep :system 'windows)
|
||||
(package! fish-completion :pin "d34d0b96fde63feedf13c4288183d8d4d4d748cf")
|
||||
(package! fish-completion :pin "006c613ff7f846b7d0a14422f2bdcc28b21205b8")
|
||||
(package! bash-completion :pin "f1daac0386c24cbe8a244a62c7588cc6847b07ae"))
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; tools/ansible/packages.el
|
||||
|
||||
(package! ansible :recipe (:nonrecursive t) :pin "d89ac0ee57742cca0f0e0a3453d9dcc521575690")
|
||||
(package! ansible :recipe (:nonrecursive t) :pin "1d7de8d3ddac980715eebd87ee66859f8665b101")
|
||||
(package! ansible-doc :pin "86083a7bb2ed0468ca64e52076b06441a2f8e9e0")
|
||||
(package! jinja2-mode :pin "03e5430a7efe1d163a16beaf3c82c5fd2c2caee1")
|
||||
(package! yaml-mode :pin "5b58248ab255dff6cfa4c4057a191bc4446ee5b6")
|
||||
(package! yaml-mode :pin "7b5ce294fb15c2c8926fa476d7218aa415550a2a")
|
||||
|
||||
(when (modulep! :completion company)
|
||||
(package! company-ansible :pin "79dd421b161efa49fbdffad57fa40edb41f484a3"))
|
||||
(package! company-ansible :pin "338922601cf9e8ada863fe6f2dd9d5145d9983b0"))
|
||||
|
|
|
@ -2,16 +2,16 @@
|
|||
;;; tools/biblio/packages.el
|
||||
|
||||
(when (modulep! :completion ivy)
|
||||
(package! bibtex-completion :pin "bf184cc311c9e1724f8b2eaf75b9e202c3aedd16")
|
||||
(package! ivy-bibtex :pin "bf184cc311c9e1724f8b2eaf75b9e202c3aedd16"))
|
||||
(package! bibtex-completion :pin "8b71b4f5ce62eeaf18067f57faaddc06449fbe1c")
|
||||
(package! ivy-bibtex :pin "8b71b4f5ce62eeaf18067f57faaddc06449fbe1c"))
|
||||
(when (modulep! :completion helm)
|
||||
(package! bibtex-completion :pin "bf184cc311c9e1724f8b2eaf75b9e202c3aedd16")
|
||||
(package! helm-bibtex :pin "bf184cc311c9e1724f8b2eaf75b9e202c3aedd16"))
|
||||
(package! bibtex-completion :pin "8b71b4f5ce62eeaf18067f57faaddc06449fbe1c")
|
||||
(package! helm-bibtex :pin "8b71b4f5ce62eeaf18067f57faaddc06449fbe1c"))
|
||||
(when (modulep! :completion vertico)
|
||||
(package! citar :pin "885b86f6733fd70f42c32dd7791d3447f93db990")
|
||||
(package! citar-embark :pin "885b86f6733fd70f42c32dd7791d3447f93db990")
|
||||
(when (modulep! :lang org +roam2)
|
||||
(package! citar-org-roam :pin "7d67dccf80065a88cb86ce9a8274383a9e8269c1")))
|
||||
(package! citar-org-roam :pin "82d47b5df1926627f56a09055c69b49b31cbbb9f")))
|
||||
|
||||
(package! parsebib :pin "ace9df707108b17759c004c7387655277122d4c1")
|
||||
(package! citeproc :pin "c61c98b9d230ea28b2ca49498134803e1f8ea526")
|
||||
(package! citeproc :pin "44f90cb296766e03fffc28b7892521ab0e8709f1")
|
||||
|
|
|
@ -6,5 +6,5 @@
|
|||
(package! realgud-trepan-ni :pin "0ec088ea343835e24ae73da09bea96bfb02a3130")))
|
||||
|
||||
(when (modulep! +lsp)
|
||||
(package! dap-mode :pin "2f0c5b28578ce65ec746e4084ba72ba5c652ea79")
|
||||
(package! dap-mode :pin "c95537c58e8f3ceac9c827ddf89e4928b24a1cc7")
|
||||
(package! posframe :pin "017deece88360c7297265680d78a0bb316470716"))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; tools/direnv/packages.el
|
||||
|
||||
(package! envrc :pin "1385e72a730924664697a0961d43516a47a977d7")
|
||||
(package! envrc :pin "8eb7401700b0080902ce200ad610ff8d2f2dcc27")
|
||||
|
|
|
@ -95,14 +95,8 @@ C-x C-f /docker:$USER@$CONTAINER:/path/to/file
|
|||
Thanks to [[https://github.com/magit/magit-popup][magit-popup]], all the popups default arguments can be customized. For
|
||||
example, here is how to customize the arguments for =docker-image-run-popup=:
|
||||
#+begin_src emacs-lisp
|
||||
(setq docker-image-run-arguments '("-i" "-t" "--rm"))
|
||||
#+end_src
|
||||
|
||||
or inside a =use-package= declaration:
|
||||
#+begin_src emacs-lisp
|
||||
(use-package! docker
|
||||
:bind ("C-c d" . docker)
|
||||
:custom (docker-image-run-arguments '("-i" "-t" "--rm")))
|
||||
(after! docker
|
||||
(setq docker-image-run-arguments '("-i" "-t" "--rm")))
|
||||
#+end_src
|
||||
|
||||
*** Other useful variables
|
||||
|
|
|
@ -5,4 +5,4 @@
|
|||
;; tramp-container (included with Emacs 29+) replaces docker-tramp
|
||||
(when (< emacs-major-version 29)
|
||||
(package! docker-tramp :pin "19d0771db4e6b89e19c00af5806438e315779c15"))
|
||||
(package! dockerfile-mode :pin "52c6c00da1d31c0b6c29c74335b3af63ed6bf06c")
|
||||
(package! dockerfile-mode :pin "39a012a27fcf6fb629c447d13b6974baf906714c")
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
|
||||
(package! editorconfig
|
||||
:recipe (:nonrecursive t)
|
||||
:pin "c3666c093f3a2a80fb42e513bf0a10d597497c18")
|
||||
:pin "d73b6392ded0476af93ec7ba75cca2909aa8d2dc")
|
||||
|
|
|
@ -72,6 +72,38 @@
|
|||
output source-buffer)
|
||||
output)
|
||||
|
||||
;;;###autoload
|
||||
(defun +eval-region-as-major-mode (beg end &optional runner-major-mode)
|
||||
"Evaluate a region between BEG and END and display the output.
|
||||
|
||||
Evaluate as in RUNNER-MAJOR-MODE. If RUNNER-MAJOR-MODE is nil, use major-mode
|
||||
of the buffer instead."
|
||||
(let ((load-file-name buffer-file-name)
|
||||
(load-true-file-name
|
||||
(or buffer-file-truename
|
||||
(if buffer-file-name
|
||||
(file-truename buffer-file-name))))
|
||||
(runner-major-mode (or runner-major-mode major-mode)))
|
||||
(cond ((if (fboundp '+eval--ensure-in-repl-buffer)
|
||||
(ignore-errors
|
||||
(get-buffer-window (or (+eval--ensure-in-repl-buffer)
|
||||
t))))
|
||||
(funcall (or (plist-get (cdr (alist-get runner-major-mode +eval-repls)) :send-region)
|
||||
#'+eval/send-region-to-repl)
|
||||
beg end))
|
||||
((let (lang)
|
||||
(if-let ((runner
|
||||
(or (alist-get runner-major-mode +eval-runners)
|
||||
(and (require 'quickrun nil t)
|
||||
(equal (setq
|
||||
lang (quickrun--command-key
|
||||
(buffer-file-name (buffer-base-buffer))))
|
||||
"emacs")
|
||||
(alist-get 'emacs-lisp-mode +eval-runners)))))
|
||||
(funcall runner beg end)
|
||||
(let ((quickrun-option-cmdkey lang))
|
||||
(quickrun-region beg end))))))))
|
||||
|
||||
|
||||
;;
|
||||
;;; Commands
|
||||
|
@ -103,31 +135,7 @@
|
|||
(defun +eval/region (beg end)
|
||||
"Evaluate a region between BEG and END and display the output."
|
||||
(interactive "r")
|
||||
(let ((load-file-name buffer-file-name)
|
||||
(load-true-file-name
|
||||
(or buffer-file-truename
|
||||
(if buffer-file-name
|
||||
(file-truename buffer-file-name)))))
|
||||
(cond ((and (fboundp '+eval--ensure-in-repl-buffer)
|
||||
(ignore-errors
|
||||
(get-buffer-window (or (+eval--ensure-in-repl-buffer)
|
||||
t))))
|
||||
(funcall (or (plist-get (cdr (alist-get major-mode +eval-repls)) :send-region)
|
||||
#'+eval/send-region-to-repl)
|
||||
beg end))
|
||||
((let ((runner
|
||||
(or (alist-get major-mode +eval-runners)
|
||||
(and (require 'quickrun nil t)
|
||||
(equal (setq
|
||||
lang (quickrun--command-key
|
||||
(buffer-file-name (buffer-base-buffer))))
|
||||
"emacs")
|
||||
(alist-get 'emacs-lisp-mode +eval-runners))))
|
||||
lang)
|
||||
(if runner
|
||||
(funcall runner beg end)
|
||||
(let ((quickrun-option-cmdkey lang))
|
||||
(quickrun-region beg end))))))))
|
||||
(+eval-region-as-major-mode beg end))
|
||||
|
||||
;;;###autoload
|
||||
(defun +eval/line-or-region ()
|
||||
|
|
|
@ -50,7 +50,9 @@
|
|||
|
||||
(defun +eval-repl-known-repls ()
|
||||
"Yield the available repl functions as a list of symbols."
|
||||
(seq-uniq (mapcar (pcase-lambda (`(,mode ,fn . _)) (list mode fn)) +eval-repls)))
|
||||
(cl-delete-duplicates
|
||||
(mapcar (lambda! ((mode fn &rest _)) (list mode fn))
|
||||
+eval-repls)))
|
||||
|
||||
(defun +doom-pretty-mode-name (mode)
|
||||
"Convert a mode name into a variant nicer for human eyes."
|
||||
|
@ -82,15 +84,15 @@ human-readable variant of its associated major mode name."
|
|||
|
||||
(defun +eval-repl-prompt ()
|
||||
"Prompt the user for the choice of a repl to open."
|
||||
(let* ((knowns (mapcar (pcase-lambda (`(,mode ,fn)) (list (+doom-pretty-mode-name mode) fn))
|
||||
(let* ((knowns (mapcar (lambda! ((mode fn)) (list (+doom-pretty-mode-name mode) fn))
|
||||
(+eval-repl-known-repls)))
|
||||
(founds (mapcar (lambda (fn) (list (+eval-pretty-mode-name-from-fn fn) fn))
|
||||
(+eval-repl-found-repls)))
|
||||
(repls (seq-uniq (append knowns founds)))
|
||||
(names (mapcar #'cl-first repls))
|
||||
(repls (cl-delete-duplicates (append knowns founds)))
|
||||
(names (mapcar #'car repls))
|
||||
(choice (or (completing-read "Open a REPL for: " names)
|
||||
(user-error "Aborting"))))
|
||||
(cl-second (assoc choice repls))))
|
||||
(cadr (assoc choice repls))))
|
||||
|
||||
(defun +eval-repl-from-major-mode ()
|
||||
"Fetch the repl associated with the current major mode, if there
|
||||
|
@ -103,8 +105,7 @@ is one."
|
|||
prompted for a repl choice, even if the major mode they're in
|
||||
already has a known one."
|
||||
(pcase-let* ((`(,fn ,plist) (+eval-repl-from-major-mode))
|
||||
(fn (cond ((or prompt-p (not fn)) (+eval-repl-prompt))
|
||||
(t fn)))
|
||||
(fn (if (or prompt-p (not fn)) (+eval-repl-prompt) fn))
|
||||
(region (when (use-region-p)
|
||||
(buffer-substring-no-properties (region-beginning)
|
||||
(region-end)))))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; tools/eval/packages.el
|
||||
|
||||
(package! quickrun :pin "248149b0261051bd9eec8bdbc21c22d18d7b1b11")
|
||||
(package! quickrun :pin "373634cf5143f9680164e27fa844d3b02408e917")
|
||||
(when (modulep! +overlay)
|
||||
(package! eros :pin "a9a92bdc6be0521a6a06eb464be55ed61946639c"))
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
(when (modulep! +dictionary)
|
||||
(if (featurep :system 'macos)
|
||||
(package! osx-dictionary :pin "1f5a74f3e5d7f3c443f07433951512cd99e820a6")
|
||||
(package! osx-dictionary :pin "6abfd6908b0dc773020466225c908000870b383b")
|
||||
(package! define-word :pin "31a8c67405afa99d0e25e7c86a4ee7ef84a808fe")
|
||||
;; REVIEW: This fork fixes SavchenkoValeriy/emacs-powerthesaurus#40.
|
||||
(package! powerthesaurus
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
:commands eglot eglot-ensure
|
||||
:hook (eglot-managed-mode . +lsp-optimization-mode)
|
||||
:init
|
||||
(defadvice! +eglot--ensure-available-mode (fn)
|
||||
(defadvice! +eglot--ensure-available-mode-a (fn)
|
||||
"Run `eglot-ensure' if the current mode has support."
|
||||
:around #'eglot-ensure
|
||||
(when (alist-get major-mode eglot-server-programs nil nil
|
||||
|
@ -15,7 +15,6 @@
|
|||
(funcall fn)))
|
||||
(setq eglot-sync-connect 1
|
||||
eglot-autoshutdown t
|
||||
eglot-send-changes-idle-time 0.5
|
||||
;; NOTE: We disable eglot-auto-display-help-buffer because :select t in
|
||||
;; its popup rule causes eglot to steal focus too often.
|
||||
eglot-auto-display-help-buffer nil)
|
||||
|
@ -44,8 +43,8 @@
|
|||
(defadvice! +lsp--defer-server-shutdown-a (fn &optional server)
|
||||
"Defer server shutdown for a few seconds.
|
||||
This gives the user a chance to open other project files before the server is
|
||||
auto-killed (which is a potentially expensive process). It also prevents the
|
||||
server getting expensively restarted when reverting buffers."
|
||||
auto-killed (which is a potentially expensive process). It also spares the
|
||||
server an expensive restart when its buffer is reverted."
|
||||
:around #'eglot--managed-mode
|
||||
(letf! (defun eglot-shutdown (server)
|
||||
(if (or (null +lsp-defer-shutdown)
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
|
||||
(if (modulep! +eglot)
|
||||
(progn
|
||||
(package! eglot :pin "24f2bf7b28c33e1d677b547956ade5560d27f55f")
|
||||
(package! eglot :pin "678610fdc544f10ac757ab7acf88ac7c5815ed5a")
|
||||
(when (modulep! :completion vertico)
|
||||
(package! consult-eglot :pin "049c6319b8a48ff66189d49592c7759f0b356596"))
|
||||
(package! consult-eglot :pin "64262e72452f8fe6dd49d31bcdd4bd577b7d682d"))
|
||||
(when (and (modulep! :checkers syntax)
|
||||
(not (modulep! :checkers syntax +flymake)))
|
||||
(package! flycheck-eglot :pin "114e1315aaf0dc3196da67da426bbe2b46384fe2")))
|
||||
(package! lsp-mode :pin "a5f5ca9a8a4b2ceaf236457bf2524f94c183c2f2")
|
||||
(package! lsp-ui :pin "bc58c6664577d1d79060c6b32b7ad20e70ee19d0")
|
||||
(package! lsp-mode :pin "8861252880f6c2f6374a7bca2b945e6447eebd5a")
|
||||
(package! lsp-ui :pin "942eeecc3d9a23ad006a3476885dfa7cbb5e207e")
|
||||
(when (modulep! :completion ivy)
|
||||
(package! lsp-ivy :pin "9ecf4dd9b1207109802bd1882aa621eb1c385106"))
|
||||
(when (modulep! :completion helm)
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; tools/magit/packages.el
|
||||
|
||||
(when (package! magit :pin "0963697f24cfbe80f92312044bd9ab28b914b053")
|
||||
(when (package! magit :pin "b5637d665c1e5bd5b76ffb072dbac387f37a5f63")
|
||||
(when (modulep! +forge)
|
||||
(package! forge :pin "68771ca4d53c3aea5c860eeb888cee8e9cb5ca37")
|
||||
(package! forge :pin "ad94b5665de357347bfc52910eef46a79f74988d")
|
||||
(package! code-review
|
||||
:recipe (:host github
|
||||
:repo "doomelpa/code-review"
|
||||
:files ("graphql" "code-review*.el"))
|
||||
:pin "e4c34fa284da25d8e0bafbae4300f1db5bdcda44"))
|
||||
(package! magit-todos :pin "1e9acc0ba63fbc297001bf334d63cb4326be80df"))
|
||||
(package! magit-todos :pin "332ce763f7336ea356964b92723678aa1ed4640f"))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; tools/pdf/packages.el
|
||||
|
||||
(package! pdf-tools :pin "c69e7656a4678fe25afbd29f3503dd19ee7f9896")
|
||||
(package! saveplace-pdf-view :pin "abfb5e1f463cffc18218a0f7f2fa141a271b1813")
|
||||
(package! pdf-tools :pin "a1048bceb2bd3f635437b0f2bfac27cae8c2dabc")
|
||||
(package! saveplace-pdf-view :pin "ee95460cd934080338f03a16f95b549577425216")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; tools/terraform/packages.el
|
||||
|
||||
(package! terraform-mode :pin "e8b57df8c2a3d3171f3768f60eb84067f553289c")
|
||||
(package! terraform-mode :pin "a645c32a8f0f0d04034262ae5fea330d5c7a33c6")
|
||||
(when (modulep! :completion company)
|
||||
(package! company-terraform :pin "8d5a16d1bbeeb18ca49a8fd57b5d8cd30c8b8dc7"))
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
;;; tools/tree-sitter/packages.el
|
||||
|
||||
(package! tree-sitter :pin "3cfab8a0e945db9b3df84437f27945746a43cc71")
|
||||
(package! tree-sitter-langs :pin "20fbbb85735a9196ba3e7fb33f99b3a904b363ba")
|
||||
(package! tree-sitter-langs :pin "b7895ca759563f3c7c3b928eb4f816bb4099d866")
|
||||
(package! tree-sitter-indent :pin "4ef246db3e4ff99f672fe5e4b416c890f885c09e")
|
||||
|
||||
(when (modulep! :editor evil +everywhere)
|
||||
(package! evil-textobj-tree-sitter
|
||||
:pin "220ceae065852ef4f717fa41efd1ab51ca2346d3"))
|
||||
:pin "a19ab9d89a00f4a04420f9b5d61b66f04fea5261"))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; ui/deft/packages.el
|
||||
|
||||
(package! deft :pin "28be94d89bff2e1c7edef7244d7c5ba0636b1296")
|
||||
(package! deft :pin "bb1a16b87c3e0fe70fade6227e47dd7712b89bf6")
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; ui/doom/packages.el
|
||||
|
||||
(package! doom-themes :pin "ff26f26ea3d761375f5fc4070438fbd0f3473d33")
|
||||
(package! solaire-mode :pin "8af65fbdc50b25ed3214da949b8a484527c7cc14")
|
||||
(package! doom-themes :pin "3b2422b208d28e8734b300cd3cc6a7f4af5eba55")
|
||||
(package! solaire-mode :pin "8ccdceeb9298b3c4e35f630914f467bf164f39ad")
|
||||
|
|
|
@ -161,12 +161,13 @@ and cannot run in."
|
|||
(fboundp 'mac-auto-operator-composition-mode))
|
||||
(add-hook 'doom-init-ui-hook #'mac-auto-operator-composition-mode 'append))
|
||||
|
||||
;; NOTE: the module does not support Emacs 27 and less, but if we still try to enable ligatures,
|
||||
;; it will end up in catastrophic work-loss errors, so we leave the check here for safety.
|
||||
;; This module does not support Emacs 27 and less, but if we still try to
|
||||
;; enable ligatures, it will end up in catastrophic work-loss errors, so we
|
||||
;; leave the check here for safety.
|
||||
((and (> emacs-major-version 27)
|
||||
(or (featurep 'ns)
|
||||
(string-match-p "HARFBUZZ" system-configuration-features))
|
||||
(featurep 'composite)) ; Emacs loads `composite' at startup
|
||||
(featurep 'harfbuzz))
|
||||
(featurep 'composite)) ; Emacs loads `composite' at startup
|
||||
|
||||
(use-package! ligature
|
||||
:config
|
||||
|
|
|
@ -96,7 +96,7 @@ Some possible solutions:
|
|||
(after! doom-modeline
|
||||
(doom-modeline-def-modeline 'main
|
||||
'(bar matches buffer-info remote-host buffer-position parrot selection-info)
|
||||
'(misc-info minor-modes checker input-method buffer-encoding major-mode process vcs " "))) ; <-- added padding here
|
||||
'(misc-info minor-modes check input-method buffer-encoding major-mode process vcs " "))) ; <-- added padding here
|
||||
#+end_src
|
||||
|
||||
2. Use another font for the mode line (or a different ~:height~) (source)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
;;; ui/modeline/packages.el
|
||||
|
||||
(unless (modulep! +light)
|
||||
(package! doom-modeline :pin "bf880ae56f3f6aab7bd334de9bd9b455c63a24c0"))
|
||||
(package! doom-modeline :pin "e09b8e989fa5fc1d98320aaa29d7138631b20ae5"))
|
||||
(package! anzu :pin "26fb50b429ee968eb944b0615dd0aed1dd66172c")
|
||||
(when (modulep! :editor evil)
|
||||
(package! evil-anzu :pin "d1e98ee6976437164627542909a25c6946497899"))
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
neo-mode-line-type 'none
|
||||
neo-window-width 30
|
||||
neo-show-updir-line nil
|
||||
neo-theme 'icons
|
||||
neo-theme 'nerd
|
||||
neo-banner-message nil
|
||||
neo-confirm-create-file #'off-p
|
||||
neo-confirm-create-directory #'off-p
|
||||
|
|
|
@ -106,7 +106,7 @@ the buffer is visible, then set another timer and try again later."
|
|||
(param (if (memq side '(left right))
|
||||
'window-width
|
||||
'window-height)))
|
||||
(setq list (assq-delete-all 'size alist))
|
||||
(setq alist (assq-delete-all 'size alist))
|
||||
(setf (alist-get param alist) size))
|
||||
(setf (alist-get 'window-parameters alist)
|
||||
parameters)
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
;;; ui/tabs/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(defcustom +tabs-buffer-update-groups-delay 0.1
|
||||
"Minimum wait time (in seconds) before tab groups are recalculated."
|
||||
:type 'float
|
||||
:group 'doom)
|
||||
|
||||
|
||||
;;
|
||||
;;; Packages
|
||||
|
||||
(use-package! centaur-tabs
|
||||
:hook (doom-first-file . centaur-tabs-mode)
|
||||
:init
|
||||
|
@ -20,7 +29,20 @@
|
|||
(defun +tabs-disable-centaur-tabs-mode-maybe-h ()
|
||||
"Disable `centaur-tabs-mode' in current buffer."
|
||||
(when (centaur-tabs-mode-on-p)
|
||||
(centaur-tabs-local-mode)))))
|
||||
(centaur-tabs-local-mode))))
|
||||
|
||||
;; HACK: `centaur-tabs-buffer-update-groups' is both expensive and called too
|
||||
;; frequently. There really is no reason to call it more than 10 times per
|
||||
;; second, as buffers rarely change groups more frequently than that.
|
||||
(let ((time (float-time)))
|
||||
(defadvice! +tabs--rate-limit-buffer-update-groups-a (fn)
|
||||
:around #'centaur-tabs-buffer-update-groups
|
||||
(let ((now (float-time)))
|
||||
(if-let ((buf (and (< now (+ time +tabs-buffer-update-groups-delay))
|
||||
(assq (current-buffer) centaur-tabs--buffers))))
|
||||
(car (nth 2 buf))
|
||||
(setq time now)
|
||||
(funcall fn))))))
|
||||
|
||||
|
||||
;; TODO tab-bar-mode (emacs 27)
|
||||
|
|
|
@ -26,7 +26,7 @@ This must be set before `treemacs' has loaded.")
|
|||
treemacs-persist-file (concat doom-cache-dir "treemacs-persist")
|
||||
treemacs-last-error-persist-file (concat doom-cache-dir "treemacs-last-error-persist"))
|
||||
:config
|
||||
;; Don't follow the cursor
|
||||
;; Don't follow the cursor (it's more disruptive/jarring than helpful as a default)
|
||||
(treemacs-follow-mode -1)
|
||||
|
||||
(set-popup-rule! "^ ?\\*Treemacs" :ignore t)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; ui/treemacs/packages.el
|
||||
|
||||
(package! treemacs :pin "df26b6ab9a0f467e5ff99f7ed97551ccf756e06c")
|
||||
(package! treemacs :pin "8c6df39f01a4d47fda2cc943645fa067f771b748")
|
||||
(package! treemacs-nerd-icons :pin "9876cb478145a0ec4e36f64ff6583f3de7126216")
|
||||
;; These packages have no :pin because they're in the same repo
|
||||
(when (modulep! :editor evil +everywhere)
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
;;; ui/vc-gutter/packages.el
|
||||
|
||||
(if (modulep! +diff-hl)
|
||||
(package! diff-hl :pin "b8b2727a72fdf64ac98e6cfa136a43cb0cacf72f")
|
||||
(package! diff-hl :pin "96620839430c1205cbb8c92dd54973397f70f9d2")
|
||||
(package! git-gutter-fringe :pin "648cb5b57faec55711803cdc9434e55a733c3eba"))
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
;;; ui/workspaces/autoload/ivy.el -*- lexical-binding: t; -*-
|
||||
;;;###if (modulep! :completion ivy)
|
||||
|
||||
;;;###autoload
|
||||
(defun +workspace--ivy-rich-preview (workspace)
|
||||
(if-let (buffers (when-let (workspace (gethash workspace *persp-hash*))
|
||||
(cl-loop for (type . rest) in (persp-window-conf workspace)
|
||||
if (eq type 'buffer)
|
||||
collect (car leaf)
|
||||
else if (eq type 'leaf)
|
||||
append (cl-loop for (type . leaf) in rest
|
||||
if (eq type 'buffer)
|
||||
collect (car leaf)))))
|
||||
(string-join buffers " ")
|
||||
"*No buffers*"))
|
||||
|
||||
;;; ivy.el ends here
|
|
@ -318,12 +318,7 @@ workspace, otherwise the new workspace is blank."
|
|||
end of the workspace list."
|
||||
(interactive
|
||||
(list (or current-prefix-arg
|
||||
(if (modulep! :completion ivy)
|
||||
(ivy-read "Switch to workspace: "
|
||||
(+workspace-list-names)
|
||||
:caller #'+workspace/switch-to
|
||||
:preselect (+workspace-current-name))
|
||||
(completing-read "Switch to workspace: " (+workspace-list-names))))))
|
||||
(completing-read "Switch to workspace: " (+workspace-list-names)))))
|
||||
(when (and (stringp index)
|
||||
(string-match-p "^[0-9]+$" index))
|
||||
(setq index (string-to-number index)))
|
||||
|
|
|
@ -84,9 +84,10 @@ stored in `persp-save-dir'.")
|
|||
;; HACK Fix #319: the warnings buffer gets swallowed when creating
|
||||
;; `+workspaces-main', so display it ourselves, if it exists.
|
||||
(when-let (warnings (get-buffer "*Warnings*"))
|
||||
(save-excursion
|
||||
(display-buffer-in-side-window
|
||||
warnings '((window-height . shrink-window-if-larger-than-buffer))))))))
|
||||
(unless (get-buffer-window warnings)
|
||||
(save-excursion
|
||||
(display-buffer-in-side-window
|
||||
warnings '((window-height . shrink-window-if-larger-than-buffer)))))))))
|
||||
(defun +workspaces-init-persp-mode-h ()
|
||||
(cond (persp-mode
|
||||
;; `uniquify' breaks persp-mode. It renames old buffers, which causes
|
||||
|
@ -206,13 +207,6 @@ stored in `persp-save-dir'.")
|
|||
("xt" counsel-projectile-switch-project-action-run-term "invoke term from project root")
|
||||
("X" counsel-projectile-switch-project-action-org-capture "org-capture into project")))
|
||||
|
||||
(when (modulep! :completion ivy)
|
||||
(after! ivy-rich
|
||||
(cl-callf plist-put ivy-rich-display-transformers-list
|
||||
'+workspace/switch-to
|
||||
'(:columns ((ivy-rich-candidate (:width 50))
|
||||
(+workspace--ivy-rich-preview))))))
|
||||
|
||||
(when (modulep! :completion helm)
|
||||
(after! helm-projectile
|
||||
(setcar helm-source-projectile-projects-actions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue