Refactoring.

This commit is contained in:
tastytea 2019-03-22 00:40:07 +01:00
parent 3ad2623639
commit 00b830d30b
2 changed files with 118 additions and 118 deletions

40
init.el
View File

@ -1,5 +1,5 @@
;;; init.el --- tastytea's Emacs init file. ;;; init.el --- tastytea's Emacs init file.
;;; Time-stamp: <2019-03-21 13:53:37 CET> ;;; Time-stamp: <2019-03-22 00:39:03 CET>
;;; Commentary: ;;; Commentary:
;;; I am using this file with Emacs 26, but most of it will probably work with ;;; I am using this file with Emacs 26, but most of it will probably work with
@ -164,8 +164,8 @@
(global-set-key (kbd "M-<up>") 'scroll-down-line) (global-set-key (kbd "M-<up>") 'scroll-down-line)
;;;;;;;;;;;;;;;;;;;; Programming / RTags ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;; Programming / RTags ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(unless slow-computer
(use-package rtags (use-package rtags
:unless slow-computer
:if (executable-find "llvm-config") :if (executable-find "llvm-config")
:if (executable-find "clang++") :if (executable-find "clang++")
:config :config
@ -181,7 +181,7 @@
:hook :hook
(c++-mode . (rtags-start-process-unless-running)) (c++-mode . (rtags-start-process-unless-running))
(c-mode . (rtags-start-process-unless-running)) (c-mode . (rtags-start-process-unless-running))
(kill-emacs . rtags-quit-rdm))) (kill-emacs . rtags-quit-rdm))
(use-package flycheck-rtags (use-package flycheck-rtags
:after (flycheck rtags) :after (flycheck rtags)
@ -211,16 +211,16 @@
(prog-mode . turn-on-eldoc-mode)) (prog-mode . turn-on-eldoc-mode))
;; Syntax checking ;; Syntax checking
(unless slow-computer
(use-package flycheck (use-package flycheck
:unless slow-computer
:config :config
(global-flycheck-mode))) (global-flycheck-mode))
;; Autocompletion ;; Autocompletion
(unless slow-computer
(use-package company (use-package company
:unless slow-computer
:hook :hook
(after-init . global-company-mode))) (after-init . global-company-mode))
;; Fuzzy autocompletion ;; Fuzzy autocompletion
(use-package company-flx (use-package company-flx
@ -229,11 +229,11 @@
(company-flx-mode +1)) (company-flx-mode +1))
;; cmake integration ;; cmake integration
(unless slow-computer
(use-package cmake-ide (use-package cmake-ide
:unless slow-computer
:config :config
(setq cmake-ide-build-dir "build") (setq cmake-ide-build-dir "build")
(cmake-ide-setup))) (cmake-ide-setup))
;; Indentation ;; Indentation
(setq-default indent-tabs-mode nil (setq-default indent-tabs-mode nil
@ -242,8 +242,8 @@
c-basic-offset 4) c-basic-offset 4)
;; Project management ;; Project management
(unless slow-computer
(use-package projectile (use-package projectile
:unless slow-computer
:after neotree :after neotree
:config :config
(projectile-mode +1) (projectile-mode +1)
@ -263,7 +263,7 @@
("C-c p" . 'projectile-command-map) ("C-c p" . 'projectile-command-map)
(:map projectile-command-map (:map projectile-command-map
("k" . 'projectile-kill-buffers-and-change-tabbar-grouping)) ("k" . 'projectile-kill-buffers-and-change-tabbar-grouping))
)) )
;; Debugger ;; Debugger
(use-package realgud (use-package realgud
@ -323,14 +323,14 @@
(all-the-icons-install-fonts t))) (all-the-icons-install-fonts t)))
;; Theme ;; Theme
(unless slow-computer
(use-package doom-themes (use-package doom-themes
:unless slow-computer
:after (all-the-icons neotree) :after (all-the-icons neotree)
:config :config
(load-theme 'doom-molokai t) (load-theme 'doom-molokai t)
(doom-themes-neotree-config) (doom-themes-neotree-config)
:custom :custom
(doom-neotree-file-icons 'icons))) (doom-neotree-file-icons 'icons))
;; Modeline ;; Modeline
(use-package doom-modeline (use-package doom-modeline
@ -362,8 +362,8 @@
:bind :bind
("<f8>" . neotree-toggle)) ("<f8>" . neotree-toggle))
(unless slow-computer (use-package git-commit
(use-package git-commit)) :unless slow-computer)
(use-package magit (use-package magit
:config :config
(defun my-magit-kill-buffers (arg) (defun my-magit-kill-buffers (arg)
@ -421,13 +421,14 @@
;; Replaces stock emacs completion with ido completion wherever it is possible ;; Replaces stock emacs completion with ido completion wherever it is possible
(use-package ido-completing-read+ (use-package ido-completing-read+
:unless slow-computer
:after ido :after ido
:config :config
(ido-ubiquitous-mode t)) (ido-ubiquitous-mode t))
;; Tab bar ;; Tab bar
(unless slow-computer
(use-package tabbar-ruler (use-package tabbar-ruler
:unless slow-computer
:after projectile :after projectile
:init :init
(setq tabbar-ruler-global-tabbar t) (setq tabbar-ruler-global-tabbar t)
@ -465,8 +466,7 @@
:background "gray18" :background "gray18"
:foreground "dark gray" :foreground "dark gray"
:family "Sans Serif" :family "Sans Serif"
:italic t)) :italic t)))
))
;; Keybinding for whitespace, don't visualise newlines ;; Keybinding for whitespace, don't visualise newlines
(use-package whitespace (use-package whitespace
@ -549,8 +549,8 @@
;;;;;;;;;;;;;;;;;;;; Server / Remote editing ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;; Server / Remote editing ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Edit remote files ;; Edit remote files
(unless slow-computer
(use-package tramp (use-package tramp
:unless slow-computer
:defer 1 :defer 1
:config :config
;; ssh is faster than scp and supports ports ;; ssh is faster than scp and supports ports
@ -567,7 +567,7 @@
t) t)
".*:\0? *")) ".*:\0? *"))
;; Respect remote PATH ;; Respect remote PATH
(add-to-list 'tramp-remote-path 'tramp-own-remote-path))) (add-to-list 'tramp-remote-path 'tramp-own-remote-path))
;; Run server if: ;; Run server if:
;; - Our EUID is not 0 ;; - Our EUID is not 0

View File

@ -1,2 +1,2 @@
127.0.0.1:51313 23104 127.0.0.1:51313 24224
phahw2ohVoh0oopheish7IVie9desh8aequeenei3uo8wahShe%thuadaeNa4ieh phahw2ohVoh0oopheish7IVie9desh8aequeenei3uo8wahShe%thuadaeNa4ieh