diff options
author | dx <aryadevchavali1@gmail.com> | 2020-07-15 15:31:56 +0100 |
---|---|---|
committer | dx <aryadevchavali1@gmail.com> | 2020-07-15 15:31:56 +0100 |
commit | f8ca6b9e1b038c58b7756d08a55076a625c25f2e (patch) | |
tree | 3c4e25df18b4e0402562d86046744cbebb864874 /Emacs/.config/emacs/init.el | |
parent | e27bda1bde45cf44c5aed3447d8fb6ee09a4387a (diff) | |
download | dotfiles-f8ca6b9e1b038c58b7756d08a55076a625c25f2e.tar.gz dotfiles-f8ca6b9e1b038c58b7756d08a55076a625c25f2e.tar.bz2 dotfiles-f8ca6b9e1b038c58b7756d08a55076a625c25f2e.zip |
+major refactors to vanilla Emacs config
Developed quite a bit of the config.
I've added a literate org config, loaded through the init.el file.
Furthermore, I've added some basic general maps and have gained a much
better understanding of Emacs than before. This refactor is one of the
main reasons I decided to so heavily refactor my doom config.
Diffstat (limited to 'Emacs/.config/emacs/init.el')
-rw-r--r-- | Emacs/.config/emacs/init.el | 167 |
1 files changed, 25 insertions, 142 deletions
diff --git a/Emacs/.config/emacs/init.el b/Emacs/.config/emacs/init.el index 1814d34..d560765 100644 --- a/Emacs/.config/emacs/init.el +++ b/Emacs/.config/emacs/init.el @@ -9,147 +9,30 @@ (unless (fboundp 'use-package) (package-install 'use-package)) -(setq user-emacs-directory (expand-file-name "~/.config/emacs/") - ring-bell-function 'ignore - inhibit-startup-screen t) - -(tool-bar-mode -1) -(scroll-bar-mode -1) -(tab-bar-mode -1) -(load-theme 'tango-dark) -(add-hook 'prog-mode-hook #'hs-minor-mode) - -(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 +(setq package-quickstart t) +(use-package org :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) - - (general-def - "M-s" nil - "M-s" #'occur) - - (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" #'previous-buffer - "b" #'counsel-switch-buffer - "i" #'ibuffer) - - (leader - :infix "o" - "-" #'dired) - - (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")) - (general-def - :keymaps 'ivy-minibuffer-map - "C-j" #'ivy-next-line-or-history - "C-k" #'ivy-previous-line-or-history) - :init - (counsel-mode +1)) - -(use-package org :ensure t) - -(use-package magit :ensure t) - -(use-package evil-magit :ensure t) - -(use-package telephone-line - :ensure t - :hook (after-init . telephone-line-mode) - :init - ; Faces - (defface my-accent-dark '((t (:foreground "Black" :background "Cadet Blue"))) "") - (defface my-evil-dark '((t (:foreground "White" :background "Black"))) "") - (defface my-accent-light '((t (:foreground "black" :background "Light Slate Grey"))) "") - (defface my-evil-light '((t (:foreground "black" :background "Sky Blue"))) "") - - ;; Set telephone line faces - (setq telephone-line-faces - '((evil . (my-evil-dark . my-evil-dark)) - (modal . telephone-line-modal-face) - (ryo . telephone-line-ryo-modal-face) - (accent . (my-accent-dark . telephone-line-accent-inactive)) - (nil mode-line . mode-line-inactive))) - - ; Seperators - (setq telephone-line-primary-left-separator 'telephone-line-abs-left - telephone-line-secondary-left-separator 'telephone-line-identity-hollow-left - telephone-line-primary-right-separator 'telephone-line-abs-right - telephone-line-secondary-right-separator 'telephone-line-identity-hollow-right) - - ; LSP segment - (telephone-line-defsegment +oreoline-lsp-segment () - (if (bound-and-true-p lsp-mode) - (propertize "") - (propertize ""))) - - ; LHS - (setq telephone-line-lhs - '((evil . (telephone-line-evil-tag-segment - telephone-line-buffer-modified-segment)) - (accent . (telephone-line-vc-segment - telephone-line-filesize-segment - telephone-line-buffer-name-segment - telephone-line-erc-modified-channels-segment - telephone-line-process-segment)) - (nil . ()))) - - ; RHS - (setq telephone-line-rhs - '((nil . (telephone-line-misc-info-segment)) - (accent . (telephone-line-major-mode-segment - +oreoline-lsp-segment - telephone-line-flycheck-segment)) - (evil . (telephone-line-airline-position-segment)))) - (telephone-line-mode +1) - :config - (size-indication-mode +1)) + (org-babel-load-file "~/.config/emacs/config.org" t)) + +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; 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. + '(custom-safe-themes + '("71e5acf6053215f553036482f3340a5445aee364fb2e292c70d9175fb0cc8af7" "d74c5485d42ca4b7f3092e50db687600d0e16006d8fa335c69cf4f379dbd0eee" default)) + '(package-selected-packages + '(evil-org doom-themes general evil-surround evil evil-mode ace-window magit counsel which-key yasnippet use-package)) + '(safe-local-variable-values + '((org-babel-default-header-args:elisp + (:results . "none")))) + '(send-mail-function 'smtpmail-send-it) + '(smtpmail-smtp-server "smtp.gmail.com") + '(smtpmail-smtp-service 25)) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; 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. + ) |