common/home/spacemacs/user-config.el

114 lines
3.2 KiB
EmacsLisp

;; Centaur
(setq
centaur-tabs-set-icons t
centaur-tabs-set-bar 'over
centaur-tabs-set-close-button t
centaur-tabs-style "wave"
centaur-tabs-set-bar 'under
centaur-tabs-set-modified-marker t
centaur-tabs-modified-marker "*"
centaur-tabs-cycle-scope 'tabs)
(setq
pdf-sync-backward-display-action t
pdf-sync-forward-display-action t)
;; Key Bindings
(evil-ex-define-cmd "q" 'kill-this-buffer)
(evil-ex-define-cmd "quit" 'evil-quit)
(setq centaur-tabs-style "wave")
;; Ensures the pdf view mode doesn't get into emacs state.
;; If it does get into emacs state, checked by
;; (describe-variable 'evil-state)
;; Use M-x evil-normal-state or M-x evil-force-evilified-state to revert.
(evil-set-initial-state 'pdf-view-mode 'evilified)
;; Displaying whitespaces
(spacemacs/toggle-whitespace-globally-on)
(setq whitespace-display-mappings
;; all numbers are Unicode codepoint in decimal. ⁖ (insert-char 182 1)
'(
(space-mark 32 [183] [46]) ; 32 SPACE 「 」, 183 MIDDLE DOT 「·」, 46 FULL STOP 「.」
(newline-mark 10 [172 10]) ; 10 LINE FEED, 172 Not Sign「¬」
(tab-mark 9 [10141 9] [92 9]) ; 9 TAB, 10141 Triangle-headed rightwards arrow 「➝」
))
(set-face-attribute 'whitespace-space nil
:background nil
:foreground "gray30")
(set-face-attribute 'whitespace-space-after-tab nil
:background nil
:foreground "gray30")
(set-face-attribute 'whitespace-tab nil
:background nil
:foreground "gray30")
(set-face-attribute 'whitespace-newline nil
:background nil
:foreground "gray30")
(set-face-attribute 'whitespace-line nil
:background "gray20"
:foreground nil)
;; Disabling this since we use smart indenting
(set-face-attribute 'whitespace-indentation nil
:background nil
:foreground "gray30")
;; Syntax highlighting
(set-face-attribute 'font-lock-type-face nil
:foreground "#55fe55")
(set-face-attribute 'font-lock-constant-face nil
:foreground "#ecbd3d")
;(add-hook 'after-make-frame-functions 'spacemacs/enable-transparency)
(spacemacs/enable-transparency)
;; Auto save upon defocus
(add-hook 'focus-out-hook
(defun save-current-buffer-if-needed ()
(interactive)
(when (and (buffer-file-name) (buffer-modified-p))
(save-buffer))))
;; Mixed indent mode (in conjunction with smart-tabs-mode)
(setq evil-indent-convert-tabs nil)
(setq-default indent-tabs-mode t)
(setq-default tab-width 2)
(setq
c-default-style "stroustrup"
c-basic-offset 2
lsp-clients-clangd-args
'("-j=4"
"--clang-tidy"
"--header-insertion=never"
"--pch-storage=memory"
))
(setq css-indent-offset 2)
(smart-tabs-insinuate
'c
'c++
'java
'javascript)
(add-hook 'after-init-hook #'company-statistics-mode)
(add-hook 'text-mode-hook #'display-fill-column-indicator-mode)
(add-hook 'prog-mode-hook #'display-fill-column-indicator-mode)
(add-hook 'LaTeX-mode-hook
(lambda ()
(setq indent-tabs-mode t)))
(highlight-doxygen-global-mode 1)
(set-face-attribute 'highlight-doxygen-comment nil
:background nil
:slant 'italic)
;;(setq opam-share (substring (shell-command-to-string
;; "opam config var share 2> /dev/null") 0 -1))
;;(add-to-list 'load-path (concat opam-share "/emacs/site-lisp"))
;;(with-eval-after-load 'merlin
;; (setq merlin-command 'opam))
;;(require 'merlin)
;; Prevent creation of lockfiles for angular
(setq create-lockfiles nil)