diff --git a/.gitignore b/.gitignore index 327419d..5eb2838 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ emacs.d/places emacs.d/recentf emacs.d/auto-save-list emacs.d/custom.el +emacs.d/.lsp-session* diff --git a/emacs.d/custom.el b/emacs.d/custom.el index e69de29..775457f 100644 --- a/emacs.d/custom.el +++ b/emacs.d/custom.el @@ -0,0 +1,13 @@ +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(package-selected-packages + '(cython-mode scss-mode vue-mode tide rust-mode company-auctex tex-site auctex sphinx-doc company-lsp lsp-ui lsp-mode ws-butler use-package smartparens pip-requirements osx-clipboard monokai-theme markdown-mode helm-projectile helm-ag godoctor go-guru go-eldoc go-autocomplete flycheck-gometalinter doom-modeline dockerfile-mode docker-compose-mode diminish company-go company-anaconda))) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + ) diff --git a/emacs.d/init.el b/emacs.d/init.el index 35423ae..8327218 100644 --- a/emacs.d/init.el +++ b/emacs.d/init.el @@ -62,8 +62,10 @@ (setq use-package-always-ensure t) ;; Disable backup files and auto-saving - (setq backup-inhibited t) - (setq auto-save-default nil) + (setq backup-inhibited t + make-backup-files nil + auto-save-default nil + auto-save-list-file-prefix nil) ;; Spaces are better than tabs (setq-default indent-tabs-mode nil diff --git a/emacs.d/layers/javascript/init.el b/emacs.d/layers/javascript/init.el new file mode 100644 index 0000000..15d27f7 --- /dev/null +++ b/emacs.d/layers/javascript/init.el @@ -0,0 +1,16 @@ +(add-to-list 'auto-mode-alist '("\\.mjs\\'" . javascript-mode)) +(setq js-indent-level 2 + typescript-indent-level 2 + mmm-js-mode-enter-hook (lambda () (setq syntax-ppss-table nil)) + mmm-typescript-mode-enter-hook (lambda () (setq syntax-ppss-table nil))) +(use-package tide + :ensure t + :after (typescript-mode company flycheck) + :hook ((typescript-mode . tide-setup) + (typescript-mode . tide-hl-identifier-mode) + (before-save . tide-format-before-save))) + +(use-package vue-mode + :ensure t) +(use-package vue-html-mode + :ensure t) diff --git a/emacs.d/layers/latex/init.el b/emacs.d/layers/latex/init.el new file mode 100644 index 0000000..ba2409e --- /dev/null +++ b/emacs.d/layers/latex/init.el @@ -0,0 +1,18 @@ +(use-package tex-site + :defer t + :ensure auctex + :hook (LaTex-mode . auctex) + :commands auctex + :config + + (setq TeX-auto-save t) + (setq TeX-parse-self t) + (setq-default TeX-master nil) + (setq TeX-global-PDF-mode t) + + (add-hook 'LaTeX-mode-hook 'visual-line-mode) + (add-hook 'LaTeX-mode-hook 'flyspell-mode) + (add-hook 'LaTeX-mode-hook 'LaTeX-math-mode) + + (add-hook 'LaTeX-mode-hook 'turn-on-reftex) + (setq reftex-plug-into-AUCTeX t)) diff --git a/emacs.d/layers/python/init.el b/emacs.d/layers/python/init.el index a763933..aa2631a 100644 --- a/emacs.d/layers/python/init.el +++ b/emacs.d/layers/python/init.el @@ -17,5 +17,14 @@ :mode ("requirements\\.txt" . pip-requirements-mode) :diminish pip-requirements-mode) +;; Enable cython-mode when editing a `*.pyx` file +(use-package cython-mode + :mode ("\\.pyx" . cython-mode) + :diminish cython-mode) + +(use-package sphinx-doc + :hook (python-mode . sphinx-doc-mode) + :commands sphinx-docs-mode) + ;; Enable Flycheck for python (enable-flycheck 'python-mode-hook) diff --git a/emacs.d/layers/rust/init.el b/emacs.d/layers/rust/init.el new file mode 100644 index 0000000..2904a65 --- /dev/null +++ b/emacs.d/layers/rust/init.el @@ -0,0 +1,6 @@ +(use-package rust-mode + :diminish rust-mode + :ensure t + :mode (("\\.rs\\'" . rust-mode)) + :init + (setq rust-format-on-save t)) diff --git a/emacs.d/layers/scss/init.el b/emacs.d/layers/scss/init.el new file mode 100644 index 0000000..8416b10 --- /dev/null +++ b/emacs.d/layers/scss/init.el @@ -0,0 +1,2 @@ +(use-package scss-mode + :ensure t) diff --git a/emacs.d/layers/vue/init.el b/emacs.d/layers/vue/init.el new file mode 100644 index 0000000..e69de29 diff --git a/postactivate b/postactivate new file mode 100644 index 0000000..76f1088 --- /dev/null +++ b/postactivate @@ -0,0 +1,3 @@ +#!/bin/bash +# This hook is sourced after every virtualenv is activated. + diff --git a/zshrc.d/.env.zsh b/zshrc.d/.env.zsh index 9972e97..95eb1e4 100644 --- a/zshrc.d/.env.zsh +++ b/zshrc.d/.env.zsh @@ -50,6 +50,7 @@ PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH:~/.local/bin" PATH="$PATH:/usr/local/go/bin:$GOPATH/bin" PATH="/usr/local/heroku/bin:$PATH" PATH="/usr/local/opt/python/libexec/bin:$PATH" +PATH="$HOME/.cargo/bin:$PATH" export PATH="$HOME/.rvm/bin:$PATH" export MANPATH="/usr/local/opt/coreutils/libexec/gnuman:$MANPATH" diff --git a/zshrc.d/lib/aliases.sh b/zshrc.d/lib/aliases.sh index c22821d..ed6e2bd 100644 --- a/zshrc.d/lib/aliases.sh +++ b/zshrc.d/lib/aliases.sh @@ -11,3 +11,6 @@ alias reload-history="fc -Ri" alias docker-login="aws ecr get-login --no-include-email --region us-east-1 | sh" alias docker-start="open --background /Applications/Docker.app" alias docker-top='watch -n 1 "clear && docker top $1"' + +# SSH +alias socks-proxy="ssh -D 9050 -C -N ${1}"