keybindings stuff

This commit is contained in:
Janis 2024-07-15 18:31:10 +02:00
parent 9538d54948
commit a1cbd31086

View file

@ -519,6 +519,7 @@ Unassociated key-bindings:
#+begin_src emacs-lisp #+begin_src emacs-lisp
;; for exiting out of magits commit editor with ,, instead of C-c C-c ;; for exiting out of magits commit editor with ,, instead of C-c C-c
(evil-define-key 'normal global (kbd ",,") 'with-editor-finish) (evil-define-key 'normal global (kbd ",,") 'with-editor-finish)
(evil-define-key 'normal 'global (kbd "<SPC>gb") 'xref-go-back)
#+end_src #+end_src
Close =:config=. 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 #+begin_src emacs-lisp
(use-package vertico (use-package vertico
:bind (:map minibuffer-local-map :bind (:map minibuffer-local-map
("C-h" . backward-kill-sexpr)) ("C-h" . backward-kill-sexp))
:config :config
(vertico-mode 1) (vertico-mode 1)
(setq vertico-count 25 (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. 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. 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 #+begin_src emacs-lisp
(use-package lsp-mode (use-package lsp-mode
:defer t :defer t
:hook (prog-mode . lsp) :hook (prog-mode . lsp)
:hook (lsp-mode . lsp-enable-which-key-integration) :hook (lsp-mode . lsp-enable-which-key-integration)
:hook (lsp-mode . lsp-inlay-hints-mode) :hook (lsp-mode . lsp-inlay-hints-mode)
:init :init
(setq lsp-keymap-prefix "C-l") (setq lsp-keymap-prefix "C-l")
:commands lsp :commands lsp
:config :config
(setq (setq
lsp-idle-delay 0.6 lsp-idle-delay 0.6
lsp-inlay-hint-enable t lsp-inlay-hint-enable t
lsp-modeline-code-actions-enable t lsp-modeline-code-actions-enable t
lsp-modeline-code-actions-segments '(name count) lsp-modeline-code-actions-segments '(name count)
lsp-modeline-diagnostics-enable t lsp-modeline-diagnostics-enable t
lsp-rust-server 'rust-analyzer lsp-rust-server 'rust-analyzer
lsp-rust-analyzer-server-display-inlay-hints t lsp-rust-analyzer-server-display-inlay-hints t
lsp-rust-analyzer-proc-macro-enable t lsp-rust-analyzer-proc-macro-enable t
lsp-rust-analyzer-binding-mode-hints t lsp-rust-analyzer-binding-mode-hints t
lsp-rust-analyzer-display-closure-return-type-hints t lsp-rust-analyzer-display-closure-return-type-hints t
lsp-rust-analyzer-server-format-inlay-hints t)) lsp-rust-analyzer-server-format-inlay-hints t)
)
(use-package lsp-treemacs (use-package lsp-treemacs
:commands lsp-treemacs-errors-list) :commands lsp-treemacs-errors-list)
(use-package lsp-ui (use-package lsp-ui
:config :config
(setq (setq
;;lsp-modeline-code-actions-enable nil ;;lsp-modeline-code-actions-enable nil
;;lsp-rust-analyzer-cargo-all-targets nil ;;lsp-rust-analyzer-cargo-all-targets nil
;; lsp-rust-analyzer-server-command "xwin-env rust-analyzer" ;; lsp-rust-analyzer-server-command "xwin-env rust-analyzer"
lsp-ui-sideline-show-code-actions t lsp-ui-sideline-show-code-actions t
lsp-ui-doc-enable t lsp-ui-doc-enable t
lsp-ui-doc-delay 0.5 lsp-ui-doc-delay 0.5
lsp-ui-doc-show-with-cursor t lsp-ui-doc-show-with-cursor t
; lsp-ui-doc-use-childframe t ; lsp-ui-doc-use-childframe t
; lsp-ui-doc-use-webkit t ; lsp-ui-doc-use-webkit t
) )
:commands lsp-ui-mode) :commands lsp-ui-mode)
#+end_src #+end_src
** Rust ** Rust