From a1cbd310864ad18366022df373e5b6c29dddb353 Mon Sep 17 00:00:00 2001 From: Janis Date: Mon, 15 Jul 2024 18:31:10 +0200 Subject: [PATCH] keybindings stuff --- init.org | 78 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 40 insertions(+), 38 deletions(-) diff --git a/init.org b/init.org index 3a2b5ac..94bd7bb 100644 --- a/init.org +++ b/init.org @@ -519,6 +519,7 @@ Unassociated key-bindings: #+begin_src emacs-lisp ;; for exiting out of magit’s commit editor with ,, instead of C-c C-c (evil-define-key 'normal ’global (kbd ",,") 'with-editor-finish) +(evil-define-key 'normal 'global (kbd "gb") 'xref-go-back) #+end_src Close =:config=. @@ -864,7 +865,7 @@ Use the =move-text= package to move the current line or selection up or down wit #+begin_src emacs-lisp (use-package vertico :bind (:map minibuffer-local-map - ("C-h" . backward-kill-sexpr)) + ("C-h" . backward-kill-sexp)) :config (vertico-mode 1) (setq vertico-count 25 @@ -1085,46 +1086,47 @@ Use lsp-mode and lsp-ui for LSP functionality. Emacs has its own internal LSP client called eglot, but I've never used it and I'm relatively happy with lsp-mode. LSP sets it's prefix key to =s-l= by default, which uses the Super key which I use as my Mod key in sway, so I can't use it in emacs. #+begin_src emacs-lisp - (use-package lsp-mode - :defer t - :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") - :commands lsp - :config - (setq - lsp-idle-delay 0.6 - lsp-inlay-hint-enable t - lsp-modeline-code-actions-enable t - lsp-modeline-code-actions-segments '(name count) - lsp-modeline-diagnostics-enable t +(use-package lsp-mode + :defer t + :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") + :commands lsp + :config + (setq + lsp-idle-delay 0.6 + lsp-inlay-hint-enable t + lsp-modeline-code-actions-enable t + lsp-modeline-code-actions-segments '(name count) + lsp-modeline-diagnostics-enable t - lsp-rust-server 'rust-analyzer - lsp-rust-analyzer-server-display-inlay-hints t - lsp-rust-analyzer-proc-macro-enable t - 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-server 'rust-analyzer + lsp-rust-analyzer-server-display-inlay-hints t + lsp-rust-analyzer-proc-macro-enable t + lsp-rust-analyzer-binding-mode-hints t + lsp-rust-analyzer-display-closure-return-type-hints t + lsp-rust-analyzer-server-format-inlay-hints t) + ) - (use-package lsp-treemacs - :commands lsp-treemacs-errors-list) +(use-package lsp-treemacs + :commands lsp-treemacs-errors-list) - (use-package lsp-ui - :config - (setq - ;;lsp-modeline-code-actions-enable nil - ;;lsp-rust-analyzer-cargo-all-targets nil - ;; lsp-rust-analyzer-server-command "xwin-env rust-analyzer" - lsp-ui-sideline-show-code-actions t - lsp-ui-doc-enable t - lsp-ui-doc-delay 0.5 - lsp-ui-doc-show-with-cursor t - ; lsp-ui-doc-use-childframe t - ; lsp-ui-doc-use-webkit t - ) - :commands lsp-ui-mode) +(use-package lsp-ui + :config + (setq + ;;lsp-modeline-code-actions-enable nil + ;;lsp-rust-analyzer-cargo-all-targets nil + ;; lsp-rust-analyzer-server-command "xwin-env rust-analyzer" + lsp-ui-sideline-show-code-actions t + lsp-ui-doc-enable t + lsp-ui-doc-delay 0.5 + lsp-ui-doc-show-with-cursor t + ; lsp-ui-doc-use-childframe t + ; lsp-ui-doc-use-webkit t + ) + :commands lsp-ui-mode) #+end_src ** Rust