Reorganized init.el.
This commit is contained in:
parent
5830296d9f
commit
d184a08ad8
80
init.el
80
init.el
|
@ -110,9 +110,6 @@
|
||||||
;; :hook
|
;; :hook
|
||||||
;; (irony-mode . #'irony-eldoc))
|
;; (irony-mode . #'irony-eldoc))
|
||||||
|
|
||||||
;; ;; Syntax checker
|
|
||||||
;; (unless slow-computer
|
|
||||||
;; (use-package flycheck))
|
|
||||||
;; (use-package flycheck-irony
|
;; (use-package flycheck-irony
|
||||||
;; :after (flycheck irony)
|
;; :after (flycheck irony)
|
||||||
;; :config
|
;; :config
|
||||||
|
@ -120,11 +117,6 @@
|
||||||
;; (eval-after-load 'flycheck
|
;; (eval-after-load 'flycheck
|
||||||
;; '(add-hook 'flycheck-mode-hook #'flycheck-irony-setup)))
|
;; '(add-hook 'flycheck-mode-hook #'flycheck-irony-setup)))
|
||||||
|
|
||||||
;; ;; Autocomplete
|
|
||||||
;; (unless slow-computer
|
|
||||||
;; (use-package company
|
|
||||||
;; :hook
|
|
||||||
;; (after-init . global-company-mode)))
|
|
||||||
;; (use-package company-irony
|
;; (use-package company-irony
|
||||||
;; :after (company irony)
|
;; :after (company irony)
|
||||||
;; :config
|
;; :config
|
||||||
|
@ -156,8 +148,6 @@
|
||||||
(c-mode . (rtags-start-process-unless-running))
|
(c-mode . (rtags-start-process-unless-running))
|
||||||
(kill-emacs . rtags-quit-rdm)))
|
(kill-emacs . rtags-quit-rdm)))
|
||||||
|
|
||||||
(unless slow-computer
|
|
||||||
(use-package flycheck))
|
|
||||||
(use-package flycheck-rtags
|
(use-package flycheck-rtags
|
||||||
:after (flycheck rtags)
|
:after (flycheck rtags)
|
||||||
:defer nil
|
:defer nil
|
||||||
|
@ -172,10 +162,6 @@
|
||||||
(c-mode-hook . #'setup-flycheck-rtags)
|
(c-mode-hook . #'setup-flycheck-rtags)
|
||||||
(c++-mode-hook . #'setup-flycheck-rtags))
|
(c++-mode-hook . #'setup-flycheck-rtags))
|
||||||
|
|
||||||
(unless slow-computer
|
|
||||||
(use-package company
|
|
||||||
:hook
|
|
||||||
(after-init . global-company-mode)))
|
|
||||||
(use-package company-rtags
|
(use-package company-rtags
|
||||||
:after (company rtags)
|
:after (company rtags)
|
||||||
:config
|
:config
|
||||||
|
@ -184,13 +170,23 @@
|
||||||
(setq rtags-completions-enabled t)
|
(setq rtags-completions-enabled t)
|
||||||
(push 'company-rtags company-backends))
|
(push 'company-rtags company-backends))
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;; Programming / other ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;; Syntax checking
|
||||||
|
(unless slow-computer
|
||||||
|
(use-package flycheck))
|
||||||
|
|
||||||
|
;; Autocompletion
|
||||||
|
(unless slow-computer
|
||||||
|
(use-package company
|
||||||
|
:hook
|
||||||
|
(after-init . global-company-mode)))
|
||||||
|
|
||||||
;; Fuzzy autocompletion
|
;; Fuzzy autocompletion
|
||||||
(use-package company-flx
|
(use-package company-flx
|
||||||
:after company
|
:after company
|
||||||
:config
|
:config
|
||||||
(company-flx-mode +1))
|
(company-flx-mode +1))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;; Programming / other ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
||||||
;; cmake integration
|
;; cmake integration
|
||||||
(unless slow-computer
|
(unless slow-computer
|
||||||
(use-package cmake-ide
|
(use-package cmake-ide
|
||||||
|
@ -198,6 +194,13 @@
|
||||||
(setq cmake-ide-build-dir "build")
|
(setq cmake-ide-build-dir "build")
|
||||||
(cmake-ide-setup)))
|
(cmake-ide-setup)))
|
||||||
|
|
||||||
|
;; Indentation
|
||||||
|
(setq-default indent-tabs-mode nil
|
||||||
|
tab-width 4)
|
||||||
|
;(setq tab-width 4)
|
||||||
|
(setq c-default-style "linux"
|
||||||
|
c-basic-offset 4)
|
||||||
|
|
||||||
;; Project management
|
;; Project management
|
||||||
(unless slow-computer
|
(unless slow-computer
|
||||||
(use-package projectile
|
(use-package projectile
|
||||||
|
@ -223,6 +226,25 @@
|
||||||
(c++-mode . load-realgud)
|
(c++-mode . load-realgud)
|
||||||
(c-mode . load-realgud))
|
(c-mode . load-realgud))
|
||||||
|
|
||||||
|
;; Highlight TODO, FIXME, NOTE
|
||||||
|
(use-package hl-todo
|
||||||
|
:config
|
||||||
|
(global-hl-todo-mode t))
|
||||||
|
|
||||||
|
;; Better commenting
|
||||||
|
(use-package smart-comment
|
||||||
|
:bind
|
||||||
|
("C-c c" . smart-comment))
|
||||||
|
|
||||||
|
;; Toggle betweeen beginning of line and beginning of code
|
||||||
|
(defun beginning-of-line-or-indentation ()
|
||||||
|
"Move to beginning of line, or indentation."
|
||||||
|
(interactive)
|
||||||
|
(if (bolp)
|
||||||
|
(back-to-indentation)
|
||||||
|
(beginning-of-line)))
|
||||||
|
(global-set-key (kbd "<home>") 'beginning-of-line-or-indentation)
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;; Misc ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;; Misc ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; Directory tree
|
;; Directory tree
|
||||||
(use-package neotree
|
(use-package neotree
|
||||||
|
@ -232,13 +254,6 @@
|
||||||
:bind
|
:bind
|
||||||
("<f8>" . neotree-toggle))
|
("<f8>" . neotree-toggle))
|
||||||
|
|
||||||
;; Indentation
|
|
||||||
(setq-default indent-tabs-mode nil
|
|
||||||
tab-width 4)
|
|
||||||
;(setq tab-width 4)
|
|
||||||
(setq c-default-style "linux"
|
|
||||||
c-basic-offset 4)
|
|
||||||
|
|
||||||
(use-package git-commit)
|
(use-package git-commit)
|
||||||
(use-package magit
|
(use-package magit
|
||||||
:bind
|
:bind
|
||||||
|
@ -276,17 +291,7 @@
|
||||||
(global-fci-mode t)
|
(global-fci-mode t)
|
||||||
(advice-add 'company-call-frontends :before #'on-off-fci-before-company))
|
(advice-add 'company-call-frontends :before #'on-off-fci-before-company))
|
||||||
|
|
||||||
;; Highlight TODO, FIXME, NOTE
|
;; Interactive substring matching
|
||||||
(use-package hl-todo
|
|
||||||
:config
|
|
||||||
(global-hl-todo-mode t))
|
|
||||||
|
|
||||||
;; Better commenting
|
|
||||||
(use-package smart-comment
|
|
||||||
:bind
|
|
||||||
("C-c c" . smart-comment))
|
|
||||||
|
|
||||||
;; IDO
|
|
||||||
(use-package ido)
|
(use-package ido)
|
||||||
(use-package flx-ido
|
(use-package flx-ido
|
||||||
:after ido
|
:after ido
|
||||||
|
@ -297,15 +302,6 @@
|
||||||
(setq ido-enable-flex-matching t)
|
(setq ido-enable-flex-matching t)
|
||||||
(setq ido-ignore-extensions t))
|
(setq ido-ignore-extensions t))
|
||||||
|
|
||||||
;; Toggle betweeen beginning of line and beginning of code
|
|
||||||
(defun beginning-of-line-or-indentation ()
|
|
||||||
"Move to beginning of line, or indentation."
|
|
||||||
(interactive)
|
|
||||||
(if (bolp)
|
|
||||||
(back-to-indentation)
|
|
||||||
(beginning-of-line)))
|
|
||||||
(global-set-key (kbd "<home>") 'beginning-of-line-or-indentation)
|
|
||||||
|
|
||||||
;; Tab bar
|
;; Tab bar
|
||||||
(unless slow-computer
|
(unless slow-computer
|
||||||
(use-package tabbar-ruler
|
(use-package tabbar-ruler
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
127.0.0.1:51313 22977
|
127.0.0.1:51313 10436
|
||||||
phahw2ohVoh0oopheish7IVie9desh8aequeenei3uo8wahShe%thuadaeNa4ieh
|
phahw2ohVoh0oopheish7IVie9desh8aequeenei3uo8wahShe%thuadaeNa4ieh
|
Loading…
Reference in New Issue
Block a user