diff options
Diffstat (limited to '')
38 files changed, 0 insertions, 1136 deletions
diff --git a/settings/sane-defaults.el b/settings/sane-defaults.el deleted file mode 100644 index 204f939..0000000 --- a/settings/sane-defaults.el +++ /dev/null @@ -1,176 +0,0 @@ -;; Stolen from Magnars, with mods -;; https://github.com/magnars/.emacs.d/blob/master/settings/sane-defaults.el - -;; Allow pasting selection outside of Emacs -(setq x-select-enable-clipboard t) - -;; Auto refresh buffers -(global-auto-revert-mode 1) - -;; setup eval elisp -(define-key global-map (kbd "C-x C-e") 'eval-last-sexp) - -;; define browsers -(define-key global-map (kbd "C-x w") 'browse-url-emacs) -(define-key global-map (kbd "C-x M-w") 'browse-url-chromium) - -;; define wrappers -(global-set-key (kbd "M-[") 'insert-pair) -(global-set-key (kbd "M-{") 'insert-pair) -(global-set-key (kbd "M-\"") 'insert-pair) - -;; use mu4e by default -(global-set-key (kbd "C-x m") 'mu4e) - -;; use unix pass as our password store -(setq auth-sources '(password-store)) - -;; Also auto refresh dired, but be quiet about it -(setq global-auto-revert-non-file-buffers t) -(setq auto-revert-verbose nil) - -;; dired listing switches -(setq dired-listing-switches "-lisah") - -;; Show keystrokes in progress -(setq echo-keystrokes 0.1) - -;; Move files to trash when deleting -(setq delete-by-moving-to-trash t) - -;; Transparently open compressed files -(auto-compression-mode t) - -;; Enable todo mode everywhere -(add-hook 'prog-mode-hook #'hl-todo-mode) - -;; Answering just 'y' or 'n' will do -(defalias 'yes-or-no-p 'y-or-n-p) - -;; UTF-8 please -(setq locale-coding-system 'utf-8) ; pretty -(set-terminal-coding-system 'utf-8) ; pretty -(set-keyboard-coding-system 'utf-8) ; pretty -(set-selection-coding-system 'utf-8) ; please -(prefer-coding-system 'utf-8) ; with sugar on top - -;; Show active region -(transient-mark-mode 1) -(make-variable-buffer-local 'transient-mark-mode) -(put 'transient-mark-mode 'permanent-local t) -(setq-default transient-mark-mode t) - -;; Don't highlight matches with jump-char - it's distracting -(setq jump-char-lazy-highlight-face nil) - -;; Always display line and column numbers -(setq line-number-mode t) -(setq column-number-mode t) - -;; Lines should be 80 characters wide, not 72 -(setq fill-column 80) - -;; Save a list of recent files visited. (open recent file with C-x f) -(recentf-mode 1) -(setq recentf-max-saved-items 100) ;; just 20 is too recent - -;; Save minibuffer history -(savehist-mode 1) -(setq history-length 1000) - -;; Allow recursive minibuffers -(setq enable-recursive-minibuffers t) - -;; More memory than even Magnars...'cause the future keeps happening -;; 100 MB should be good -(setq gc-cons-threshold 100000000) - -;; warn when opening files bigger than 100MB -(setq large-file-warning-threshold 100000000) - -;; 80 chars is a good width. -(set-default 'fill-column 80) - -;; Add parts of each file's directory to the buffer name if not unique -(require 'uniquify) -(setq uniquify-buffer-name-style 'forward) - -(setq ediff-diff-options "-w") -(setq ediff-split-window-function 'split-window-horizontally) -(setq ediff-window-setup-function 'ediff-setup-windows-plain) - -;; Offer to create parent directories if they do not exist -;; http://iqbalansari.github.io/blog/2014/12/07/automatically-create-parent-directories-on-visiting-a-new-file-in-emacs/ -(defun my-create-non-existent-directory () - (let ((parent-directory (file-name-directory buffer-file-name))) - (when (and (not (file-exists-p parent-directory)) - (y-or-n-p (format "Directory `%s' does not exist! Create it?" parent-directory))) - (make-directory parent-directory t)))) - -(add-to-list 'find-file-not-found-functions 'my-create-non-existent-directory) - -(add-hook 'before-save-hook 'delete-trailing-whitespace) -(set-default-coding-systems 'utf-8) -(set-terminal-coding-system 'utf-8) -(set-keyboard-coding-system 'utf-8) -(setq default-buffer-file-coding-system 'utf-8) -(setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING)) - -(prefer-coding-system 'utf-8) - -(global-set-key (kbd "C-x C-b") 'ibuffer) - -;; swap regexp search and regular search bindings -(global-set-key (kbd "C-s") 'vr/isearch-forward) -(global-set-key (kbd "C-r") 'vr/isearch-backward) -(global-set-key (kbd "C-M-s") 'isearch-forward) -(global-set-key (kbd "C-M-r") 'isearch-backward) - -;; replace en masse -(global-set-key (kbd "S-C-r") 'vr/replace) - -;; eval mode in region buffer -(global-set-key (kbd "C-c C-e") 'eval-last-sexp) - -;; undo should not need shift -(global-set-key (kbd "C--") 'undo) - -;; compilation commands -(global-set-key (kbd "C-x C-m C-c") 'compile) -(global-set-key (kbd "C-x C-m C-m") 'recompile) - - -;; copy/paste commands for linux -(global-set-key (kbd "s-c") 'clipboard-kill-region) -(global-set-key (kbd "s-v") 'clipboard-yank) - -(defun beautify-json () - (interactive) - (let ((b (if mark-active (min (point) (mark)) (point-min))) - (e (if mark-active (max (point) (mark)) (point-max)))) - (shell-command-on-region b e - "python -mjson.tool" (current-buffer) t))) - -;; Dired Settings -(setq dired-omit-mode t) - -;; which-key everywhere -(setq which-key-mode t) - -;; Override C-x C-c to open the default ansi-term buffer -;; 0. check if we are in GUI or user want to override behavior -;; 1. check if ansi-term buffer exists -;; 2. load that buffer if it does exist -;; 3. create and load that buffer if it does not, and delete other windows -(if (display-graphic-p) - (let ((ansi-buffer "*ansi-term*") - (quit-command "C-x C-c")) - (if (not (get-buffer ansi-buffer)) - (ansi-term "/bin/bash")) - (define-key global-map (kbd quit-command) - (lambda () (interactive) - (delete-other-windows) - (switch-to-buffer "*ansi-term*"))))) - -(provide 'sane-defaults) -;;; sane-defaults.el ends here diff --git a/settings/setup-ace-window-mode.el b/settings/setup-ace-window-mode.el deleted file mode 100644 index 4fd3558..0000000 --- a/settings/setup-ace-window-mode.el +++ /dev/null @@ -1,35 +0,0 @@ -;;; setup-ace-window-mode.el --- ace window mode config -*- lexical-binding: t; -*- - -;; Copyright (C) 2018 Benj Bellon - -;; Author: Benj Bellon -;; Keywords: lisp - -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see <http://www.gnu.org/licenses/>. - -;;; Commentary: - -;; basic config for ace window mode - -;;; Code: -(require 'ace-window) - -(global-set-key (kbd "C-x o") 'ace-window) -(global-set-key (kbd "C-x M-o") 'other-window) - -(setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l)) - - -(provide 'setup-ace-window-mode) -;;; setup-ace-window-mode.el ends here diff --git a/settings/setup-asm-mode.el b/settings/setup-asm-mode.el deleted file mode 100644 index 4bae5cc..0000000 --- a/settings/setup-asm-mode.el +++ /dev/null @@ -1,7 +0,0 @@ -;;; Code: -(require 'nasm-mode) -(add-to-list 'auto-mode-alist '("\\.asm\\'" . nasm-mode)) - - -(provide 'setup-asm-mode) -;;; setup-asm-mode.el ends here diff --git a/settings/setup-auto-insert-mode.el b/settings/setup-auto-insert-mode.el deleted file mode 100644 index 68d444a..0000000 --- a/settings/setup-auto-insert-mode.el +++ /dev/null @@ -1,30 +0,0 @@ -(require 'autoinsert) - -(defun custom/expand-yasnippet () - "Replace with real stuff" - (yas-expand-snippet (buffer-string) (point-min) (point-max))) - -(custom-set-variables - '(auto-insert-directory (locate-user-emacs-file "templates/auto-insert"))) - -;; Activate globally -(auto-insert-mode) -(setq auto-insert-query nil) - -;; Some global auto-insert variables -(setq user-full-name "Benj Bellon" - user-email "benjaminbellon@gmail.com") - -;; C -(define-auto-insert "\\.c\\'" ["template.c" custom/expand-yasnippet]) -(define-auto-insert "\\.h\\'" ["template.h" custom/expand-yasnippet]) - -;; C++ -(define-auto-insert "\\.cc\\'" ["template.cc" custom/expand-yasnippet]) -(define-auto-insert "\\.hh\\'" ["template.hh" custom/expand-yasnippet]) - -;; Python -(define-auto-insert "\\.py\\'" ["template.py" custom/expand-yasnippet]) - - -(provide 'setup-auto-insert-mode) diff --git a/settings/setup-avy-mode.el b/settings/setup-avy-mode.el deleted file mode 100644 index 63cc774..0000000 --- a/settings/setup-avy-mode.el +++ /dev/null @@ -1,32 +0,0 @@ -;;; setup-avy-mode.el --- basic avy mode config -*- lexical-binding: t; -*- - -;; Copyright (C) 2018 Benj Bellon - -;; Author: Benj Bellon <bbellon@bbellon-ld2.linkedin.biz> -;; Keywords: lisp - -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see <http://www.gnu.org/licenses/>. - -;;; Commentary: - -;; basic config for avy mode - -;;; Code: - -(require 'avy) - -(global-set-key (kbd "C-c k") 'avy-goto-char) - -(provide 'setup-avy-mode) -;;; setup-avy-mode.el ends here diff --git a/settings/setup-c++-mode.el b/settings/setup-c++-mode.el deleted file mode 100644 index 28d8698..0000000 --- a/settings/setup-c++-mode.el +++ /dev/null @@ -1,18 +0,0 @@ -(add-hook 'c++-mode-hook - (lambda () - (font-lock-add-keywords - nil - '(;; add some keywords - ("\\<\\(nullptr\\)\\>" . font-lock-keyword-face))))) - -(defun arg-list-indent () - "Indent arglist properly when overflowing." - (c-set-offset 'arglist-intro '+)) - -(add-hook 'c++-mode-hook 'arg-list-indent) -;;(add-hook 'c++-mode-hook 'rtags-start-process-unless-running) - -(setq c-basic-offset 2) -(setq c-default-style "gnu") - -(provide 'setup-c++-mode) diff --git a/settings/setup-clojure-mode.el b/settings/setup-clojure-mode.el deleted file mode 100644 index 9961f09..0000000 --- a/settings/setup-clojure-mode.el +++ /dev/null @@ -1,23 +0,0 @@ -(require 'clojure-mode) -(require 'clojure-mode-extra-font-locking) -(require 'flycheck-clojure) - -(add-hook 'clojure-mode-hook 'lsp) -(add-hook 'clojurescript-mode-hook 'lsp) -(add-hook 'clojurec-mode-hook 'lsp) - -(add-hook 'clojure-mode-hook 'enable-paredit-mode) -(add-hook 'clojure-mode-hook 'prettify-symbols-mode) - -(setq gc-cons-threshold (* 100 1024 1024) - read-process-output-max (* 1024 1024) - treemacs-space-between-root-nodes nil - company-minimum-prefix-length 1 - lsp-lens-enable t - lsp-signature-auto-activate nil - ; lsp-enable-indentation nil ; uncomment to use cider indentation instead of lsp - ; lsp-enable-completion-at-point nil ; uncomment to use cider completion instead of lsp - ) - - -(provide 'setup-clojure-mode) diff --git a/settings/setup-company-mode.el b/settings/setup-company-mode.el deleted file mode 100644 index 8ff5f36..0000000 --- a/settings/setup-company-mode.el +++ /dev/null @@ -1,26 +0,0 @@ -;;; setup-company-mode.el --- company mode config -*- lexical-binding: t; -*- - -;;; Commentary: - -;; basic company mode configs - -;;; Code: -(require 'company) - -;; When working with a larger project, until a parser is written -;; for compile_commands.json DB, you can add the headers to -;; .dir-locals.el as follows: -;; (company-clang-arguments . ("-I/path/to/include")) - -(setq company-idle-delay 0.1) -(setq company-clang-executable "/usr/bin/clang++") -(setq company-go-gocode-command (concat (getenv "HOME") "/go/bin/gocode")) - - -;; (push 'company-lsp company-backends) -(push 'company-go company-backends) -(push 'company-terraform company-backends) -(add-hook 'after-init-hook 'global-company-mode) - -(provide 'setup-company-mode) -;;; setup-company-mode.el ends here diff --git a/settings/setup-custom.el b/settings/setup-custom.el deleted file mode 100644 index 3cc694d..0000000 --- a/settings/setup-custom.el +++ /dev/null @@ -1,23 +0,0 @@ -;;; setup-custom.el --- non-user specific customizations -*- lexical-binding: t; -*- -(set-face-attribute 'default nil :font "Source Code Pro Medium-9") -(set-fontset-font t nil "JoyPixels" nil 'append) - -;; no line highlight -(hl-line-mode 0) - -(when (fboundp 'menu-bar-mode) (menu-bar-mode -1)) -(when (fboundp 'tool-bar-mode) (tool-bar-mode -1)) -(when (fboundp 'scroll-bar-mode) (scroll-bar-mode -1)) - -(require 'saveplace) -(setq-default save-place t) - -(setq-default indent-tabs-mode nil) - -(show-paren-mode 1) - -(setq sml/theme 'dark) -(sml/setup) - -(provide 'setup-custom) -;;; setup-custom.el ends here diff --git a/settings/setup-dap-mode.el b/settings/setup-dap-mode.el deleted file mode 100644 index 9ba8f49..0000000 --- a/settings/setup-dap-mode.el +++ /dev/null @@ -1,9 +0,0 @@ -;;; setup-dap-mode.el --- -*- lexical-binding: t; -*- -(dap-ui-mode) -(dap-ui-controls-mode) - -(with-eval-after-load 'dap-mode - (define-key dap-mode-map (kbd "C-c d d") 'dap-hydra)) - -(provide 'setup-dap-mode) -;;; setup-dap-mode.el ends here diff --git a/settings/setup-dockerfile-mode.el b/settings/setup-dockerfile-mode.el deleted file mode 100644 index 1fc86e3..0000000 --- a/settings/setup-dockerfile-mode.el +++ /dev/null @@ -1,8 +0,0 @@ -;;; setup-dockerfile-mode.el --- -*- lexical-binding: t; -*- - -(add-hook 'dockerfile-mode-hook - (lambda () - (setq tab-width 2))) - -(provide 'setup-dockerfile-mode) -;;; setup-dockerfile-mode.el ends here diff --git a/settings/setup-flycheck.el b/settings/setup-flycheck.el deleted file mode 100644 index a050c3c..0000000 --- a/settings/setup-flycheck.el +++ /dev/null @@ -1,32 +0,0 @@ -(require 'flycheck) -(require 'flycheck-pos-tip) -(require 'flycheck-clangcheck) - -;; When using flycheck in a larger c++ project with a variety of headers -;; across a variety of dirs, add the following to your .dir-locals.el -;; (flycheck-clang-dbname . "/abs/path/to/build/compile_commands.json") - -(defun setup-custom-clang-checker () - (flycheck-set-checker-executable 'c/c++-clangcheck "/usr/bin/clang-check") - (flycheck-select-checker 'c/c++-clangcheck)) - -(add-hook 'c-mode-hook #'setup-custom-clang-checker) -(add-hook 'c++-mode-hook #'setup-custom-clang-checker) - -(global-flycheck-mode 1) - -(eval-after-load 'flycheck - '(custom-set-variables - '(flycheck-display-errors-function #'flycheck-pos-tip-error-messages))) - -;; hack to get around go tool vet issue -(let ((govet (flycheck-checker-get 'go-vet 'command))) - (when (equal (cadr govet) "tool") - (setf (cdr govet) (cddr govet)))) - -(global-set-key (kbd "<f2>") 'flyspell-auto-correct-previous-word) -(setq flycheck-clangcheck-analyze t) - -(add-hook 'sh-mode-hook 'flycheck-mode) - -(provide 'setup-flycheck) diff --git a/settings/setup-go-mode.el b/settings/setup-go-mode.el deleted file mode 100644 index ff9ac86..0000000 --- a/settings/setup-go-mode.el +++ /dev/null @@ -1,8 +0,0 @@ -(add-hook 'go-mode-hook - (lambda () - (add-hook 'before-save-hook 'gofmt-before-save) - (setq tab-width 4) - (setq indent-tabs-mode 1))) - -(provide 'setup-go-mode) -;;; setup-go-mode.el ends here diff --git a/settings/setup-haskell-mode.el b/settings/setup-haskell-mode.el deleted file mode 100644 index fd83fca..0000000 --- a/settings/setup-haskell-mode.el +++ /dev/null @@ -1,18 +0,0 @@ -(require 'haskell-mode) -(require 'lsp-haskell) -(require 'flycheck-haskell) - -(defun haskell/pretty-symbols () - (setq prettify-symbols-alist - '( - ("\\" . ?λ) - (">=" . ?≥) - ("<=" . ?≤) - ("()" . ?∅)))) - -;; (add-hook 'haskell-mode-hook 'hasklig-mode) -;; (add-hook 'haskell-mode-hook 'haskell/pretty-symbols) - -;; (setq inferior-haskell-find-project-root nil) - -(provide 'setup-haskell-mode) diff --git a/settings/setup-ido.el b/settings/setup-ido.el deleted file mode 100644 index 26daeb2..0000000 --- a/settings/setup-ido.el +++ /dev/null @@ -1,45 +0,0 @@ -(require 'ido) -(require 'flx-ido) -(ido-mode t) -(ido-everywhere t) -(flx-ido-mode t) - -;; disable flex matching to use flx-ido -(setq ido-disable-flex-matching t - ido-use-faces nil - ido-create-new-buffer 'always) - -(require 'ido-vertical-mode) -(ido-vertical-mode) - -;; C-n/p is more intuitive in vertical layout -(setq ido-vertical-define-keys 'C-n-C-p-up-down-left-right) - -(defun my/ido-go-straight-home () - (interactive) - (cond - ((looking-back "/") (insert "~/")) - (:else (call-interactively 'self-insert-command)))) - -(defun my/setup-ido () - ;; Go straight home - (define-key ido-file-completion-map (kbd "~") 'my/ido-go-straight-home) - (define-key ido-file-completion-map (kbd "C-~") 'my/ido-go-straight-home) - - ;; Use C-w to go back up a dir to better match normal usage of C-w - ;; - insert current file name with C-x C-w instead. - (define-key ido-file-completion-map (kbd "C-w") 'ido-delete-backward-updir) - (define-key ido-file-completion-map (kbd "C-x C-w") 'ido-copy-current-file-name) - - (define-key ido-file-dir-completion-map (kbd "C-w") 'ido-delete-backward-updir) - (define-key ido-file-dir-completion-map (kbd "C-x C-w") 'ido-copy-current-file-name)) - -(add-hook 'ido-setup-hook 'my/setup-ido) - -;; Always rescan buffer for imenu -(set-default 'imenu-auto-rescan t) - -(add-to-list 'ido-ignore-directories "target") -(add-to-list 'ido-ignore-directories "node_modules") - -(provide 'setup-ido) diff --git a/settings/setup-keychain-environment.el b/settings/setup-keychain-environment.el deleted file mode 100644 index 6d6c294..0000000 --- a/settings/setup-keychain-environment.el +++ /dev/null @@ -1,75 +0,0 @@ -;;; keychain-environment.el --- load keychain environment variables - -;; Copyright (C) 2011-2016 Jonas Bernoulli -;; Copyright (C) 2008-2011 Paul Tipper - -;; Author: Paul Tipper <bluefoo at googlemail dot com> -;; Maintainer: Jonas Bernoulli <jonas@bernoul.li> -;; Created: 20081218 -;; Homepage: https://github.com/tarsius/keychain-environment -;; Keywords: gnupg, pgp, ssh - -;; This file is not part of GNU Emacs. - -;; This file is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) -;; any later version. - -;; This file is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; For a full copy of the GNU General Public License -;; see <http://www.gnu.org/licenses/>. - -;;; Commentary: - -;; Keychain is a script that manages ssh-agent and gpg-agent. It is -;; typically run from the shell's initialization file. It allows your -;; shells and cron jobs to share a single ssh-agent and/or gpg-agent. - -;; When keychain is run, it checks for running agent, otherwise it -;; starts them. It saves the agents' environment variables to files -;; inside ~/.keychain/, so that subsequent shells can source these -;; files. - -;; When Emacs is started under X11 and not directly from a terminal -;; these variables are not set. This library looks for these files -;; created by keychain and then sets Emacs' environment variables -;; accordingly. It does not actually run keychain, so you still -;; have to run that from a login shell first. - -;; To use run the function `keychain-refresh-environment' in your -;; init file. If keychain has not been run yet when you start Emacs -;; you can also later call that function interactively. - -;; Also see: http://www.funtoo.org/wiki/Keychain - -;;; Code: - -;;;###autoload -(defun keychain-refresh-environment () - "Set ssh-agent and gpg-agent environment variables. -Set the environment variables `SSH_AUTH_SOCK', `SSH_AGENT_PID' -and `GPG_AGENT' in Emacs' `process-environment' according to -information retrieved from files created by the keychain script." - (interactive) - (let* ((ssh (shell-command-to-string "keychain -q --noask --agents ssh --eval")) - (gpg (shell-command-to-string "keychain -q --noask --agents gpg --eval"))) - (list (and ssh - (string-match "SSH_AUTH_SOCK[=\s]\\([^\s;\n]*\\)" ssh) - (setenv "SSH_AUTH_SOCK" (match-string 1 ssh))) - (and ssh - (string-match "SSH_AGENT_PID[=\s]\\([0-9]*\\)?" ssh) - (setenv "SSH_AGENT_PID" (match-string 1 ssh))) - (and gpg - (string-match "GPG_AGENT_INFO[=\s]\\([^\s;\n]*\\)" gpg) - (setenv "GPG_AGENT_INFO" (match-string 1 gpg)))))) - -(provide 'setup-keychain-environment) -;; Local Variables: -;; indent-tabs-mode: nil -;; End: -;;; setup-keychain-environment.el ends here diff --git a/settings/setup-lisp-mode.el b/settings/setup-lisp-mode.el deleted file mode 100644 index 82420d5..0000000 --- a/settings/setup-lisp-mode.el +++ /dev/null @@ -1,34 +0,0 @@ -;;; setup-lisp-mode.el --- lisp mode settings -*- lexical-binding: t; -*- - -;; Copyright (C) 2018 Benj Bellon - -;; Author: Benj Bellon <benj@benj-ad1> -;; Keywords: lisp - -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see <https://www.gnu.org/licenses/>. - -;;; Commentary: - -;; Basic settings forlisp mode - -;;; Code: - -(add-hook 'lisp-mode-hook 'enable-paredit-mode) -(add-hook 'emacs-lisp-mode-hook 'enable-paredit-mode) - -;; setup eval inferior lisp in slime -;; (define-key global-map (kbd "C-c C-e") 'slime-eval-last-expression) - -(provide 'setup-lisp-mode) -;;; setup-lisp-mode.el ends here diff --git a/settings/setup-lsp-mode.el b/settings/setup-lsp-mode.el deleted file mode 100644 index a268e2b..0000000 --- a/settings/setup-lsp-mode.el +++ /dev/null @@ -1,40 +0,0 @@ -;;; setup-lsp-mode.el --- lsp setup -*- lexical-binding: t; -*- -(setq lsp-keymap-prefix "C-c l") - -(require 'lsp-mode) -(require 'cquery) - -(setq cquery-executable "/usr/local/bin/cquery") - -(setq read-process-output-max (* 1024 1024)) ;; 1mb -(setq lsp-completion-provider :capf) - -;; disable lsp-ui-doc-mode due to very slow update performance -;; TRACK: https://github.com/emacs-lsp/lsp-ui/issues/613 -(setq lsp-ui-doc-enable nil) -(setq lsp-clients-clangd-args '("--compile-commands-dir=build")) -(setq lsp-disabled-clients '()) - - -(lsp-treemacs-sync-mode 1) - -(add-hook 'c-mode-hook #'lsp) -(add-hook 'c++-mode-hook #'lsp) -(add-hook 'dart-mode-hook #'lsp) -(add-hook 'haskell-mode-hook #'lsp) -(add-hook 'lisp-mode-hook #'lsp) -(add-hook 'python-mode-hook #'lsp) -(add-hook 'rustic-mode #'lsp) -(add-hook 'web-mode-hook #'lsp) -(add-hook 'typescript-mode-hook #'lsp) - -(add-hook 'lsp-after-open-hook 'lsp-ui-mode) - -(with-eval-after-load 'lsp-mode - (add-hook 'lsp-mode-hook #'lsp-enable-which-key-integration) - (define-key lsp-mode-map (kbd "C-c l u f") 'lsp-ui-imenu) - (define-key lsp-mode-map (kbd "C-c l t d") 'lsp-dart-show-outline) - (define-key lsp-mode-map (kbd "C-c l t f") 'lsp-dart-show-flutter-outline)) - -(provide 'setup-lsp-mode) -;;; setup-lsp-mode.el ends here diff --git a/settings/setup-magit.el b/settings/setup-magit.el deleted file mode 100644 index 4e85e17..0000000 --- a/settings/setup-magit.el +++ /dev/null @@ -1,5 +0,0 @@ -(require 'magit) - -(global-set-key (kbd "C-x g") 'magit-status) - -(provide 'setup-magit) diff --git a/settings/setup-markdown-mode.el b/settings/setup-markdown-mode.el deleted file mode 100644 index 0e68d1c..0000000 --- a/settings/setup-markdown-mode.el +++ /dev/null @@ -1,26 +0,0 @@ -(require 'markdown-mode) -(setq markdown-imenu-generic-expression - '(("title" "^\\(.*\\)[\n]=+$" 1) - ("h2-" "^\\(.*\\)[\n]-+$" 1) - ("h1" "^# \\(.*\\)$" 1) - ("h2" "^## \\(.*\\)$" 1) - ("h3" "^### \\(.*\\)$" 1) - ("h4" "^#### \\(.*\\)$" 1) - ("h5" "^##### \\(.*\\)$" 1) - ("h6" "^###### \\(.*\\)$" 1) - ("fn" "^\\[\\^\\(.*\\)\\]" 1) - )) - -(add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode)) -(add-to-list 'auto-mode-alist '("\\.md' ." markdown-mode)) - -(autoload 'gfm-mode "markdown-mode" - (add-to-list 'auto-mode-alist '("README\\.md]]'" .gfm-mode))) - -(setq markdown-command "pandoc") - -(add-hook 'markdown-mode-hook - (lambda () - (setq imenu-generic-expression markdown-imenu-generic-expression))) - -(provide 'setup-markdown-mode) diff --git a/settings/setup-mu4e.el b/settings/setup-mu4e.el deleted file mode 100644 index 2f4b08e..0000000 --- a/settings/setup-mu4e.el +++ /dev/null @@ -1,114 +0,0 @@ -;;; Code: -(require 'mu4e) -;; (require 'org-mime) -;; (require 'org-mu4e) -(require 'smtpmail) -(require 'mu4e-alert) - -(setq personal-email (password-store-get-field "mbsync/personal-gmail" "username")) - -(setq - - ;; get mail options - mu4e-get-mail-command "mbsync -a" - mu4e-update-interval 120 - mu4e-headers-auto-update t - mu4e-view-prefer-html t - - ;; Don't save message to Sent Messages, Gmail/IMAP takes care of this - ;; Override in context switching for other type of mailboxes - mu4e-sent-messages-behavior 'delete - message-kill-buffer-on-exit t - - shr-color-visible-luminance-min 40 - - mu4e-view-show-images t - mu4e-use-fancy-chars t - - ;; This fixes the error 'mbsync error: UID is x beyond highest assigned UID x' - mu4e-change-filenames-when-moving t - - user-mail-address personal-email - user-full-name "Benj Bellon" - - ;; default to first (personal) context - mu4e-context-policy 'pick-first - mu4e-compose-context-policy 'pick-first - - ;; Customize the flags to something more sensible. - mu4e-headers-flagged-mark '("F" . "⚑") - mu4e-headers-unread-mark '("u" . "✉") - mu4e-headers-replied-mark '("R" . "←") - - mu4e-date-format "%y/%m/%d" - mu4e-headers-date-format "%Y/%m/%d" - mu4e-attachment-dir "~/Downloads/.mail-attachments" - mu4e-maildir "~/.mail/" - - ;; sendmail options - message-send-mail-function 'smtpmail-send-it - smtpmail-debug-info t - smtpmail-stream-type 'starttls - smtpmail-default-smtp-server "smtp.gmail.com") - -;; This will ensure the right 'sent from' address and email sign off etc. be -;; picked up when replying to emails. -(setq mu4e-contexts - `( - ,(make-mu4e-context - :name "personal" - :enter-func (lambda () (mu4e-message "Entering personal account context")) - :leave-func (lambda () (mu4e-message "Leaving personal account context")) - ;; We match based on the contact-fields of the message - :match-func (lambda (msg) - (when msg - (mu4e-message-contact-field-matches msg :to personal-email) - (mu4e-message-contact-field-matches msg :from personal-email) - (mu4e-message-contact-field-matches msg :cc personal-email) - (mu4e-message-contact-field-matches msg :bcc personal-email))) - :vars `((user-mail-address . ,personal-email) - (user-full-name . "Benj Bellon") - - (mu4e-drafts-folder . "/personal-gmail/[Gmail]/Drafts") - (mu4e-sent-folder . "/personal-gmail/[Gmail]/Sent Mail") - (mu4e-trash-folder . "/personal-gmail/[Gmail]/Trash") - (mu4e-refile-folder . "/personal-gmail/[Gmail]/All Mail") - - (mu4e-maildir-shortcuts . (("/personal-gmail/Inbox" . ?i) - ("/personal-gmail/[Gmail]/Drafts" . ?d) - ("/personal-gmail/[Gmail]/Trash" . ?t) - ("/personal-gmail/[Gmail]/All Mail" . ?a))) - - (mu4e-bookmarks . (("date:today..now AND flag:unread AND NOT (\"maildir:/personal-gmail/[Gmail]/Trash\")" "Inbox" ?i) - ("date:today..now AND NOT (\"maildir:/personal-gmail/[Gmail]/Trash\" OR \"maildir:/personal-gmail/[Gmail]/Sent Mail\")" "Today" ?t) - ("date:7d..now AND NOT (\"maildir:/personal-gmail/[Gmail]/Trash\" OR \"maildir:/personal-gmail/[Gmail]/Sent Mail\")" "Last 7 Days" ?w) - ("NOT (\"maildir:/personal-gmail/[Gmail]/Trash\" OR \"maildir:/personal-gmail/[Gmail]/Sent Mail\")" "All" ?a))) - - (smtpmail-queue-dir . "~/.mail/personal-gmail/queue/cur") - (smtpmail-smtp-user . ,personal-email) - (smtpmail-smtp-server . "smtp.gmail.com") - (smtpmail-smtp-service . 587))) - )) - - -(when (fboundp 'imagemagick-register-types) - (imagemagick-register-types)) - -(add-to-list 'mu4e-view-actions '("View In Browser" . mu4e-action-view-in-browser) t) - -(add-hook 'mu4e-compose-mode-hook (lambda () (auto-fill-mode -1))) -(add-hook 'message-send-hook (lambda () (mml-secure-message-sign-pgpmime))) - -;; mu4e-alerts -(mu4e-alert-set-default-style 'libnotify) -(add-hook 'after-init-hook #'mu4e-alert-enable-mode-line-display) -(add-hook 'after-init-hook #'mu4e-alert-enable-notifications) -(setq - mu4e-alert-interesting-mail-query (concat - "date:today..now" - " AND flag:unread" - " AND NOT (\"maildir:/personal-gmail/[Gmail]/Trash\" OR \"maildir:/personal-gmail/[Gmail]/Sent Mail\")")) - - -(provide 'setup-mu4e) -;;; setup-mu4e.el ends here diff --git a/settings/setup-multiple-cursors.el b/settings/setup-multiple-cursors.el deleted file mode 100644 index f472a75..0000000 --- a/settings/setup-multiple-cursors.el +++ /dev/null @@ -1,24 +0,0 @@ -;;; setup-multiple-cursors.el --- multiple cursors config -*- lexical-binding: t; -*- - -;;; Commentary: - -;; basic multiple cursors config - -;;; Code: -(require 'bindKeys) - - -(bindKeys '("m") - '(("m" . mc/mark-all-like-this) - ("l" . mc/edit-lines) - ("n" . mc/mark-next-like-this) - ("p" . mc/mark-previous-like-this) - ("r r" . mc/mark-all-in-region-regexp) - ("r v" . vr/mc-mark) - ("o" . mc/mark-pop) - ("s" . mc/sort-regions) - ("i" . mc/insert-numbers))) - - -(provide 'setup-multiple-cursors) -;;; setup-multiple-cursors.el ends here diff --git a/settings/setup-org-mode.el b/settings/setup-org-mode.el deleted file mode 100644 index daac7d0..0000000 --- a/settings/setup-org-mode.el +++ /dev/null @@ -1,40 +0,0 @@ -;; Pretty bullets -(global-set-key (kbd "C-c a") 'org-agenda) - -(require 'rainbow-mode) -(add-hook 'org-mode-hook 'rainbow-mode) - -(setq org-directory "~/workspace/.org") -(setq org-base-directory "~/workspace/.org") - -(setq - org-export-html-postamble nil - org-log-done 'note - org-todo-keywords '((sequence "Todo(t)" "In Progress(w)" "Blocked(b)" "|" "DONE(d)" "CANCELLED(c)")) - - org-inbox-file (concat org-base-directory "/inbox.org") - org-projects-file (concat org-base-directory "/projects.org") - org-someday-file (concat org-base-directory "/someday.org") - org-watchdog-file (concat org-base-directory "/watchdog.org") - - org-agenda-files `(,org-inbox-file ,org-projects-file ,org-watchdog-file) - org-refile-targets '((org-projects-file :maxlevel . 3) - (org-someday-file :level . 1) - (org-watchdog-file :maxlevel . 2))) - - -;; setup: org-capture -(setq org-capture-templates '(("t" "Todo [inbox]" entry - (file+headline org-inbox-file "Backlog") - "*** Todo %i %?"))) - -(setq org-agenda-custom-commands - '(("b" "Bug" tags-todo "@bug" - ((org-agenda-overriding-header "Bug"))))) - - -(global-set-key (kbd "C-c C-o c") 'org-capture) -(global-set-key (kbd "C-c C-o o") '(lambda () (interactive) (find-file org-base-directory))) -(global-set-key (kbd "C-c C-o i") '(lambda () (interactive) (find-file (concat org-base-directory "/inbox.org")))) - -(provide 'setup-org-mode) diff --git a/settings/setup-package.el b/settings/setup-package.el deleted file mode 100644 index 03445b1..0000000 --- a/settings/setup-package.el +++ /dev/null @@ -1,40 +0,0 @@ -;;; setup-package.el --- initialize package repos - -;;; Commentary: - -;;; basic m/elpa configuration - -;;;Code: -(require 'package) -;; Taken from magnars setup-package.el -;; https://github.com/magnars/.emacs.d/blob/master/settings/setup-package.el -(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t) -(add-to-list 'package-archives '("melpa-stable" . "http://stable.melpa.org/packages/") t) -;; (package-initialize) - -(unless (file-exists-p "~/.emacs.d/elpa/archives/melpa") - (package-refresh-contents)) - -;; install dash once if it's not already installed -(when (not (package-installed-p 'dash)) (package-install 'dash)) -(require 'dash) -(defun packages-install (packages) - (--each packages - (when (not (package-installed-p it)) - (package-install it))) - (delete-other-windows)) - -(defun require-package (package &optional min-version no-refresh) - "Install given PACKAGE, optionally requiring MIN-VERSION. -If NO-REFRESH is non-nil, the available package lists will not be -re-downloaded in order to locate PACKAGE." - (if (package-installed-p package min-version) - t - (if (or (assoc package package-archive-contents) no-refresh) - (package-install package) - (progn - (package-refresh-contents) - (require-package package min-version t))))) - -(provide 'setup-package) -;;; setup-package.el ends here diff --git a/settings/setup-projectile-mode.el b/settings/setup-projectile-mode.el deleted file mode 100644 index 71fb112..0000000 --- a/settings/setup-projectile-mode.el +++ /dev/null @@ -1,37 +0,0 @@ -;;; setup-projectile-mode.el --- projectile mode settings -*- lexical-binding: t; -*- - -;; Copyright (C) 2018 Benj Bellon - -;; Author: Benj Bellon <bbellon@bbellon-ld2.linkedin.biz> -;; Keywords: lisp - -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see <http://www.gnu.org/licenses/>. - -;;; Commentary: - -;; basic settings for projectile - -;;; Code: -(require 'projectile) - -(projectile-mode t) - -(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map) -(define-key projectile-command-map (kbd "s g") 'projectile-ripgrep) -(define-key projectile-command-map (kbd "s r") 'projectile-replace-regexp) - -(setq projectile-enable-caching t) - -(provide 'setup-projectile-mode) -;;; setup-projectile-mode.el ends here diff --git a/settings/setup-protobuf-mode.el b/settings/setup-protobuf-mode.el deleted file mode 100644 index 14876b5..0000000 --- a/settings/setup-protobuf-mode.el +++ /dev/null @@ -1,6 +0,0 @@ -(require 'protobuf-mode) -(c-lang-defconst c-cpp-matchers -protobuf 'nil) - -(provide 'setup-protobuf-mode) -;;; setup-protobuf-mode.el ends here diff --git a/settings/setup-purescript-mode.el b/settings/setup-purescript-mode.el deleted file mode 100644 index cba4ed7..0000000 --- a/settings/setup-purescript-mode.el +++ /dev/null @@ -1,3 +0,0 @@ -(require 'purescript-mode) -;; '(purescript-mode-hook (quote (turn-on-purescript-indent))) -(provide 'setup-purescript-mode) diff --git a/settings/setup-python-mode.el b/settings/setup-python-mode.el deleted file mode 100644 index c67f78e..0000000 --- a/settings/setup-python-mode.el +++ /dev/null @@ -1,8 +0,0 @@ -(require 'blacken) - -(add-hook 'python-mode-hook 'prettify-symbols-mode) -(add-hook 'python-mode-hook - (lambda () - (add-hook 'before-save-hook 'blacken-buffer))) - -(provide 'setup-python-mode) diff --git a/settings/setup-rustic-mode.el b/settings/setup-rustic-mode.el deleted file mode 100644 index 75c8464..0000000 --- a/settings/setup-rustic-mode.el +++ /dev/null @@ -1,23 +0,0 @@ -(require 'dap-lldb) -(require 'dap-gdb-lldb) -;; installs .extension/vscode -(dap-gdb-lldb-setup) -(dap-register-debug-template - "Rust::LLDB" - (list :type "lldb" - :request "launch" - :name "LLDB::Run" - :gdbpath "rust-lldb" - :target nil - :cwd (projectile-project-root))) - -(defun rk/rustic-mode-hook () - ;; so that run C-c C-c C-r works without having to confirm - (setq-local buffer-save-without-query t)) - -(setq rustic-format-on-save t) -(setq lsp-rust-analyzer-server-display-inlay-hints t) -(add-hook 'rustic-mode-hook 'rk/rustic-mode-hook) - -(provide 'setup-rustic-mode) -;;; setup-rustic-mode.el ends here diff --git a/settings/setup-slime-mode.el b/settings/setup-slime-mode.el deleted file mode 100644 index cbba516..0000000 --- a/settings/setup-slime-mode.el +++ /dev/null @@ -1,32 +0,0 @@ -;;; setup-slime-mode.el --- slime mode settings -*- lexical-binding: t; -*- - -;; Copyright (C) 2018 Benj Bellon - -;; Author: Benj Bellon <benj@benj-ad1> -;; Keywords: lisp - -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see <https://www.gnu.org/licenses/>. - -;;; Commentary: - -;; Basic settings for slime - -;;; Code: - -(require 'slime) - -(setq inferior-lisp-program "/usr/bin/sbcl") - -(provide 'setup-slime-mode) -;;; setup-slime-mode.el ends here diff --git a/settings/setup-terraform-mode.el b/settings/setup-terraform-mode.el deleted file mode 100644 index 7740f91..0000000 --- a/settings/setup-terraform-mode.el +++ /dev/null @@ -1,6 +0,0 @@ -(add-hook 'terraform-mode-hook - (lambda () - (add-hook 'before-save-hook 'terraform-format-buffer))) - -(provide 'setup-terraform-mode) -;;; setup-terraform-mode.el ends here diff --git a/settings/setup-treemacs.el b/settings/setup-treemacs.el deleted file mode 100644 index 6b4773c..0000000 --- a/settings/setup-treemacs.el +++ /dev/null @@ -1,19 +0,0 @@ -(require 'dash) -(require 'bindKeys) -(require 'treemacs) - -;; (setq treemacs-dir -;; (car (-filter (lambda (path) -;; (string-match-p "^.+.emacs.d/elpa/treemacs-[0-9]+.[0-9]+$" path)) -;; load-path))) - -(bindKeys '("t") - '(("i" . treemacs) - ("t" . treemacs-select-window) - ("b" . treemacs-bookmark) - ("f" . treemacs-find-file) - ("d" . treemacs-delete-other-windows) - ("s" . lsp-treemacs-symbols))) - -(provide 'setup-treemacs) -;;; setup-treemacs.el ends here diff --git a/settings/setup-treesitter.el b/settings/setup-treesitter.el deleted file mode 100644 index 3c97e26..0000000 --- a/settings/setup-treesitter.el +++ /dev/null @@ -1,15 +0,0 @@ -(setq treesit-language-source-alist - '((astro "https://github.com/virchau13/tree-sitter-astro") - (bash "https://github.com/tree-sitter/tree-sitter-bash") - (c "https://github.com/tree-sitter/tree-sitter-c") - (css "https://github.com/tree-sitter/tree-sitter-css") - (html "https://github.com/tree-sitter/tree-sitter-html") - (json "https://github.com/tree-sitter/tree-sitter-json") - (make "https://github.com/alemuller/tree-sitter-make") - (python "https://github.com/tree-sitter/tree-sitter-python") - (rust "https://github.com/tree-sitter/tree-sitter-rust") - (tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src") - (typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src"))) - -(provide 'setup-treesitter) -;;; setup-treesitter.el ends here diff --git a/settings/setup-txt-mode.el b/settings/setup-txt-mode.el deleted file mode 100644 index 6715e20..0000000 --- a/settings/setup-txt-mode.el +++ /dev/null @@ -1,24 +0,0 @@ -;;; setup-txt-mode.el --- basic txt mode config -*- lexical-binding: t; -*- - -;;; Commentary: - -;; Basic text mode config - -;;; Code: - -(defun setup-margins () - "Setup margins for text mode." - (setq left-margin-width 20) - (setq right-margin-width 20)) - -(defun text-configs () - "Setup basic text configs" - (visual-line-mode t) - (flyspell-mode t) - (setup-margins)) - -(add-to-list 'auto-mode-alist '("README\\'" . text-mode)) -(add-hook 'text-mode-hook 'text-configs) - -(provide 'setup-txt-mode) -;;; setup-txt-mode.el ends here diff --git a/settings/setup-typescript-mode.el b/settings/setup-typescript-mode.el deleted file mode 100644 index 31867b5..0000000 --- a/settings/setup-typescript-mode.el +++ /dev/null @@ -1,11 +0,0 @@ -(require 'typescript-mode) - -(defun indent-offset-ts () - (setq typescript-indent-level 2)) - -(add-to-list 'auto-mode-alist '("\\.tsx\\'" . typescript-mode)) -(add-hook 'typescript-mode-hook 'indent-offset-ts) - - -(provide 'setup-typescript-mode) -;;; setup-typescript-mode.el ends here diff --git a/settings/setup-web-mode.el b/settings/setup-web-mode.el deleted file mode 100644 index 8a4f088..0000000 --- a/settings/setup-web-mode.el +++ /dev/null @@ -1,44 +0,0 @@ -(require 'web-mode) -(require 'typescript-mode) - -(add-to-list 'auto-mode-alist '("\\.[agj]sp\\'" . web-mode)) -(add-to-list 'auto-mode-alist '("\\.as[cp]x\\'" . web-mode)) -(add-to-list 'auto-mode-alist '("\\.erb\\'" . web-mode)) -(add-to-list 'auto-mode-alist '("\\.ejs\\'" . web-mode)) -(add-to-list 'auto-mode-alist '("\\.hbs\\'" . web-mode)) -(add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode)) -(add-to-list 'auto-mode-alist '("\\.js\\'" . web-mode)) -(add-to-list 'auto-mode-alist '("\\.ts\\'" . typescript-mode)) -(add-to-list 'auto-mode-alist '("\\.tsx\\'" . typescript-mode)) -(add-to-list 'auto-mode-alist '("\\.mustache\\'" . web-mode)) -(add-to-list 'auto-mode-alist '("\\.tpl\\'" . web-mode)) -(add-to-list 'auto-mode-alist '("\\.eex\\'" . web-mode)) -(add-to-list 'auto-mode-alist '("\\.svelte\\'" . web-mode)) - - -(set-face-attribute 'web-mode-doctype-face nil :foreground "misty rose") -(set-face-attribute 'web-mode-html-tag-face nil :foreground "medium slate blue") -(set-face-attribute 'web-mode-html-attr-name-face nil :foreground "orange") -(set-face-attribute 'web-mode-html-tag-bracket-face nil :foreground "gray") -(set-face-attribute 'web-mode-block-control-face nil :foreground "deep sky blue") -(set-face-attribute 'web-mode-block-delimiter-face nil :foreground "medium aquamarine") - -(setq web-mode-engines-alist - '(("django" . "\\.html\\'"))) - -(defun indent-offset () - "Hooks for web mode." - (setq web-mode-markup-indent-offset 2) - (setq web-mode-code-indent-offset 2) - (setq web-mode-css-indent-offset 2) - (setq web-mode-style-padding 2) - (setq web-mode-script-padding 2)) - -;; (eval-after-load 'web-mode -;; '(add-hook 'web-mode-hook #'add-node-modules-path)) - -(add-hook 'web-mode-hook 'indent-offset) -(add-hook 'web-mode-hook 'prettier-mode) -;(add-hook 'web-mode-hook 'prettier-js-mode) - -(provide 'setup-web-mode) diff --git a/settings/setup-yaml-mode.el b/settings/setup-yaml-mode.el deleted file mode 100644 index f4e8a71..0000000 --- a/settings/setup-yaml-mode.el +++ /dev/null @@ -1,7 +0,0 @@ -(require 'yaml-mode) - -(add-hook 'yaml-mode-hook - (lambda () - (define-key yaml-mode-map "\C-m" 'newline-and-indent))) - -(provide 'setup-yaml-mode) diff --git a/settings/setup-yasnippet.el b/settings/setup-yasnippet.el deleted file mode 100644 index ddaf46e..0000000 --- a/settings/setup-yasnippet.el +++ /dev/null @@ -1,13 +0,0 @@ -(require 'yasnippet) - -(setq yas-snippet-dirs `(,(locate-user-emacs-file "templates/snippets"))) - -(yas-global-mode 1) -;; Jump to end of snippet definition -(define-key yas-keymap (kbd "<return>") 'yas-next-field) -(define-key yas-keymap (kbd "C-x RET TAB") 'yas-exit-all-snippets) - -(add-hook 'term-mode-hook (lambda() - (setq yas-dont-activate t))) - -(provide 'setup-yasnippet) |
