From e7c6cba58bcb703160d3984448a77f2bd1af414d Mon Sep 17 00:00:00 2001 From: brettlangdon Date: Sun, 30 Dec 2018 12:09:04 -0500 Subject: [PATCH] more customizations --- emacs.d/core.el | 6 ------ emacs.d/custom.el | 2 +- emacs.d/layers/python/init.el | 4 +++- emacs.d/packages.el | 29 ++++++++++++++++++++--------- emacs.d/theme.el | 11 ++++++++++- 5 files changed, 34 insertions(+), 18 deletions(-) diff --git a/emacs.d/core.el b/emacs.d/core.el index 440b4c5..09f4506 100644 --- a/emacs.d/core.el +++ b/emacs.d/core.el @@ -33,12 +33,6 @@ ;; revert buffers automatically when underlying files are changed externally (global-auto-revert-mode t) -;; Whitespace -;; Newline at end of file -(setq require-final-newline t) -(add-hook 'before-save-hook 'whitespace-cleanup) -(whitespace-mode) - ;; Subword mode (global-subword-mode) diff --git a/emacs.d/custom.el b/emacs.d/custom.el index 94f1396..438279b 100644 --- a/emacs.d/custom.el +++ b/emacs.d/custom.el @@ -5,7 +5,7 @@ ;; If there is more than one, they won't work right. '(package-selected-packages (quote - (centered-cursor-mode flycheck company-anaconda anaconda-mode smartparens diminish ws-butler company helm-projectile projectile helm-ag helm osx-clipboard monokai-theme use-package)))) + (doom-modeline centered-cursor-mode flycheck company-anaconda anaconda-mode smartparens diminish ws-butler company helm-projectile projectile helm-ag helm osx-clipboard monokai-theme 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. diff --git a/emacs.d/layers/python/init.el b/emacs.d/layers/python/init.el index bf9abde..cc2bc5d 100644 --- a/emacs.d/layers/python/init.el +++ b/emacs.d/layers/python/init.el @@ -3,6 +3,8 @@ (use-package anaconda-mode :hook python-mode :diminish anaconda-mode + :requires eldoc + :after eldoc :config (anaconda-mode) (anaconda-eldoc-mode)) @@ -18,7 +20,7 @@ ;; Enable eldoc mode (use-package eldoc - :hook python-mode + :mode ("\\.py" . python-mode) :diminish eldoc-mode :config (eldoc-mode)) diff --git a/emacs.d/packages.el b/emacs.d/packages.el index a6f569a..8b689bd 100644 --- a/emacs.d/packages.el +++ b/emacs.d/packages.el @@ -9,9 +9,11 @@ ;; Configure helm ;; https://emacs-helm.github.io/helm/ -(use-package helm +(use-package helm-config + :ensure helm :diminish helm-mode :bind (("M-x" . helm-M-x) + ("C-x b" . helm-mini) ("C-x C-f" . helm-find-files)) :init (setq helm-move-to-line-cycle-in-source t @@ -20,19 +22,22 @@ (use-package helm-ag) (helm-mode 1)) - ;; Configure projectile ;; https://www.projectile.mx/en/latest/ (use-package projectile - :diminish projectile-mode + :delight '(:eval (concat " " (projectile-project-name))) :config (define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map) - (projectile-mode +1) + (projectile-global-mode +1) ;; Use helm-projectile - (use-package helm-projectile - :config - (setq projectile-switch-project-action 'helm-projectile) - (helm-projectile-on))) + :config + (setq projectile-completion-system 'helm + projectile-switch-project-action 'helm-projectile) + (helm-projectile-on)) + +;; Configure helm-projectile +;; https://github.com/bbatsov/helm-projectile +(use-package helm-projectile) ;; Configure company-mode @@ -51,7 +56,12 @@ ;; Configure ws-butler ;; https://github.com/lewang/ws-butler -(use-package ws-butler) +(use-package ws-butler + :init + (setq ws-butler-keep-whitespace-before-point nil + require-final-newline t) + :config + (ws-butler-global-mode +1)) ;; Configure diminish @@ -62,5 +72,6 @@ ;; Smartparens ;; https://github.com/Fuco1/smartparens (use-package smartparens + :diminish :config (smartparens-global-mode)) diff --git a/emacs.d/theme.el b/emacs.d/theme.el index 3d386f6..be4d87e 100644 --- a/emacs.d/theme.el +++ b/emacs.d/theme.el @@ -8,9 +8,18 @@ ;; Hide menu bar (menu-bar-mode -1) +;; Highlight current line +(global-hl-line-mode t) + ;; Enable center cursor (use-package centered-cursor-mode :load-path "vendor/" - :diminish centered-cursor-mode :config (global-centered-cursor-mode)) + +;; Enable doom-modeline +;; https://seagle0128.github.io/doom-modeline/ +(use-package doom-modeline + :ensure t + :defer t + :hook (after-init . doom-modeline-init))