Compare commits
No commits in common. "9b7413332e4364fb8b18e56f9c76a905a1a7fbaa" and "1bdb5ed1565bebe58700f8207ccb7c6de2f7d212" have entirely different histories.
9b7413332e
...
1bdb5ed156
86
init.org
86
init.org
|
@ -523,10 +523,12 @@ Honestly not very happy with this at the moment, but it's kind of hacked togethe
|
|||
"wd" #'delete-window
|
||||
"wo" #'delete-other-windows
|
||||
"ff" #'find-file
|
||||
"fi" '("Edit init.org" . nemo/edit-init-org)
|
||||
"fs" '("Save" . save-buffer)
|
||||
"fr" '("rg" . consult-ripgrep)
|
||||
"fR" '("rg in dir" . nemo/consult-ripgrep-dir)
|
||||
"fi" #'nemo/edit-init-org
|
||||
"fs" #'save-buffer
|
||||
"fr" #'consult-ripgrep
|
||||
"fR" (lambda () (interactive)
|
||||
(let ((dir (read-directory-name "Ripgrep directory: ")))
|
||||
(consult-ripgrep dir)))
|
||||
)
|
||||
)
|
||||
#+end_src
|
||||
|
@ -1100,6 +1102,7 @@ Use the =move-text= package to move the current line or selection up or down wit
|
|||
read-file-name-completion-ignore-case t)
|
||||
(vertico-multiform-mode)
|
||||
)
|
||||
|
||||
#+end_src
|
||||
|
||||
Use =vertico-posframe= to make the =vertico= buffer floating in the centre of the frame.
|
||||
|
@ -1114,9 +1117,6 @@ Use =vertico-posframe= to make the =vertico= buffer floating in the centre of th
|
|||
vertico-multiform-commands
|
||||
'((consult-line (:not posframe))
|
||||
(consult-ripgrep (:not posframe))
|
||||
(nemo/consult-ripgrep (:not posframe))
|
||||
(nemo/consult-ripgrep-dir (:not posframe))
|
||||
(lsp-find-references (:not posframe))
|
||||
(embark-act (:not posframe))
|
||||
(t posframe))
|
||||
))
|
||||
|
@ -1143,27 +1143,17 @@ Use =consult-xref= for =lsp-xref= and =xref-find-references=.
|
|||
#+end_src
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun nemo/exec-without-posframe (fn &rest args)
|
||||
"Execute FN with ARGS while temporarily disabling vertico-posframe-mode."
|
||||
(defun my-consult-line-wrapper ()
|
||||
(interactive)
|
||||
(vertico-posframe-mode -1)
|
||||
(unwind-protect
|
||||
(apply fn args)
|
||||
(vertico-posframe-mode 1)))
|
||||
(consult-line)
|
||||
(vertico-posframe-mode 1))
|
||||
|
||||
(defun nemo/consult-line ()
|
||||
(defun my-consult-ripgrep-wrapper ()
|
||||
(interactive)
|
||||
(nemo/exec-without-posframe #'consult-line))
|
||||
|
||||
(defun nemo/consult-ripgrep (&rest args)
|
||||
(interactive)
|
||||
(apply #'consult-ripgrep args))
|
||||
|
||||
(defun nemo/consult-ripgrep-dir ()
|
||||
"Call consult-ripgrep in a user-specified directory."
|
||||
(interactive)
|
||||
(let ((dir (read-directory-name "Ripgrep directory: ")))
|
||||
(consult-ripgrep dir))
|
||||
)
|
||||
(vertico-posframe-mode -1)
|
||||
(consult-ripgrep)
|
||||
(vertico-posframe-mode 1))
|
||||
|
||||
(bind-key "C-s" 'consult-line custom-bindings-map)
|
||||
(bind-key "C-M-s" 'consult-ripgrep custom-bindings-map)
|
||||
|
@ -1443,21 +1433,21 @@ Use =inheritenv= and =envrc= to load ~.envrc~ direnv files:
|
|||
:after (org markdown-mode)
|
||||
:general
|
||||
(leader-def
|
||||
"cg" '("Generate commit message" . copilot-chat-insert-commit-message)
|
||||
"cG" '("Regenerate commit message" . copilot-chat-regenerate-commit-message)
|
||||
"cC" '("Open Copilot Chat" . copilot-chat-display)
|
||||
"cba" '("Add Buffer to Copilot" . copilot-chat-add-current-buffer)
|
||||
"cbd" '("Remove Buffer from Copilot" . copilot-chat-del-current-buffer)
|
||||
"cbw" '("Add Workspace to Copilot" . copilot-chat-add-workspace)
|
||||
"cg" #'copilot-chat-insert-commit-message
|
||||
"cG" #'copilot-chat-regenerate-commit-message
|
||||
"cC" #'copilot-chat-display
|
||||
"cba" #'copilot-chat-add-current-buffer
|
||||
"cbd" #'copilot-chat-del-current-buffer
|
||||
"cbw" #'copilot-chat-add-workspace
|
||||
"cbf" #'copilot-chat-add-file
|
||||
"cbb" '("List Buffers visible to Copilot" . copilot-chat-list)
|
||||
"cbb" #'copilot-chat-list
|
||||
"cch" #'copilot-chat-hide
|
||||
"ccx" #'copilot-chat-reset
|
||||
"ccb" #'copilot-chat-switch-to-buffer
|
||||
"ccd" #'copilot-chat-doc
|
||||
"ccr" #'copilot-chat-review
|
||||
"ccm" #'copilot-chat-set-model
|
||||
"cy" '("Past latest code block" . copilot-chat-yank)
|
||||
"cy" #'copilot-chat-yank
|
||||
)
|
||||
)
|
||||
#+end_src
|
||||
|
@ -1597,13 +1587,12 @@ LSP sets it's prefix key to =s-l= by default, which uses the Super key which I u
|
|||
(use-package lsp-mode
|
||||
:straight t
|
||||
:defer t
|
||||
:hook (prog-mode . lsp-deferred)
|
||||
:hook (prog-mode . lsp)
|
||||
:hook (lsp-mode . lsp-enable-which-key-integration)
|
||||
:hook (lsp-mode . lsp-inlay-hints-mode)
|
||||
:init
|
||||
(setq lsp-keymap-prefix "C-l")
|
||||
(add-to-list 'completion-at-point-functions #'lsp-completion-at-point)
|
||||
;; (advice-add 'lsp :before #'envrc-reload)
|
||||
:commands lsp
|
||||
:general-config
|
||||
(leader-def
|
||||
|
@ -1629,7 +1618,6 @@ LSP sets it's prefix key to =s-l= by default, which uses the Super key which I u
|
|||
lsp-rust-analyzer-binding-mode-hints t
|
||||
lsp-rust-analyzer-display-closure-return-type-hints t
|
||||
lsp-rust-analyzer-server-format-inlay-hints t
|
||||
lsp-rust-analyzer-cargo-extra-env ["RUSTFLAGS", "-Clinker=clang -Clink-arg=-fuse-ld=mold"]
|
||||
|
||||
lsp-enable-suggest-server-download nil)
|
||||
|
||||
|
@ -1637,18 +1625,18 @@ LSP sets it's prefix key to =s-l= by default, which uses the Super key which I u
|
|||
(add-to-list 'lsp-language-id-configuration '("CMakeLists.txt" . "cmake"))
|
||||
)
|
||||
|
||||
(use-package consult-lsp
|
||||
:straight t
|
||||
:general
|
||||
(with-eval-after-load 'lsp-mode
|
||||
(general-define-key
|
||||
:keymaps 'lsp-command-map
|
||||
"c s" '("Symbols" . consult-lsp-symbols)
|
||||
"c f" '("Symbols" . consult-lsp-file-symbols)
|
||||
"c d" '("Diagnostics" . consult-lsp-diagnostics)
|
||||
)
|
||||
)
|
||||
)
|
||||
;; (use-package consult-lsp
|
||||
;; :straight t
|
||||
;; :general
|
||||
;; (with-eval-after-load 'lsp-mode
|
||||
;; (general-define-key
|
||||
;; :keymaps 'lsp-command-map
|
||||
;; "c s" '("Symbols" . consult-lsp-symbols)
|
||||
;; "c f" '("Symbols" . consult-lsp-file-symbols)
|
||||
;; "c d" '("Diagnostics" . consult-lsp-diagnostics)
|
||||
;; )
|
||||
;; )
|
||||
;; )
|
||||
|
||||
(use-package lsp-treemacs
|
||||
:straight t
|
||||
|
@ -2022,7 +2010,7 @@ delimiters < and >'s."
|
|||
rustic-format-on-save nil
|
||||
;; rustic-format-trigger 'on-save
|
||||
;; rustic-format-on-save-method #'rustic-format-buffer
|
||||
;; rustic-analyzer-command '("/usr/bin/rust-analyzer")
|
||||
rustic-analyzer-command '("/usr/bin/rust-analyzer")
|
||||
)
|
||||
;; (setq nemo/lsp-format-on-save t)
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue