From 0053450271e6282473be02d80653f3780c3df76d Mon Sep 17 00:00:00 2001
From: Joel Grunbaum <joelgrun@gmail.com>
Date: Sun, 18 Oct 2020 10:05:20 +0000
Subject: [PATCH] Merge branch 'master' into HEAD

---
 init.el |  244 +++++++-----------------------------------------
 1 files changed, 37 insertions(+), 207 deletions(-)

diff --git a/init.el b/init.el
index 1a74789..7c3dd14 100644
--- a/init.el
+++ b/init.el
@@ -1,207 +1,37 @@
-(provide 'init)
-
-;; set paths for executable
-(add-to-list 'exec-path "C:/msys64/usr/bin")
-(add-to-list 'exec-path "C:/msys64/mingw64/bin")
-(add-to-list 'exec-path "C:/Program Files/xpdf-tools-win-4.00/bin64")
-(setenv "PATH" (mapconcat #'identity exec-path path-separator))
-
-;; adding modules to load path
-(add-to-list 'load-path "~/.emacs.d/custom/")
-
-;; load your modules
-(require 'setup-applications)
-(require 'setup-communication)
-(require 'setup-convenience)
-(require 'setup-data)
-(require 'setup-development)
-(require 'setup-editing)
-(require 'setup-environment)
-(require 'setup-external)
-(require 'setup-faces)
-(require 'setup-files)
-(require 'setup-help)
-(require 'setup-programming)
-(require 'setup-text)
-(require 'setup-local)
-
-;; setting up aspell
-(require 'ispell)
-(setq-default ispell-program-name "aspell")
-
-;; x86 reference
-(setq x86-lookup-pdf "D:/Coding/x86-8664 reference.pdf")
-
-;; Melpa repo
-(require 'package)
-(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t)
-(package-initialize)
-
-;; helm
-(require 'helm-config)
-
-(setq helm-split-window-in-side-p           t ; open helm buffer inside current window, not occupy whole other window
-      helm-move-to-line-cycle-in-source     t ; move to end or beginning of source when reaching top or bottom of source.
-      helm-ff-search-library-in-sexp        t ; search for library in `require' and `declare-function' sexp.
-      helm-scroll-amount                    8 ; scroll 8 lines other window using M-<next>/M-<prior>
-      helm-ff-file-name-history-use-recentf t
-      helm-echo-input-in-header-line t)
-
-(defun spacemacs//helm-hide-minibuffer-maybe ()
-  "Hide minibuffer in Helm session if we use the header line as input field."
-  (when (with-helm-buffer helm-echo-input-in-header-line)
-    (let ((ov (make-overlay (point-min) (point-max) nil nil t)))
-      (overlay-put ov 'window (selected-window))
-      (overlay-put ov 'face
-                   (let ((bg-color (face-background 'default nil)))
-                     `(:background ,bg-color :foreground ,bg-color)))
-      (setq-local cursor-type nil))))
-
-
-(add-hook 'helm-minibuffer-set-up-hook
-          'spacemacs//helm-hide-minibuffer-maybe)
-
-(global-set-key (kbd "M-x") 'helm-M-x)
-(setq helm-M-x-fuzzy-match t) ;; optional fuzzy matching for helm-M-x
-
-(global-set-key (kbd "M-y") 'helm-show-kill-ring)
-
-(global-set-key (kbd "C-x b") 'helm-mini)
-(setq helm-buffers-fuzzy-matching t
-      helm-recentf-fuzzy-match    t)
-
-(global-set-key (kbd "C-x C-f") 'helm-find-files)
-
-(global-set-key (kbd "C-c h o") 'helm-occur)
-
-(helm-mode 1)
-
-;; undo-tree
-(require 'undo-tree)
-(global-undo-tree-mode)
-
-;; volatile highlights
-(require 'volatile-highlights)
-(volatile-highlights-mode t)
-
-;; yasnippet
-(require 'yasnippet)
-(yas-global-mode 1)
-
-;; ggtags
-(require 'ggtags)
-(add-hook 'c-mode-common-hook
-          (lambda
-            (when (derived-mode-p 'c-mode 'c++-mode 'java-mode)
-              (ggtags-mode 1))))
-(add-hook 'dired-mode-hook 'ggtags-mode)
-
-;; workgroups2
-(require 'workgroups2)
-(workgroups-mode 1)
-
-;; smartparens
-(require 'smartparens-config)
-(add-hook 'prog-mode-hook #'smartparens-mode)
-(setq sp-base-key-bindings 'paredit)
-(setq sp-autoskip-closing-pair 'always)
-(setq sp-hybrid-kill-entire-symbol nil)
-(sp-use-paredit-bindings)
-
-;; clean-aindent-mode
-(require 'clean-aindent-mode)
-(add-hook 'prog-mode-hook 'clean-aindent-mode)
-
-;; company config
-(require 'company)
-(add-hook 'after-init-hook 'global-company-mode)
-(add-to-list 'company-backends 'company-c-headers)
-(setq company-backends (delete 'company-semantic company-backends))
-;; (define-key c-mode-base-map  [(tab)] 'company-complete)
-;; (define-key c++-mode-map  [(tab)] 'company-complete)
-
-;; ibuffer-vc config
-(add-hook 'ibuffer-hook
-	  (lambda ()
-	    (ibuffer-vc-set-filter-groups-by-vc-root)
-	    (unless (eq ibuffer-sorting-mode 'alphabetic)
-              (ibuffer-do-sort-by-alphabetic))))
-
-(setq ibuffer-formats
-      '((mark modified read-only vc-status-mini " "
-              (name 18 18 :left :elide)
-              " "
-              (size 9 -1 :right)
-              " "
-              (mode 16 16 :left :elide)
-              " "
-              (vc-status 16 16 :left)
-              " "
-              filename-and-process)))
-
-;; projectile config
-(projectile-global-mode)
-(setq projectile-completion-system 'helm)
-(helm-projectile-on)
-(setq projectile-indexing-method 'alien)
-(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
-
-;; ztree config
-(require 'ztree-diff)
-(require 'ztree-dir)
-
-;; diff-hl config
-(global-diff-hl-mode)
-(add-hook 'dired-mode-hook 'diff-hl-dired-mode)
-
-;; magit config
-(require 'magit)
-(set-default 'magit-stage-all-confirm nil)
-(add-hook 'magit-mode-hook 'magit-load-config-extensions)
-;; full screen magit-status
-(defadvice magit-status (around magit-fullscreen activate)
-  (window-configuration-to-register :magit-fullscreen)
-  ad-do-it
-  (delete-other-windows))
-
-(global-unset-key (kbd "C-x g"))
-(global-set-key (kbd "C-x g h") 'magit-log)
-(global-set-key (kbd "C-x g f") 'magit-file-log)
-(global-set-key (kbd "C-x g b") 'magit-blame-mode)
-(global-set-key (kbd "C-x g m") 'magit-branch-manager)
-(global-set-key (kbd "C-x g c") 'magit-branch)
-(global-set-key (kbd "C-x g s") 'magit-status)
-(global-set-key (kbd "C-x g r") 'magit-reflog)
-(global-set-key (kbd "C-x g t") 'magit-tag)
-
-;; flycheck
-(require 'flycheck)
-(add-hook 'after-init-hook #'global-flycheck-mode)
-
-;; flycheck-pos-tip
-(with-eval-after-load 'flycheck
-  (flycheck-pos-tip-mode))
-
-;; nyan mode
-(case window-system ((x w32) (nyan-mode)))
-
-;; semantic refactor
-(require 'srefactor)
-(require 'srefactor-lisp)
-
-;; OPTIONAL: ADD IT ONLY IF YOU USE C/C++.
-(semantic-mode 1) ;; -> this is optional for Lisp
-
-(define-key c-mode-map (kbd "M-RET") 'srefactor-refactor-at-point)
-(define-key c++-mode-map (kbd "M-RET") 'srefactor-refactor-at-point)
-(global-set-key (kbd "M-RET o") 'srefactor-lisp-one-line)
-(global-set-key (kbd "M-RET m") 'srefactor-lisp-format-sexp)
-(global-set-key (kbd "M-RET d") 'srefactor-lisp-format-defun)
-(global-set-key (kbd "M-RET b") 'srefactor-lisp-format-buffer)
-
-;; guide-key
-(require 'guide-key)
-(setq guide-key/guide-key-sequence '("C-x" "C-c" "M-g"))
-(setq guide-key/recursive-key-sequence-flag t)
-(setq guide-key/popup-window-position 'bottom)
-(guide-key-mode 1)  ; Enable guide-key-mode
+;; Set file for custom changes
+(setq custom-file "~/.emacs.d/custom.el")
+(load custom-file 'noerror)
+
+;; Repos
+(require 'package)
+(setq package-archives '(("gnu"   . "http://elpa.gnu.org/packages/")
+			 ("melpa" . "https://melpa.org/packages/")
+			 ("org"   . "https://orgmode.org/elpa/")))
+(package-initialize)
+
+;; use-package
+(unless (package-installed-p 'use-package)
+  (package-refresh-contents)
+  (package-install 'use-package))
+
+(eval-when-compile
+  (require 'use-package))
+
+;; auto-package-update
+(use-package auto-package-update
+  :ensure t
+  :config
+  (setq auto-package-update-delete-old-versions t)
+  (setq auto-package-update-hide-results t)
+  (auto-package-update-maybe))
+
+;; diminish
+(use-package diminish
+  :ensure t)
+
+;; redirect to org config file
+(when (file-readable-p "~/.emacs.d/config.org")
+  (org-babel-load-file "~/.emacs.d/config.org"))
+(put 'upcase-region 'disabled nil)
+(put 'downcase-region 'disabled nil)
+(put 'list-timers 'disabled nil)

--
Gitblit v1.9.3