aboutsummaryrefslogtreecommitdiff
path: root/Emacs/.config
diff options
context:
space:
mode:
authordx <aryadevchavali1@gmail.com>2020-05-13 00:15:44 +0100
committerdx <aryadevchavali1@gmail.com>2020-05-13 00:15:44 +0100
commitc97e386425d235b3beedac3f5b48bc6dc6cff27c (patch)
treee45e20af8e1f380f6601420cdfa3b817e82b223b /Emacs/.config
parent5fca56c6cbf5b4442470807c9e599a3d179e51c3 (diff)
downloaddotfiles-c97e386425d235b3beedac3f5b48bc6dc6cff27c.tar.gz
dotfiles-c97e386425d235b3beedac3f5b48bc6dc6cff27c.tar.bz2
dotfiles-c97e386425d235b3beedac3f5b48bc6dc6cff27c.zip
+a lot more stuff
+better binding system (general) with a leader +evil-surround +which-key +org +counsel and tango-dark cos if I see default emacs again I'm going to throw my computer outside.
Diffstat (limited to 'Emacs/.config')
-rw-r--r--Emacs/.config/emacs/init.el69
1 files changed, 67 insertions, 2 deletions
diff --git a/Emacs/.config/emacs/init.el b/Emacs/.config/emacs/init.el
index 970ec1d..77163f9 100644
--- a/Emacs/.config/emacs/init.el
+++ b/Emacs/.config/emacs/init.el
@@ -1,14 +1,78 @@
(require 'package)
(add-to-list 'package-archives (cons "melpa" "https://melpa.org/packages/") t)
+
(package-initialize)
-(setq ring-bell-function 'ignore)
(package-install 'use-package)
+(setq ring-bell-function 'ignore)
+(load-theme 'tango-dark)
+
(use-package evil
:ensure t
:config
(evil-mode +1))
+(use-package evil-surround
+ :ensure t
+ :after (evil)
+ :config
+ (evil-surround-mode +1))
+
+(use-package which-key
+ :ensure t
+ :config
+ (which-key-mode +1))
+
+(use-package general
+ :ensure t
+ :config
+ (general-create-definer leader
+ :prefix "SPC"
+ :states 'normal
+ :keymaps 'override)
+ (general-create-definer localleader
+ :prefix ","
+ :states 'normal
+ :keymaps 'override)
+
+ (leader
+ "!" #'async-shell-command
+ "f" '(:ignore t :wk "File")
+ "s" '(:ignore t :wk "Search")
+ "b" '(:ignore t :wk "Buffer"))
+
+ (general-def
+ :states 'visual
+ "gr" 'eval-region)
+
+ (leader
+ :infix "b"
+ "n" #'next-buffer
+ "p" #'prev-buffer
+ "b" #')
+
+ (leader
+ :infix "f"
+ "s" #'save-buffer
+ "f" #'find-file
+ "p" #'((lambda () (interactive) (find-file "~/.config/emacs/init.el"))
+ :wk "Open init.el")))
+
+(use-package counsel
+ :ensure t
+ :general
+ (leader
+ "SPC" #'counsel-M-x)
+ (leader
+ :infix "s"
+ "s" #'(swiper :wk "Search buffer")
+ "r" #'(counsel-rg :wk "Ripgrep"))
+ :config
+ (counsel-mode +1))
+
+(use-package org
+ :ensure t)
+
(use-package evil-magit
:ensure t
:defer t)
@@ -21,7 +85,8 @@
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
- '(package-selected-packages (quote (use-package))))
+ '(package-selected-packages
+ '(evil-surround which-key counsel swiper general use-package)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.