I showed you my source code, pls respond
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
2.5 KiB

  1. (global-set-key (kbd "<escape>") 'keyboard-escape-quit)
  2. (use-package which-key
  3. :diminish which-key-mode
  4. :custom (which-key-idle-delay dotfiles/idle)
  5. :config (which-key-mode))
  6. (use-package evil
  7. :custom (evil-want-integration t) ;; Required for `evil-collection'.
  8. (evil-want-keybinding nil) ;; Same as above
  9. :config (evil-mode 1))
  10. (use-package evil-collection
  11. :after evil
  12. :config (evil-collection-init))
  13. (use-package evil-surround
  14. :config (global-evil-surround-mode 1))
  15. (use-package evil-nerd-commenter
  16. :bind ("M-;" . evilnc-comment-or-uncomment-lines))
  17. (use-package general
  18. :config
  19. (general-create-definer dotfiles/leader
  20. :states '(normal motion)
  21. :keymaps 'override
  22. :prefix dotfiles/leader-key
  23. :global-prefix dotfiles/leader-key-global))
  24. (use-package hydra)
  25. (dotfiles/leader
  26. "h" '(:ignore t :which-key "Help")
  27. "hp" '(describe-package :which-key "Package")
  28. "hv" '(describe-variable :which-key "Variable")
  29. "hf" '(describe-function :which-key "Function"))
  30. (use-package all-the-icons)
  31. (use-package all-the-icons-dired
  32. :hook (dired-mode . all-the-icons-dired-mode))
  33. (require 'dired-x)
  34. (use-package dired-single
  35. :config (evil-collection-define-key 'normal 'dired-mode-map
  36. "h" 'dired-single-up-directory
  37. "l" 'dired-single-buffer))
  38. (dotfiles/leader
  39. "d" '(dired-jump :which-key "Dired"))
  40. (use-package eshell-prompt-extras
  41. :custom (eshell-highlight-prompt nil)
  42. (eshell-prompt-function 'epe-theme-lambda))
  43. (dotfiles/leader
  44. "e" '(eshell :which-key "Shell"))
  45. (use-package magit
  46. :custom (magit-display-buffer-function
  47. #'magit-display-buffer-same-window-except-diff-v1))
  48. (use-package forge)
  49. (dotfiles/leader
  50. "g" '(magit-status :which-key "Magit"))
  51. (dotfiles/leader
  52. "w" '(:ignore t :which-key "Window")
  53. "ww" '(window-swap-states :which-key "Swap")
  54. "wc" '(delete-window :which-key "Close")
  55. "wh" '(windmove-left :which-key "Left")
  56. "wj" '(windmove-down :which-key "Down")
  57. "wk" '(windmove-up :which-key "Up")
  58. "wl" '(windmove-right :which-key "Right")
  59. "ws" '(:ignore t :which-key "Split")
  60. "wsj" '(split-window-below :which-key "Down")
  61. "wsl" '(split-window-right :which-key "Right"))
  62. (dotfiles/leader
  63. "." '(find-file :which-key "Files")
  64. "c" '(kill-buffer-and-window :which-key "Close"))
  65. (dotfiles/leader
  66. "q" '(:ignore t :which-key "Quit")
  67. "qq" '(save-buffers-kill-emacs :which-key "Save")
  68. "qw" '(kill-emacs :which-key "Now")
  69. "qf" '(delete-frame :which-key "Frame"))
  70. (dotfiles/leader
  71. "t" '(:ignore t :which-key "Tweaks"))