Unify spacemacs config style and fix minor issues
This commit is contained in:
parent
d5935f525d
commit
f216f7f4c4
|
@ -128,22 +128,12 @@ It should only modify the values of Spacemacs settings."
|
||||||
;; (default nil)
|
;; (default nil)
|
||||||
dotspacemacs-initial-scratch-message nil
|
dotspacemacs-initial-scratch-message nil
|
||||||
|
|
||||||
|
|
||||||
;; List of themes, the first of the list is loaded when spacemacs starts.
|
;; List of themes, the first of the list is loaded when spacemacs starts.
|
||||||
;; Press `SPC T n' to cycle to the next theme in the list (works great
|
;; Press `SPC T n' to cycle to the next theme in the list (works great
|
||||||
;; with 2 themes variants, one dark and one light)
|
;; with 2 themes variants, one dark and one light)
|
||||||
dotspacemacs-themes '(noctilux
|
dotspacemacs-themes '(noctilux
|
||||||
occidental)
|
occidental)
|
||||||
|
|
||||||
;; Default font or prioritized list of fonts. The `:size' can be specified as
|
|
||||||
;; a non-negative integer (pixel size), or a floating-point (point size).
|
|
||||||
;; Point size is recommended, because it's device independent. (default 10.0)
|
|
||||||
;; Placing this in front of themes.
|
|
||||||
dotspacemacs-default-font '("Source Code Pro"
|
|
||||||
:size 14.0
|
|
||||||
:weight normal
|
|
||||||
:width normal)
|
|
||||||
|
|
||||||
;; Set the theme for the Spaceline. Supported themes are `spacemacs',
|
;; Set the theme for the Spaceline. Supported themes are `spacemacs',
|
||||||
;; `all-the-icons', `custom', `doom', `vim-powerline' and `vanilla'. The
|
;; `all-the-icons', `custom', `doom', `vim-powerline' and `vanilla'. The
|
||||||
;; first three are spaceline themes. `doom' is the doom-emacs mode-line.
|
;; first three are spaceline themes. `doom' is the doom-emacs mode-line.
|
||||||
|
@ -153,6 +143,14 @@ It should only modify the values of Spacemacs settings."
|
||||||
;; (default '(spacemacs :separator wave :separator-scale 1.5))
|
;; (default '(spacemacs :separator wave :separator-scale 1.5))
|
||||||
dotspacemacs-mode-line-theme '(spacemacs :separator wave :separator-scale 1.5)
|
dotspacemacs-mode-line-theme '(spacemacs :separator wave :separator-scale 1.5)
|
||||||
|
|
||||||
|
;; Default font or prioritized list of fonts. The `:size' can be specified as
|
||||||
|
;; a non-negative integer (pixel size), or a floating-point (point size).
|
||||||
|
;; Point size is recommended, because it's device independent. (default 10.0)
|
||||||
|
dotspacemacs-default-font '("Source Code Pro"
|
||||||
|
:size 14.0
|
||||||
|
:weight normal
|
||||||
|
:width normal)
|
||||||
|
|
||||||
;; If non-nil the cursor color matches the state color in GUI Emacs.
|
;; If non-nil the cursor color matches the state color in GUI Emacs.
|
||||||
;; (default t)
|
;; (default t)
|
||||||
dotspacemacs-colorize-cursor-according-to-state t
|
dotspacemacs-colorize-cursor-according-to-state t
|
||||||
|
|
|
@ -1,176 +1,176 @@
|
||||||
(setq-default
|
(setq-default
|
||||||
;; Base distribution to use. This is a layer contained in the directory
|
;; Base distribution to use. This is a layer contained in the directory
|
||||||
;; `+distribution'. For now available distributions are `spacemacs-base'
|
;; `+distribution'. For now available distributions are `spacemacs-base'
|
||||||
;; or `spacemacs'. (default 'spacemacs)
|
;; or `spacemacs'. (default 'spacemacs)
|
||||||
dotspacemacs-distribution 'spacemacs
|
dotspacemacs-distribution 'spacemacs
|
||||||
|
|
||||||
;; Lazy installation of layers (i.e. layers are installed only when a file
|
;; Lazy installation of layers (i.e. layers are installed only when a file
|
||||||
;; with a supported type is opened). Possible values are `all', `unused'
|
;; with a supported type is opened). Possible values are `all', `unused'
|
||||||
;; and `nil'. `unused' will lazy install only unused layers (i.e. layers
|
;; and `nil'. `unused' will lazy install only unused layers (i.e. layers
|
||||||
;; not listed in variable `dotspacemacs-configuration-layers'), `all' will
|
;; not listed in variable `dotspacemacs-configuration-layers'), `all' will
|
||||||
;; lazy install any layer that support lazy installation even the layers
|
;; lazy install any layer that support lazy installation even the layers
|
||||||
;; listed in `dotspacemacs-configuration-layers'. `nil' disable the lazy
|
;; listed in `dotspacemacs-configuration-layers'. `nil' disable the lazy
|
||||||
;; installation feature and you have to explicitly list a layer in the
|
;; installation feature and you have to explicitly list a layer in the
|
||||||
;; variable `dotspacemacs-configuration-layers' to install it.
|
;; variable `dotspacemacs-configuration-layers' to install it.
|
||||||
;; (default 'unused)
|
;; (default 'unused)
|
||||||
dotspacemacs-enable-lazy-installation 'unused
|
dotspacemacs-enable-lazy-installation 'unused
|
||||||
|
|
||||||
;; If non-nil then Spacemacs will ask for confirmation before installing
|
;; If non-nil then Spacemacs will ask for confirmation before installing
|
||||||
;; a layer lazily. (default t)
|
;; a layer lazily. (default t)
|
||||||
dotspacemacs-ask-for-lazy-installation t
|
dotspacemacs-ask-for-lazy-installation t
|
||||||
|
|
||||||
;; List of additional paths where to look for configuration layers.
|
;; List of additional paths where to look for configuration layers.
|
||||||
;; Paths must have a trailing slash (i.e. `~/.mycontribs/')
|
;; Paths must have a trailing slash (i.e. `~/.mycontribs/')
|
||||||
dotspacemacs-configuration-layer-path '()
|
dotspacemacs-configuration-layer-path '()
|
||||||
|
|
||||||
;; List of configuration layers to load.
|
;; List of configuration layers to load.
|
||||||
dotspacemacs-configuration-layers
|
dotspacemacs-configuration-layers
|
||||||
'(
|
'(
|
||||||
;; ----------------------------------------------------------------
|
;; ----------------------------------------------------------------
|
||||||
;; Example of useful layers you may want to use right away.
|
;; Example of useful layers you may want to use right away.
|
||||||
;; Uncomment some layer names and press `SPC f e R' (Vim style) or
|
;; Uncomment some layer names and press `SPC f e R' (Vim style) or
|
||||||
;; `M-m f e R' (Emacs style) to install them.
|
;; `M-m f e R' (Emacs style) to install them.
|
||||||
;; ----------------------------------------------------------------
|
;; ----------------------------------------------------------------
|
||||||
|
|
||||||
;; Install the packages from 'Required:' before using spacemacs.
|
;; Install the packages from 'Required:' before using spacemacs.
|
||||||
|
|
||||||
;; 3 Checker
|
;; 3 Checker
|
||||||
(spell-checking :variables ;; Required: aspell
|
(spell-checking :variables ;; Required: aspell
|
||||||
spell-checking-enable-by-default nil)
|
spell-checking-enable-by-default nil)
|
||||||
syntax-checking
|
syntax-checking
|
||||||
;; 4 Completion
|
;; 4 Completion
|
||||||
auto-completion
|
auto-completion
|
||||||
;helm ;; This is slow. Replace by ivy.
|
;helm ; This is slow. Replace by ivy.
|
||||||
ivy
|
ivy
|
||||||
|
|
||||||
|
;; 6 Emacs
|
||||||
|
(org :variables
|
||||||
|
org-enable-notifications 't
|
||||||
|
org-start-notification-daemon-on-startup 't
|
||||||
|
org-enable-org-journal-support 't
|
||||||
|
)
|
||||||
|
semantic
|
||||||
|
tabs
|
||||||
|
|
||||||
|
;; 7 File trees
|
||||||
|
treemacs
|
||||||
|
;neotree
|
||||||
|
|
||||||
|
;; 8 Fonts
|
||||||
|
unicode-fonts
|
||||||
|
;; 9 Fun
|
||||||
|
emoji
|
||||||
|
;; 11 Miscellaneous
|
||||||
|
multiple-cursors
|
||||||
|
|
||||||
|
;; 12 Music
|
||||||
|
alda ; Required: alda
|
||||||
|
|
||||||
|
;; 15 Programming Languages
|
||||||
|
|
||||||
|
;; Markdown
|
||||||
|
markdown
|
||||||
|
yaml
|
||||||
|
html
|
||||||
|
csv
|
||||||
|
bibtex
|
||||||
|
(latex :variables
|
||||||
|
latex-enable-folding t
|
||||||
|
latex-enable-magic t)
|
||||||
|
|
||||||
|
;; Scripting Languages
|
||||||
|
emacs-lisp ; Should always be here.
|
||||||
|
shell-scripts
|
||||||
|
sql
|
||||||
|
gpu ; CUDA, OpenGL shaders
|
||||||
|
javascript
|
||||||
|
typescript
|
||||||
|
|
||||||
|
;; Others
|
||||||
|
coq
|
||||||
|
(python :variables
|
||||||
|
python-backend 'lsp
|
||||||
|
python-lsp-server 'pyright)
|
||||||
|
;python-shell-interpreter "python-runtime.sh"
|
||||||
|
;python-shell-interpreter-args "-m IPython --simple-prompt -i")
|
||||||
|
rust ; Required: See rust page
|
||||||
|
(c-c++ :variables ; Required: LLVM
|
||||||
|
c-c++-adopt-subprojects t
|
||||||
|
c-c++-backend 'lsp-clangd
|
||||||
|
c-c++-default-mode-for-headers 'c++-mode
|
||||||
|
c-c++-enable-clang-format-on-save t
|
||||||
|
c-c++-enable-clang-support t
|
||||||
|
c-c++-lsp-enable-semantic-highlight 'rainbow
|
||||||
|
clang-format-style "file"
|
||||||
|
)
|
||||||
|
;; 16 Readers
|
||||||
|
pdf
|
||||||
|
|
||||||
|
;; 18 Source Control
|
||||||
|
git
|
||||||
|
version-control
|
||||||
|
|
||||||
|
;; 20 Tagging
|
||||||
|
cscope
|
||||||
|
|
||||||
|
;; 21 themes
|
||||||
|
colors
|
||||||
|
theming ; Modification of themes
|
||||||
|
themes-megapack
|
||||||
|
|
||||||
|
; 22 Tools
|
||||||
|
(cmake :variables
|
||||||
|
cmake-backend 'lsp)
|
||||||
|
debug
|
||||||
|
docker
|
||||||
|
finance ; Required: ledger
|
||||||
|
(lsp :variables
|
||||||
|
lsp-headerline-breadcrumb-enable t
|
||||||
|
lsp-headerline-breadcrumb-segments '(symbols))
|
||||||
|
nginx
|
||||||
|
(shell :variables
|
||||||
|
shell-default-height 30
|
||||||
|
shell-default-position 'bottom)
|
||||||
|
systemd
|
||||||
|
|
||||||
;; 6 Emacs
|
|
||||||
(org :variables
|
|
||||||
org-enable-notifications 't
|
|
||||||
org-start-notification-daemon-on-startup 't
|
|
||||||
org-enable-org-journal-support 't
|
|
||||||
)
|
)
|
||||||
semantic
|
|
||||||
tabs
|
|
||||||
|
|
||||||
;; 7 File trees
|
|
||||||
treemacs
|
|
||||||
;neotree
|
|
||||||
|
|
||||||
;; 8 Fonts
|
;; List of additional packages that will be installed without being wrapped
|
||||||
unicode-fonts
|
;; in a layer (generally the packages are installed only and should still be
|
||||||
;; 9 Fun
|
;; loaded using load/require/use-package in the user-config section below in
|
||||||
emoji
|
;; this file). If you need some configuration for these packages, then
|
||||||
;; 11 Miscellaneous
|
;; consider creating a layer. You can also put the configuration in
|
||||||
multiple-cursors
|
;; `dotspacemacs/user-config'. To use a local version of a package, use the
|
||||||
|
;; `:location' property: '(your-package :location "~/path/to/your-package/")
|
||||||
|
;; Also include the dependencies as they will not be resolved automatically.
|
||||||
|
dotspacemacs-additional-packages
|
||||||
|
'(
|
||||||
|
all-the-icons
|
||||||
|
centaur-tabs
|
||||||
|
smart-tabs-mode
|
||||||
|
tablist
|
||||||
|
mini-frame
|
||||||
|
|
||||||
;; 12 Music
|
company-statistics
|
||||||
alda ;; Required: alda
|
exec-path-from-shell
|
||||||
|
|
||||||
;; 15 Programming Languages
|
cmake-ide
|
||||||
|
highlight-doxygen
|
||||||
;; Markdown
|
|
||||||
markdown
|
|
||||||
yaml
|
|
||||||
html
|
|
||||||
csv
|
|
||||||
bibtex
|
|
||||||
(latex :variables
|
|
||||||
latex-enable-folding t
|
|
||||||
latex-enable-magic t)
|
|
||||||
|
|
||||||
;; Scripting Languages
|
|
||||||
shell-scripts
|
|
||||||
sql
|
|
||||||
emacs-lisp
|
|
||||||
gpu ;; CUDA, OpenGL shaders
|
|
||||||
javascript
|
|
||||||
typescript
|
|
||||||
|
|
||||||
;; Others
|
|
||||||
coq
|
|
||||||
(python :variables
|
|
||||||
python-backend 'lsp
|
|
||||||
python-lsp-server 'pyright)
|
|
||||||
;python-shell-interpreter "python-runtime.sh"
|
|
||||||
;python-shell-interpreter-args "-m IPython --simple-prompt -i")
|
|
||||||
rust ;; Required: See rust page
|
|
||||||
(c-c++ :variables ;; Required: LLVM
|
|
||||||
c-c++-adopt-subprojects t
|
|
||||||
c-c++-backend 'lsp-clangd
|
|
||||||
c-c++-default-mode-for-headers 'c++-mode
|
|
||||||
c-c++-enable-clang-format-on-save t
|
|
||||||
c-c++-enable-clang-support t
|
|
||||||
c-c++-lsp-enable-semantic-highlight 'rainbow
|
|
||||||
clang-format-style "file"
|
|
||||||
)
|
)
|
||||||
;; 16 Readers
|
|
||||||
pdf
|
|
||||||
|
|
||||||
;; 18 Source Control
|
;; A list of packages that cannot be updated.
|
||||||
git
|
dotspacemacs-frozen-packages '()
|
||||||
version-control
|
|
||||||
|
|
||||||
;; 20 Tagging
|
;; A list of packages that will not be installed and loaded.
|
||||||
cscope
|
;; Exclude orgit to fix mode problem in PDFView
|
||||||
|
dotspacemacs-excluded-packages '(orgit)
|
||||||
|
|
||||||
;; 21 themes
|
;; Defines the behaviour of Spacemacs when installing packages.
|
||||||
colors
|
;; Possible values are `used-only', `used-but-keep-unused' and `all'.
|
||||||
theming ; Modification of themes
|
;; `used-only' installs only explicitly used packages and deletes any unused
|
||||||
themes-megapack
|
;; packages as well as their unused dependencies. `used-but-keep-unused'
|
||||||
|
;; installs only the used packages but won't delete unused ones. `all'
|
||||||
;; 22 Tools
|
;; installs *all* packages supported by Spacemacs and never uninstalls them.
|
||||||
(cmake :variables
|
;; (default is `used-only')
|
||||||
cmake-backend 'lsp)
|
dotspacemacs-install-packages 'used-only)
|
||||||
debug
|
|
||||||
docker
|
|
||||||
finance ;; Required: ledger
|
|
||||||
(lsp :variables
|
|
||||||
lsp-headerline-breadcrumb-enable t
|
|
||||||
lsp-headerline-breadcrumb-segments '(symbols))
|
|
||||||
nginx
|
|
||||||
(shell :variables
|
|
||||||
shell-default-height 30
|
|
||||||
shell-default-position 'bottom)
|
|
||||||
systemd
|
|
||||||
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
;; List of additional packages that will be installed without being wrapped
|
|
||||||
;; in a layer (generally the packages are installed only and should still be
|
|
||||||
;; loaded using load/require/use-package in the user-config section below in
|
|
||||||
;; this file). If you need some configuration for these packages, then
|
|
||||||
;; consider creating a layer. You can also put the configuration in
|
|
||||||
;; `dotspacemacs/user-config'. To use a local version of a package, use the
|
|
||||||
;; `:location' property: '(your-package :location "~/path/to/your-package/")
|
|
||||||
;; Also include the dependencies as they will not be resolved automatically.
|
|
||||||
dotspacemacs-additional-packages
|
|
||||||
'(
|
|
||||||
all-the-icons
|
|
||||||
centaur-tabs
|
|
||||||
smart-tabs-mode
|
|
||||||
tablist
|
|
||||||
mini-frame
|
|
||||||
|
|
||||||
company-statistics
|
|
||||||
exec-path-from-shell
|
|
||||||
|
|
||||||
cmake-ide
|
|
||||||
highlight-doxygen
|
|
||||||
)
|
|
||||||
|
|
||||||
;; A list of packages that cannot be updated.
|
|
||||||
dotspacemacs-frozen-packages '()
|
|
||||||
|
|
||||||
;; A list of packages that will not be installed and loaded.
|
|
||||||
;; Exclude orgit to fix mode problem in PDFView
|
|
||||||
dotspacemacs-excluded-packages '(orgit)
|
|
||||||
|
|
||||||
;; Defines the behaviour of Spacemacs when installing packages.
|
|
||||||
;; Possible values are `used-only', `used-but-keep-unused' and `all'.
|
|
||||||
;; `used-only' installs only explicitly used packages and deletes any unused
|
|
||||||
;; packages as well as their unused dependencies. `used-but-keep-unused'
|
|
||||||
;; installs only the used packages but won't delete unused ones. `all'
|
|
||||||
;; installs *all* packages supported by Spacemacs and never uninstalls them.
|
|
||||||
;; (default is `used-only')
|
|
||||||
dotspacemacs-install-packages 'used-only)
|
|
||||||
|
|
|
@ -2,13 +2,74 @@
|
||||||
(exec-path-from-shell-initialize)
|
(exec-path-from-shell-initialize)
|
||||||
(spacemacs/enable-transparency)
|
(spacemacs/enable-transparency)
|
||||||
|
|
||||||
|
; Needed for emacs --daemon to read fonts
|
||||||
|
; Sometimes doesn't work
|
||||||
|
(spacemacs|do-after-display-system-init (spacemacs/set-default-font dotspacemacs-default-font))
|
||||||
|
|
||||||
|
|
||||||
|
;; whitespace mode
|
||||||
|
(spacemacs/toggle-whitespace-globally-on)
|
||||||
|
|
||||||
|
(defun custom/common-program-hook ()
|
||||||
|
(setq whitespace-style '(face spaces tabs newline trailing space-mark tab-mark newline-mark lines-tail))
|
||||||
|
(interactive)
|
||||||
|
(whitespace-mode t)
|
||||||
|
(setq whitespace-line-column 80)
|
||||||
|
(display-fill-column-indicator-mode)
|
||||||
|
(smart-tabs-mode-enable)
|
||||||
|
)
|
||||||
|
(defun custom/common-richtext-hook ()
|
||||||
|
(setq whitespace-style '(face spaces tabs newline trailing space-mark tab-mark newline-mark))
|
||||||
|
(interactive)
|
||||||
|
(whitespace-mode t)
|
||||||
|
(setq whitespace-line-column 'nil)
|
||||||
|
)
|
||||||
|
(defun custom/latex-hook ()
|
||||||
|
(custom/common-program-hook)
|
||||||
|
)
|
||||||
|
|
||||||
|
(add-hook 'text-mode-hook 'custom/common-richtext-hook)
|
||||||
|
(add-hook 'latex-mode-hook 'custom/latex-hook)
|
||||||
|
(add-hook 'prog-mode-hook 'custom/common-program-hook)
|
||||||
|
|
||||||
|
(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 「➝」
|
||||||
|
))
|
||||||
;; Auto save upon defocus
|
;; Auto save upon defocus
|
||||||
(add-hook 'focus-out-hook
|
(add-hook 'focus-out-hook
|
||||||
(defun save-current-buffer-if-needed ()
|
(defun save-current-buffer-if-needed ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(when (and (buffer-file-name) (buffer-modified-p))
|
(when (and (buffer-file-name) (buffer-modified-p))
|
||||||
(save-buffer))))
|
(save-buffer))))
|
||||||
|
|
||||||
|
;; Mixed indent mode (in conjunction with smart-tabs-mode)
|
||||||
|
|
||||||
|
(setq-default indent-tabs-mode t
|
||||||
|
indent-line-function 'tab-to-tab-stop
|
||||||
|
tab-width 2)
|
||||||
|
(setq css-indent-offset 2)
|
||||||
|
(smart-tabs-insinuate
|
||||||
|
'c
|
||||||
|
'c++
|
||||||
|
'java
|
||||||
|
'javascript)
|
||||||
|
(add-hook 'after-init-hook #'company-statistics-mode)
|
||||||
|
|
||||||
|
;; C/C++
|
||||||
|
(setq
|
||||||
|
c-default-style "stroustrup"
|
||||||
|
c-basic-offset 2
|
||||||
|
lsp-clients-clangd-args
|
||||||
|
'("-j=4"
|
||||||
|
"--clang-tidy"
|
||||||
|
"--header-insertion=never"
|
||||||
|
"--pch-storage=memory"
|
||||||
|
))
|
||||||
|
(highlight-doxygen-global-mode 1)
|
||||||
|
|
||||||
;; Org mode
|
;; Org mode
|
||||||
(setq org-format-latex-options (plist-put org-format-latex-options :scale 2.0))
|
(setq org-format-latex-options (plist-put org-format-latex-options :scale 2.0))
|
||||||
|
@ -18,17 +79,17 @@
|
||||||
|
|
||||||
;; Centaur
|
;; Centaur
|
||||||
(setq
|
(setq
|
||||||
centaur-tabs-set-icons t
|
centaur-tabs-set-icons t
|
||||||
centaur-tabs-set-bar 'over
|
centaur-tabs-set-bar 'over
|
||||||
centaur-tabs-set-close-button t
|
centaur-tabs-set-close-button t
|
||||||
centaur-tabs-style "wave"
|
centaur-tabs-style "wave"
|
||||||
centaur-tabs-set-bar 'under
|
centaur-tabs-set-bar 'under
|
||||||
centaur-tabs-set-modified-marker t
|
centaur-tabs-set-modified-marker t
|
||||||
centaur-tabs-modified-marker "*"
|
centaur-tabs-modified-marker "*"
|
||||||
centaur-tabs-cycle-scope 'tabs)
|
centaur-tabs-cycle-scope 'tabs)
|
||||||
(setq
|
(setq
|
||||||
pdf-sync-backward-display-action t
|
pdf-sync-backward-display-action t
|
||||||
pdf-sync-forward-display-action t)
|
pdf-sync-forward-display-action t)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -40,74 +101,3 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;; 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 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)))
|
|
||||||
|
|
||||||
;; C/C++
|
|
||||||
(setq
|
|
||||||
-default-style "stroustrup"
|
|
||||||
-basic-offset 2
|
|
||||||
lsp-clients-clangd-args
|
|
||||||
'("-j=4"
|
|
||||||
"--clang-tidy"
|
|
||||||
"--header-insertion=never"
|
|
||||||
"--pch-storage=memory"
|
|
||||||
))
|
|
||||||
(highlight-doxygen-global-mode 1)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;; whitespace mode
|
|
||||||
|
|
||||||
(spacemacs/toggle-whitespace-globally-on)
|
|
||||||
(defun common-whitespace-program-hook ()
|
|
||||||
(setq whitespace-style '(face spaces tabs newline trailing space-mark tab-mark newline-mark lines-tail))
|
|
||||||
(interactive)
|
|
||||||
(whitespace-mode t)
|
|
||||||
(setq whitespace-line-column 80)
|
|
||||||
)
|
|
||||||
|
|
||||||
(add-hook 'text-mode-hook #'(lambda ()
|
|
||||||
(setq whitespace-style '(face spaces tabs newline trailing space-mark tab-mark newline-mark))
|
|
||||||
(interactive)
|
|
||||||
(whitespace-mode t)
|
|
||||||
(setq whitespace-line-column 'nil)))
|
|
||||||
(add-hook 'latex-mode-hook 'common-whitespace-program-hook)
|
|
||||||
(add-hook 'prog-mode-hook 'common-whitespace-program-hook)
|
|
||||||
|
|
||||||
(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 「➝」
|
|
||||||
))
|
|
||||||
|
|
||||||
|
|
||||||
;; Syntax highlighting
|
|
||||||
;(set-face-attribute 'font-lock-type-face nil
|
|
||||||
; :foreground "#55fe55")
|
|
||||||
;(set-face-attribute 'font-lock-constant-face nil
|
|
||||||
; :foreground "#ecbd3d")
|
|
||||||
|
|
||||||
;;(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)
|
|
||||||
|
|
|
@ -1,44 +1,58 @@
|
||||||
|
; Themes
|
||||||
(setq
|
(setq
|
||||||
theming-modifications
|
theming-modifications
|
||||||
'(
|
'(
|
||||||
(spacemacs-dark
|
(spacemacs-dark
|
||||||
(whitespace-space :background unspecified
|
(whitespace-space :background unspecified
|
||||||
:foreground "gray30")
|
:foreground "gray30")
|
||||||
(whitespace-space-after-tab :foreground "gray30")
|
(whitespace-space-after-tab :foreground "gray30")
|
||||||
(whitespace-tab :background unspecified)
|
(whitespace-tab :background unspecified)
|
||||||
(whitespace-newline :foreground "gray30")
|
(whitespace-newline :foreground "gray30")
|
||||||
(whitespace-line :background unspecified)
|
(whitespace-line :background unspecified)
|
||||||
(whitespace-indentation :foreground "gray30")
|
(whitespace-indentation :foreground "gray30")
|
||||||
(highlight-doxygen-comment :slant italic)
|
(highlight-doxygen-comment :slant italic)
|
||||||
|
(font-lock-type-face :foreground "#55fe55")
|
||||||
|
(font-lock-constant-face :foreground "#ecbd3d")
|
||||||
)
|
)
|
||||||
(noctilux
|
(noctilux
|
||||||
(whitespace-space :background unspecified
|
(highlight :background "#292929")
|
||||||
:foreground "gray30")
|
(whitespace-space :background unspecified
|
||||||
(whitespace-space-after-tab :foreground "gray30")
|
:foreground "gray30")
|
||||||
(whitespace-tab :background unspecified
|
(whitespace-space-after-tab :foreground "gray30")
|
||||||
:foreground "gray30")
|
(whitespace-tab :background unspecified
|
||||||
(whitespace-newline :foreground "gray30")
|
:foreground "gray30")
|
||||||
(whitespace-line :background unspecified)
|
(whitespace-newline :foreground "gray30")
|
||||||
(whitespace-indentation :foreground "gray30")
|
(whitespace-line :background unspecified)
|
||||||
(header-line :background unspecified
|
(whitespace-indentation :foreground "gray30")
|
||||||
:box "gray80"
|
(header-line :background unspecified
|
||||||
:inverse-video nil)
|
:box "gray80"
|
||||||
(highlight-doxygen-comment :slant italic)
|
:inverse-video nil)
|
||||||
|
(highlight-doxygen-comment :slant italic)
|
||||||
)
|
)
|
||||||
(occidental
|
(occidental
|
||||||
(highlight :background "#9EC4EB") ;; The default is too bright
|
;; The default is too bright
|
||||||
(whitespace-space :background unspecified
|
(highlight :background "#9EC4EB")
|
||||||
:foreground "gray70")
|
(whitespace-space :background unspecified
|
||||||
(whitespace-space-after-tab :foreground "gray70")
|
:foreground "gray70")
|
||||||
(whitespace-tab :background unspecified
|
(whitespace-space-after-tab :foreground "gray70")
|
||||||
:foreground "gray70")
|
(whitespace-tab :background unspecified
|
||||||
(whitespace-newline :foreground "gray70")
|
:foreground "gray70")
|
||||||
(whitespace-line :background unspecified)
|
(whitespace-newline :foreground "gray70")
|
||||||
(whitespace-indentation :foreground "gray70")
|
(whitespace-line :background unspecified)
|
||||||
(header-line :background unspecified
|
(whitespace-indentation :foreground "gray70")
|
||||||
:box "gray20"
|
(header-line :background unspecified
|
||||||
:inverse-video nil)
|
:box "gray20"
|
||||||
(highlight-doxygen-comment :slant italic)
|
:inverse-video nil)
|
||||||
)))
|
(highlight-doxygen-comment :slant italic)
|
||||||
|
)
|
||||||
|
))
|
||||||
|
;; This exists to ensure the theming modifications are applied. 'after-init-hook
|
||||||
|
;; does not work well here.
|
||||||
|
(add-hook 'emacs-startup-hook
|
||||||
|
(lambda () (spacemacs/update-theme)))
|
||||||
|
|
||||||
(spacemacs/update-theme)
|
;; Language Support
|
||||||
|
|
||||||
|
;; Lilypond
|
||||||
|
(require 'lilypond-mode)
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.ly\\'" . LilyPond-mode))
|
||||||
|
|
Loading…
Reference in New Issue