Fix config problems; Add spacemacs transparency

This commit is contained in:
Stochastica 2021-01-26 23:33:12 -05:00
parent 0a7e75655e
commit 6d8d7cddc1
5 changed files with 146 additions and 47 deletions

View File

@ -2,7 +2,7 @@
docker run --rm -it \ docker run --rm -it \
--volume "$PWD:/data" \ --volume "$PWD:/data" \
--volume "$HOME/.latexmkrc:/data/ro" \ --volume "$HOME/.latexmkrc:/data/.latexmkrc:ro" \
--volume "$HOME/texmf:/root/texmf" \ --volume "$HOME/texmf:/root/texmf" \
--workdir "/data" \ --workdir "/data" \
--entrypoint=$1 \ --entrypoint=$1 \

62
home/clang-format Normal file
View File

@ -0,0 +1,62 @@
---
BasedOnStyle: Mozilla
AccessModifierOffset: '-2'
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: 'true'
AlignConsecutiveDeclarations: 'true'
AlignEscapedNewlinesLeft: 'false'
AlignOperands: 'true'
AlignTrailingComments: 'true'
AllowAllParametersOfDeclarationOnNextLine: 'true'
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: 'true'
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: 'false'
AllowShortLoopsOnASingleLine: 'false'
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakTemplateDeclarations: 'true'
BreakBeforeBinaryOperators: All
BreakBeforeBraces: Allman
BreakBeforeTernaryOperators: 'true'
BreakConstructorInitializersBeforeComma: 'true'
BreakStringLiterals: 'true'
ColumnLimit: '80'
ConstructorInitializerAllOnOneLineOrOnePerLine: 'true'
ConstructorInitializerIndentWidth: '0'
ContinuationIndentWidth: '2'
Cpp11BracedListStyle: 'false'
DerivePointerAlignment: 'false'
DisableFormat: 'false'
ExperimentalAutoDetectBinPacking: 'true'
IncludeBlocks: Preserve
IndentCaseLabels: 'false'
IndentGotoLabels: 'false'
IndentWidth: '2'
IndentWrappedFunctionNames: 'false'
JavaScriptQuotes: Single
KeepEmptyLinesAtTheStartOfBlocks: 'false'
Language: Cpp
MaxEmptyLinesToKeep: '2'
NamespaceIndentation: Inner
ObjCBlockIndentWidth: '2'
ObjCSpaceAfterProperty: 'false'
ObjCSpaceBeforeProtocolList: 'false'
PointerAlignment: Left
ReflowComments: 'true'
SortIncludes: 'false'
SpaceAfterCStyleCast: 'true'
SpaceAfterLogicalNot: 'false'
SpaceBeforeAssignmentOperators: 'true'
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: 'false'
SpacesBeforeTrailingComments: '2'
SpacesInAngles: 'false'
SpacesInCStyleCastParentheses: 'false'
SpacesInContainerLiterals: 'false'
SpacesInParentheses: 'false'
SpacesInSquareBrackets: 'false'
Standard: Cpp11
TabWidth: '2'
UseTab: ForIndentation
...

View File

@ -6,18 +6,3 @@ alias ubisunt='grep . -rnw -e'
set -x GIT_EDITOR vim set -x GIT_EDITOR vim
set -x LANG en_US.UTF-8 set -x LANG en_US.UTF-8
function latexmk --argument-names 'path'
if test -n "$path"
set abspath (realpath $argv[1])
else
set abspath $PWD
end
docker run --rm -it \
--volume "$HOME/.latexmkrc:/root/.latexmkrc:ro" \
--volume "$abspath:/data" \
--workdir "/data" \
--entrypoint latexmk \
latex \
$argv
end

View File

@ -64,22 +64,28 @@ This function should only modify configuration layer settings."
emacs-lisp emacs-lisp
bibtex bibtex
(latex :variables (latex :variables
latex-enable-folding t latex-enable-folding t
latex-enable-auto-fill t latex-enable-auto-fill t
latex-enable-magic t) latex-enable-magic t)
markdown markdown
yaml yaml
shell-scripts shell-scripts
(python :variables (python :variables
python-shell-interpreter "/home/hsv/common/scr/python.sh" python-shell-interpreter "/home/hsv/common/scr/python.sh"
python-shell-interpreter-args "-m IPython --simple-prompt -i") python-shell-interpreter-args "-m IPython --simple-prompt -i")
(ocaml :variables (ocaml :variables
ocaml-format-on-save t) ocaml-format-on-save t)
(c-c++ :variables (c-c++ :variables
c-c++-adopt-subprojects t c-c++-adopt-subprojects t
c-c++-backend 'lsp-clangd c-c++-default-mode-for-headers 'c++-mode
c-c++-lsp-enable-semantic-highlight 'rainbow) c-c++-enable-clang-support t
c-c++-backend 'lsp-clangd
c-c++-enable-clang-format-on-save t
clang-format-style "file"
c-c++-lsp-enable-semantic-highlight 'rainbow)
(cmake :variables
cmake-backend 'lsp)
javascript javascript
typescript typescript
html html
@ -96,6 +102,10 @@ This function should only modify configuration layer settings."
;; Also include the dependencies as they will not be resolved automatically. ;; Also include the dependencies as they will not be resolved automatically.
dotspacemacs-additional-packages dotspacemacs-additional-packages
'( '(
all-the-icons
centaur-tabs
company-statistics
highlight-doxygen
smart-tabs-mode smart-tabs-mode
tablist tablist
) )
@ -388,7 +398,7 @@ It should only modify the values of Spacemacs settings."
;; A value from the range (0..100), in increasing opacity, which describes ;; A value from the range (0..100), in increasing opacity, which describes
;; the transparency level of a frame when it's inactive or deselected. ;; the transparency level of a frame when it's inactive or deselected.
;; Transparency can be toggled through `toggle-transparency'. (default 90) ;; Transparency can be toggled through `toggle-transparency'. (default 90)
dotspacemacs-inactive-transparency 90 dotspacemacs-inactive-transparency 80
;; If non-nil show the titles of transient states. (default t) ;; If non-nil show the titles of transient states. (default t)
dotspacemacs-show-transient-state-title t dotspacemacs-show-transient-state-title t
@ -538,8 +548,17 @@ This function is called immediately after `dotspacemacs/init', before layer
configuration. configuration.
It is mostly for variables that should be set before packages are loaded. It is mostly for variables that should be set before packages are loaded.
If you are unsure, try setting them in `dotspacemacs/user-config' first." If you are unsure, try setting them in `dotspacemacs/user-config' first."
(add-to-list 'TeX-view-program-selection '(output-pdf "Emacs"))
(add-to-list 'TeX-view-program-list '("Emacs" "emacsclient -n %o")) ;; 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)
) )
(defun dotspacemacs/user-load () (defun dotspacemacs/user-load ()
@ -547,8 +566,9 @@ If you are unsure, try setting them in `dotspacemacs/user-config' first."
This function is called only while dumping Spacemacs configuration. You can This function is called only while dumping Spacemacs configuration. You can
`require' or `load' the libraries of your choice that will be included in the `require' or `load' the libraries of your choice that will be included in the
dump." dump."
(setq pdf-sync-backward-display-action t) (setq
(setq pdf-sync-forward-display-action t) pdf-sync-backward-display-action t
pdf-sync-forward-display-action t)
) )
(defun dotspacemacs/user-config () (defun dotspacemacs/user-config ()
@ -559,20 +579,20 @@ Put your configuration code here, except for variables that should be set
before packages are loaded." before packages are loaded."
;; Key Bindings ;; Key Bindings
(global-set-key (kbd "<next>") 'centaur-tabs-forward) (global-set-key (kbd "<kp-add>") 'centaur-tabs-forward)
(global-set-key (kbd "<prior>") 'centaur-tabs-backward) (global-set-key (kbd "<kp-subtract>") 'centaur-tabs-backward)
(evil-ex-define-cmd "q" 'kill-this-buffer) (evil-ex-define-cmd "q" 'kill-this-buffer)
(evil-ex-define-cmd "quit" 'evil-quit) (evil-ex-define-cmd "quit" 'evil-quit)
;; Displaying whitespaces ;; Displaying whitespaces
(spacemacs/toggle-whitespace-globally-on) (spacemacs/toggle-whitespace-globally-on)
(setq whitespace-display-mappings (setq whitespace-display-mappings
;; all numbers are Unicode codepoint in decimal. ⁖ (insert-char 182 1) ;; all numbers are Unicode codepoint in decimal. ⁖ (insert-char 182 1)
'( '(
(space-mark 32 [183] [46]) ; 32 SPACE 「 」, 183 MIDDLE DOT 「·」, 46 FULL STOP 「.」 (space-mark 32 [183] [46]) ; 32 SPACE 「 」, 183 MIDDLE DOT 「·」, 46 FULL STOP 「.」
(newline-mark 10 [172 10]) ; 10 LINE FEED, 172 Not Sign「¬」 (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 「➝」 (tab-mark 9 [10141 9] [92 9]) ; 9 TAB, 10141 Triangle-headed rightwards arrow 「➝」
)) ))
(set-face-attribute 'whitespace-space nil (set-face-attribute 'whitespace-space nil
:background nil :background nil
@ -586,7 +606,21 @@ before packages are loaded."
(set-face-attribute 'whitespace-newline nil (set-face-attribute 'whitespace-newline nil
:background nil :background nil
:foreground "gray30") :foreground "gray30")
(spacemacs/toggle-transparency) (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 ;; Auto save upon defocus
(add-hook 'focus-out-hook (add-hook 'focus-out-hook
@ -599,11 +633,28 @@ before packages are loaded."
(setq evil-indent-convert-tabs nil) (setq evil-indent-convert-tabs nil)
(setq-default indent-tabs-mode t) (setq-default indent-tabs-mode t)
(setq-default tab-width 2) (setq-default tab-width 2)
(setq c-default-style "stroustrup") (setq
(setq c-basic-offset 2) c-default-style "stroustrup"
c-basic-offset 2)
(setq css-indent-offset 2) (setq css-indent-offset 2)
(smart-tabs-insinuate 'c 'c++ 'java 'javascript) (smart-tabs-insinuate
'c
'c++
'java
'javascript)
(add-hook 'after-init-hook #'company-statistics-mode)
(add-hook 'text-mode-hook #'origami-mode)
(add-hook 'prog-mode-hook #'origami-mode) (add-hook 'prog-mode-hook #'origami-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)
) )
;; Do not write anything past this comment. This is where Emacs will ;; Do not write anything past this comment. This is where Emacs will
@ -621,7 +672,7 @@ This function is called at the very end of Spacemacs initialization."
'(evil-want-Y-yank-to-eol nil) '(evil-want-Y-yank-to-eol nil)
'(helm-completion-style 'emacs) '(helm-completion-style 'emacs)
'(package-selected-packages '(package-selected-packages
'(unicode-fonts ucs-utils font-utils persistent-soft pcache git-gutter-fringe+ fringe-helper git-gutter+ dockerfile-mode docker docker-tramp browse-at-remote xterm-color vterm terminal-here smart-tabs-mode shell-pop multi-term eshell-z eshell-prompt-extras esh-help company-web web-completion-data centaur-tabs yaml-mode yasnippet-snippets lsp-ui lsp-python-ms lsp-pyright lsp-origami origami lsp-latex helm-lsp helm-company helm-c-yasnippet fuzzy flycheck-ycmd flycheck-rtags flycheck-pos-tip pos-tip flycheck-ocaml dap-mode lsp-treemacs bui treemacs cfrs pfuture posframe company-ycmd company-rtags company-reftex company-math company-c-headers company-auctex company-anaconda ccls lsp-mode ht dash-functional auto-yasnippet yasnippet ac-ispell auto-complete neotree insert-shebang helm-gtags ggtags flycheck-bashate fish-mode counsel-gtags counsel swiper company-shell company ycmd request-deferred yapfify sphinx-doc pytest pyenv-mode py-isort poetry pippel pipenv pyvenv pip-requirements org-ref pdf-tools key-chord ivy htmlize tablist mmm-mode math-symbol-lists markdown-toc live-py-mode importmagic epc ctable concurrent deferred helm-rtags rtags helm-pydoc helm-bibtex bibtex-completion biblio parsebib biblio-core google-c-style gh-md disaster cython-mode cpp-auto-include blacken auctex anaconda-mode pythonic utop tuareg caml treemacs-magit smeargle ocp-indent ocamlformat merlin-eldoc merlin magit-svn magit-section magit-gitflow magit-popup helm-gitignore helm-git-grep gitignore-templates gitignore-mode gitconfig-mode gitattributes-mode git-timemachine git-messenger git-link forge markdown-mode ghub closql emacsql-sqlite emacsql treepy evil-magit magit git-commit with-editor transient dune ws-butler writeroom-mode winum which-key volatile-highlights vi-tilde-fringe uuidgen use-package undo-tree treemacs-projectile treemacs-persp treemacs-icons-dired treemacs-evil toc-org symon symbol-overlay string-inflection spaceline-all-the-icons restart-emacs request rainbow-delimiters popwin pcre2el password-generator paradox overseer org-superstar open-junk-file nameless move-text macrostep lorem-ipsum link-hint indent-guide hybrid-mode hungry-delete hl-todo highlight-parentheses highlight-numbers highlight-indentation helm-xref helm-themes helm-swoop helm-purpose helm-projectile helm-org helm-mode-manager helm-make helm-ls-git helm-flx helm-descbinds helm-ag google-translate golden-ratio font-lock+ flycheck-package flycheck-elsa flx-ido fancy-battery eyebrowse expand-region evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-textobj-line evil-surround evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-lisp-state evil-lion evil-indent-plus evil-iedit-state evil-goggles evil-exchange evil-escape evil-ediff evil-easymotion evil-cleverparens evil-args evil-anzu eval-sexp-fu emr elisp-slime-nav editorconfig dumb-jump dotenv-mode dired-quick-sort diminish devdocs define-word column-enforce-mode clean-aindent-mode centered-cursor-mode auto-highlight-symbol auto-compile aggressive-indent ace-link ace-jump-helm-line)) '(magic-latex-buffer unicode-fonts ucs-utils font-utils persistent-soft pcache git-gutter-fringe+ fringe-helper git-gutter+ dockerfile-mode docker docker-tramp browse-at-remote xterm-color vterm terminal-here smart-tabs-mode shell-pop multi-term eshell-z eshell-prompt-extras esh-help company-web web-completion-data centaur-tabs yaml-mode yasnippet-snippets lsp-ui lsp-python-ms lsp-pyright lsp-origami origami lsp-latex helm-lsp helm-company helm-c-yasnippet fuzzy flycheck-ycmd flycheck-rtags flycheck-pos-tip pos-tip flycheck-ocaml dap-mode lsp-treemacs bui treemacs cfrs pfuture posframe company-ycmd company-rtags company-reftex company-math company-c-headers company-auctex company-anaconda ccls lsp-mode ht dash-functional auto-yasnippet yasnippet ac-ispell auto-complete neotree insert-shebang helm-gtags ggtags flycheck-bashate fish-mode counsel-gtags counsel swiper company-shell company ycmd request-deferred yapfify sphinx-doc pytest pyenv-mode py-isort poetry pippel pipenv pyvenv pip-requirements org-ref pdf-tools key-chord ivy htmlize tablist mmm-mode math-symbol-lists markdown-toc live-py-mode importmagic epc ctable concurrent deferred helm-rtags rtags helm-pydoc helm-bibtex bibtex-completion biblio parsebib biblio-core google-c-style gh-md disaster cython-mode cpp-auto-include blacken auctex anaconda-mode pythonic utop tuareg caml treemacs-magit smeargle ocp-indent ocamlformat merlin-eldoc merlin magit-svn magit-section magit-gitflow magit-popup helm-gitignore helm-git-grep gitignore-templates gitignore-mode gitconfig-mode gitattributes-mode git-timemachine git-messenger git-link forge markdown-mode ghub closql emacsql-sqlite emacsql treepy evil-magit magit git-commit with-editor transient dune ws-butler writeroom-mode winum which-key volatile-highlights vi-tilde-fringe uuidgen use-package undo-tree treemacs-projectile treemacs-persp treemacs-icons-dired treemacs-evil toc-org symon symbol-overlay string-inflection spaceline-all-the-icons restart-emacs request rainbow-delimiters popwin pcre2el password-generator paradox overseer org-superstar open-junk-file nameless move-text macrostep lorem-ipsum link-hint indent-guide hybrid-mode hungry-delete hl-todo highlight-parentheses highlight-numbers highlight-indentation helm-xref helm-themes helm-swoop helm-purpose helm-projectile helm-org helm-mode-manager helm-make helm-ls-git helm-flx helm-descbinds helm-ag google-translate golden-ratio font-lock+ flycheck-package flycheck-elsa flx-ido fancy-battery eyebrowse expand-region evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-textobj-line evil-surround evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-lisp-state evil-lion evil-indent-plus evil-iedit-state evil-goggles evil-exchange evil-escape evil-ediff evil-easymotion evil-cleverparens evil-args evil-anzu eval-sexp-fu emr elisp-slime-nav editorconfig dumb-jump dotenv-mode dired-quick-sort diminish devdocs define-word column-enforce-mode clean-aindent-mode centered-cursor-mode auto-highlight-symbol auto-compile aggressive-indent ace-link ace-jump-helm-line))
'(whitespace-style '(whitespace-style
'(face trailing tabs spaces lines newline empty indentation space-after-tab space-before-tab space-mark tab-mark newline-mark))) '(face trailing tabs spaces lines newline empty indentation space-after-tab space-before-tab space-mark tab-mark newline-mark)))
(custom-set-faces (custom-set-faces

View File

@ -4,10 +4,11 @@
DIR=$HOME DIR=$HOME
BASE=$(realpath --relative-to=$DIR $PWD) BASE=$(realpath --relative-to=$DIR $PWD)
pushd $HOME >> /dev/null pushd $HOME >> /dev/null
ln -vs $BASE/home/vimrc .vimrc ln -vs $BASE/home/bashrc .bashrc
ln -vs $BASE/home/bashrc .bashrc ln -vs $BASE/home/clang-format .clang-format
ln -vs $BASE/home/latexmkrc .latexmkrc ln -vs $BASE/home/latexmkrc .latexmkrc
ln -vs $BASE/home/spacemacs .spacemacs ln -vs $BASE/home/spacemacs .spacemacs
ln -vs $BASE/home/vimrc .vimrc
popd >> /dev/null popd >> /dev/null
# Create ftplugin links # Create ftplugin links