Reordered init.el, added coding style "tastytea".
This commit is contained in:
parent
fcdccec888
commit
6e88cd226c
150
init.el
150
init.el
|
@ -1,5 +1,5 @@
|
||||||
;;; init.el --- tastytea's Emacs init file.
|
;;; init.el --- tastytea's Emacs init file.
|
||||||
;;; Time-stamp: <2019-03-31 18:50:31 CEST>
|
;;; Time-stamp: <2019-03-31 19:25:20 CEST>
|
||||||
|
|
||||||
;;; 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,66 +164,7 @@
|
||||||
("M-<down>" . scroll-up-line)
|
("M-<down>" . scroll-up-line)
|
||||||
("M-<up>" . scroll-down-line)))
|
("M-<up>" . scroll-down-line)))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;; Programming / C++ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;; Programming / general ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; Set coding style.
|
|
||||||
(setq c-default-style "bsd"
|
|
||||||
c-basic-offset 4)
|
|
||||||
;; (c-set-offset 'statement-cont 0)
|
|
||||||
|
|
||||||
(unless slow-computer
|
|
||||||
(use-package rtags
|
|
||||||
:pin melpa-stable
|
|
||||||
:if (executable-find "llvm-config")
|
|
||||||
:if (executable-find "clang++")
|
|
||||||
:config
|
|
||||||
(unless (and (rtags-executable-find "rc") (rtags-executable-find "rdm"))
|
|
||||||
(progn
|
|
||||||
(message "RTags is not installed!")
|
|
||||||
(rtags-install)))
|
|
||||||
(rtags-enable-standard-keybindings)
|
|
||||||
:bind
|
|
||||||
(:map c-mode-base-map
|
|
||||||
("M-." . rtags-find-symbol-at-point)
|
|
||||||
("M-," . rtags-find-references-at-point)
|
|
||||||
("M-?" . rtags-display-summary))
|
|
||||||
:hook
|
|
||||||
(c++-mode . (rtags-start-process-unless-running))
|
|
||||||
(c-mode . (rtags-start-process-unless-running))
|
|
||||||
(kill-emacs . rtags-quit-rdm)))
|
|
||||||
|
|
||||||
(use-package flycheck-rtags
|
|
||||||
:pin melpa-stable
|
|
||||||
:after (flycheck rtags)
|
|
||||||
:config
|
|
||||||
;; ensure that we use only rtags checking.
|
|
||||||
;; https://github.com/Andersbakken/rtags#optional-1
|
|
||||||
(defun my/setup-flycheck-rtags ()
|
|
||||||
(flycheck-select-checker 'rtags)
|
|
||||||
(setq-local flycheck-highlighting-mode nil)) ; Can't disable RTags overlay.
|
|
||||||
:hook
|
|
||||||
(c-mode-hook . my/setup-flycheck-rtags)
|
|
||||||
(c++-mode-hook . my/setup-flycheck-rtags))
|
|
||||||
|
|
||||||
(use-package company-rtags
|
|
||||||
:pin melpa-stable
|
|
||||||
:after (company rtags)
|
|
||||||
:custom
|
|
||||||
(rtags-completions-enabled t)
|
|
||||||
:config
|
|
||||||
;; (setq rtags-autostart-diagnostics t)
|
|
||||||
;; (rtags-diagnostics)
|
|
||||||
(push 'company-rtags company-backends))
|
|
||||||
|
|
||||||
;; cmake integration.
|
|
||||||
(unless slow-computer
|
|
||||||
(use-package cmake-ide
|
|
||||||
:after rtags
|
|
||||||
:custom
|
|
||||||
(cmake-ide-build-dir "build")
|
|
||||||
:config
|
|
||||||
(cmake-ide-setup)))
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;; Programming / other ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
||||||
;; Online documentation mode.
|
;; Online documentation mode.
|
||||||
(use-package eldoc
|
(use-package eldoc
|
||||||
:hook
|
:hook
|
||||||
|
@ -279,15 +220,6 @@
|
||||||
(:map projectile-command-map
|
(:map projectile-command-map
|
||||||
("k" . 'my/projectile-kill-buffers-and-change-tabbar-grouping))))
|
("k" . 'my/projectile-kill-buffers-and-change-tabbar-grouping))))
|
||||||
|
|
||||||
;; GUI for gdb and other debuggers.
|
|
||||||
(use-package realgud
|
|
||||||
:config
|
|
||||||
(defun my/load-realgud ()
|
|
||||||
(load-library "realgud"))
|
|
||||||
:bind
|
|
||||||
(:map c-mode-base-map
|
|
||||||
("C-c g" . my/load-realgud)))
|
|
||||||
|
|
||||||
;; Highlight TODO, FIXME, NOTE and so on.
|
;; Highlight TODO, FIXME, NOTE and so on.
|
||||||
(use-package hl-todo
|
(use-package hl-todo
|
||||||
:bind
|
:bind
|
||||||
|
@ -326,7 +258,7 @@
|
||||||
;; :hook
|
;; :hook
|
||||||
;; (prog-mode . highlight-indent-guides-mode))
|
;; (prog-mode . highlight-indent-guides-mode))
|
||||||
|
|
||||||
;; Tries to find structures and jumps to them.
|
;; Tries to find points of interest and jumps to them.
|
||||||
(use-package imenu-anywhere
|
(use-package imenu-anywhere
|
||||||
:after ido-completing-read+
|
:after ido-completing-read+
|
||||||
:bind
|
:bind
|
||||||
|
@ -339,6 +271,80 @@
|
||||||
:hook
|
:hook
|
||||||
(prog-mode . highlight-doxygen-mode))
|
(prog-mode . highlight-doxygen-mode))
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;; Programming / C++ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;; Set coding style.
|
||||||
|
(use-package cc-mode
|
||||||
|
:ensure nil ; Included in Emacs.
|
||||||
|
:init
|
||||||
|
(c-add-style "tastytea"
|
||||||
|
'("bsd"
|
||||||
|
(c-basic-offset . 4)))
|
||||||
|
:custom
|
||||||
|
(c-default-style "tastytea"))
|
||||||
|
|
||||||
|
(unless slow-computer
|
||||||
|
(use-package rtags
|
||||||
|
:pin melpa-stable
|
||||||
|
:if (executable-find "llvm-config")
|
||||||
|
:if (executable-find "clang++")
|
||||||
|
:config
|
||||||
|
(unless (and (rtags-executable-find "rc") (rtags-executable-find "rdm"))
|
||||||
|
(progn
|
||||||
|
(message "RTags is not installed!")
|
||||||
|
(rtags-install)))
|
||||||
|
(rtags-enable-standard-keybindings)
|
||||||
|
:bind
|
||||||
|
(:map c-mode-base-map
|
||||||
|
("M-." . rtags-find-symbol-at-point)
|
||||||
|
("M-," . rtags-find-references-at-point)
|
||||||
|
("M-?" . rtags-display-summary))
|
||||||
|
:hook
|
||||||
|
(c++-mode . (rtags-start-process-unless-running))
|
||||||
|
(c-mode . (rtags-start-process-unless-running))
|
||||||
|
(kill-emacs . rtags-quit-rdm)))
|
||||||
|
|
||||||
|
(use-package flycheck-rtags
|
||||||
|
:pin melpa-stable
|
||||||
|
:after (flycheck rtags)
|
||||||
|
:config
|
||||||
|
;; ensure that we use only rtags checking.
|
||||||
|
;; https://github.com/Andersbakken/rtags#optional-1
|
||||||
|
(defun my/setup-flycheck-rtags ()
|
||||||
|
(flycheck-select-checker 'rtags)
|
||||||
|
(setq-local flycheck-highlighting-mode nil)) ; Can't disable RTags overlay.
|
||||||
|
:hook
|
||||||
|
(c-mode-hook . my/setup-flycheck-rtags)
|
||||||
|
(c++-mode-hook . my/setup-flycheck-rtags))
|
||||||
|
|
||||||
|
(use-package company-rtags
|
||||||
|
:pin melpa-stable
|
||||||
|
:after (company rtags)
|
||||||
|
:custom
|
||||||
|
(rtags-completions-enabled t)
|
||||||
|
:config
|
||||||
|
;; (setq rtags-autostart-diagnostics t)
|
||||||
|
;; (rtags-diagnostics)
|
||||||
|
(push 'company-rtags company-backends))
|
||||||
|
|
||||||
|
;; cmake integration.
|
||||||
|
(unless slow-computer
|
||||||
|
(use-package cmake-ide
|
||||||
|
:after rtags
|
||||||
|
:custom
|
||||||
|
(cmake-ide-build-dir "build")
|
||||||
|
:config
|
||||||
|
(cmake-ide-setup)))
|
||||||
|
|
||||||
|
;; GUI for gdb and other debuggers.
|
||||||
|
(use-package realgud
|
||||||
|
:after cc-mode
|
||||||
|
:config
|
||||||
|
(defun my/load-realgud ()
|
||||||
|
(load-library "realgud"))
|
||||||
|
:bind
|
||||||
|
(:map c-mode-base-map
|
||||||
|
("C-c g" . my/load-realgud)))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;; Appearance ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;; Appearance ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; Icons (required by doom).
|
;; Icons (required by doom).
|
||||||
(use-package all-the-icons
|
(use-package all-the-icons
|
||||||
|
@ -584,7 +590,7 @@
|
||||||
|
|
||||||
;; If 2 files have the same name, append directory name after the filename.
|
;; If 2 files have the same name, append directory name after the filename.
|
||||||
(use-package uniquify
|
(use-package uniquify
|
||||||
:ensure nil ; Included in emacs
|
:ensure nil ; Included in Emacs.
|
||||||
:custom
|
:custom
|
||||||
(uniquify-after-kill-buffer-p t)
|
(uniquify-after-kill-buffer-p t)
|
||||||
(uniquify-buffer-name-style 'post-forward)
|
(uniquify-buffer-name-style 'post-forward)
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
127.0.0.1:51313 11422
|
127.0.0.1:51313 11194
|
||||||
phahw2ohVoh0oopheish7IVie9desh8aequeenei3uo8wahShe%thuadaeNa4ieh
|
phahw2ohVoh0oopheish7IVie9desh8aequeenei3uo8wahShe%thuadaeNa4ieh
|
Loading…
Reference in New Issue
Block a user