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.

98 lines
2.6 KiB

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