aboutsummaryrefslogtreecommitdiffstats
path: root/emacs/.emacs.d
diff options
context:
space:
mode:
authorGravatar Tom Willemse2018-07-17 00:38:59 -0700
committerGravatar Tom Willemse2018-07-17 00:38:59 -0700
commit91d97b939abb761906b66f98c0ddb812e42aec25 (patch)
tree948ad958028892a0b645047b7efe34f42fc9703b /emacs/.emacs.d
parentf97ac07cfb6c58446b6966cdf3971c0c97537308 (diff)
parente31e7663ab77266d6572f8f5c8e786436361ea2d (diff)
downloadnew-dotfiles-91d97b939abb761906b66f98c0ddb812e42aec25.tar.gz
new-dotfiles-91d97b939abb761906b66f98c0ddb812e42aec25.zip
Merge remote-tracking branch 'origin/stripped-down' into stripped-down
Diffstat (limited to 'emacs/.emacs.d')
-rw-r--r--emacs/.emacs.d/init.el5
-rw-r--r--emacs/.emacs.d/init/oni-elec-pair-init.el30
-rw-r--r--emacs/.emacs.d/init/oni-eshell-init.el54
-rw-r--r--emacs/.emacs.d/init/oni-eshell-init.org46
-rw-r--r--emacs/.emacs.d/init/oni-js-mode-init.el35
-rw-r--r--emacs/.emacs.d/init/oni-js-mode-init.org16
-rw-r--r--emacs/.emacs.d/init/oni-js2-init.el2
-rw-r--r--emacs/.emacs.d/init/oni-org-init.el4
-rwxr-xr-xemacs/.emacs.d/init/oni-web-mode-init.el7
-rwxr-xr-xemacs/.emacs.d/site-lisp/oni-windows-nt.el4
10 files changed, 139 insertions, 64 deletions
diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el
index 3674054..4503849 100644
--- a/emacs/.emacs.d/init.el
+++ b/emacs/.emacs.d/init.el
@@ -230,6 +230,7 @@ ORIG-FUN is the function being wrapped, ARGS are the arguments specified"
(setq projectile-completion-system 'ivy)
(add-to-list 'projectile-project-root-files "yarn.lock")
+(add-to-list 'projectile-project-root-files "fabfile.py")
(with-eval-after-load 'server
(diminish 'server-buffer-clients
@@ -347,6 +348,10 @@ ORIG-FUN is the function being wrapped, ARGS are the arguments specified"
(with-eval-after-load 'org (load "oni-org-init"))
+(with-eval-after-load 'elec-pair (load "oni-elec-pair-init"))
+
+(with-eval-after-load 'flycheck (load "oni-flycheck-init"))
+
(add-to-list 'grep-files-aliases '("js" . "*.js *.jsx *.json"))
(add-to-list 'grep-files-aliases '("css" . "*.css *.less *.sass *.scss"))
(add-to-list 'grep-files-aliases '("php" . "*.php *.inc *.module"))
diff --git a/emacs/.emacs.d/init/oni-elec-pair-init.el b/emacs/.emacs.d/init/oni-elec-pair-init.el
new file mode 100644
index 0000000..6874d10
--- /dev/null
+++ b/emacs/.emacs.d/init/oni-elec-pair-init.el
@@ -0,0 +1,30 @@
+;;; oni-elec-pair-init.el --- Electric pair config -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2018 Tom Willemse
+
+;; Author: Tom Willemse <tom@ryuslash.org>
+;; Keywords: local
+
+;; 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:
+
+;; My configuration for `electric-pair-mode' and friends.
+
+;;; Code:
+
+(setq electric-pair-skip-whitespace 'chomp)
+
+(provide 'oni-elec-pair-init)
+;;; oni-elec-pair-init.el ends here
diff --git a/emacs/.emacs.d/init/oni-eshell-init.el b/emacs/.emacs.d/init/oni-eshell-init.el
new file mode 100644
index 0000000..bae1acb
--- /dev/null
+++ b/emacs/.emacs.d/init/oni-eshell-init.el
@@ -0,0 +1,54 @@
+;;; oni-eshell-init.el --- Eshell config -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2018 Tom Willemse
+
+;; Author: Tom Willemse <tom@ryuslash.org>
+;; Keywords: local
+
+;; 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:
+
+;; My Eshell configuration.
+
+;;; Code:
+
+(require 'eshell)
+(require 'em-prompt)
+
+(defun oni-eshell-init-C-d ()
+ "Call `delete-char' or close the buffer if it fails."
+ (interactive)
+ (condition-case err
+ (call-interactively #'delete-char)
+ (error (if (and (eq (car err) 'end-of-buffer)
+ (looking-back eshell-prompt-regexp nil))
+ (kill-buffer)
+ (signal (car err) (cdr err))))))
+
+(defun oni-eshell-init-enable-truncating-buffers ()
+ "Add `eshell-truncate-buffer' to `eshell-output-filter-functions'."
+ (add-to-list 'eshell-output-filter-functions 'eshell-truncate-buffer))
+
+(add-hook 'eshell-load-hook #'oni-eshell-init-enable-truncating-buffers)
+(add-hook 'eshell-mode-hook 'eshell-fringe-status-mode)
+
+(defun oni:set-eshell-C-d ()
+ "Set `C-d' to quit eshell if used at end of prompt."
+ (define-key eshell-mode-map (kbd "C-d") #'oni-eshell-init-C-d))
+
+(add-hook 'eshell-first-time-mode-hook #'oni:set-eshell-C-d)
+
+(provide 'oni-eshell-init)
+;;; oni-eshell-init.el ends here
diff --git a/emacs/.emacs.d/init/oni-eshell-init.org b/emacs/.emacs.d/init/oni-eshell-init.org
deleted file mode 100644
index b3c6391..0000000
--- a/emacs/.emacs.d/init/oni-eshell-init.org
+++ /dev/null
@@ -1,46 +0,0 @@
-#+TITLE: Eshell configuration
-
-#+BEGIN_SRC emacs-lisp
- (require 'eshell)
- (require 'em-prompt)
-#+END_SRC
-
-Truncate the eshell buffer when it gets larger than
-=eshell-buffer-maximum-lines= number of lines. For some reason I have
-to use the =eshell-load-hook= instead of just relying on ~eshell.el~
-and ~esh-mode.el~ being loaded because it seems that
-=with-eval-after-load= loads this file before ~eshell.el~ is actually
-loaded.
-
-#+BEGIN_SRC emacs-lisp
- (defun oni:enable-truncating-eshell-buffers ()
- (add-to-list 'eshell-output-filter-functions 'eshell-truncate-buffer))
-
- (add-hook 'eshell-load-hook #'oni:enable-truncating-eshell-buffers)
-#+END_SRC
-
-Show the status of each command in the fringe of the eshell buffer.
-
-#+BEGIN_SRC emacs-lisp
- (add-hook 'eshell-mode-hook 'eshell-fringe-status-mode)
-#+END_SRC
-
-Close the buffer when C-d is pressed and we're at the end of the
-buffer.
-
-#+BEGIN_SRC emacs-lisp
- (defun oni:eshell-C-d ()
- "Call `delete-char' or close the buffer if it fails."
- (interactive)
- (condition-case err
- (call-interactively #'delete-char)
- (error (if (and (eq (car err) 'end-of-buffer)
- (looking-back eshell-prompt-regexp nil))
- (kill-buffer)
- (signal (car err) (cdr err))))))
-
- (defun oni:set-eshell-C-d ()
- (define-key eshell-mode-map (kbd "C-d") #'oni:eshell-C-d))
-
- (add-hook 'eshell-first-time-mode-hook #'oni:set-eshell-C-d)
-#+END_SRC
diff --git a/emacs/.emacs.d/init/oni-js-mode-init.el b/emacs/.emacs.d/init/oni-js-mode-init.el
new file mode 100644
index 0000000..d7886ce
--- /dev/null
+++ b/emacs/.emacs.d/init/oni-js-mode-init.el
@@ -0,0 +1,35 @@
+;;; oni-js-mode-init.el --- js-mode config -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2018 Tom Willemse
+
+;; Author: Tom Willemse <tom@ryuslash.org>
+;; Keywords: local
+
+;; 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:
+
+;; Configuration for `js-mode'.
+
+;;; Code:
+
+(require 'js)
+
+(setq js-enabled-frameworks '(javascript))
+
+(add-hook 'js-mode-hook 'electric-pair-local-mode)
+(add-hook 'js-mode-hook 'electric-indent-local-mode)
+
+(provide 'oni-js-mode-init)
+;;; oni-js-mode-init.el ends here
diff --git a/emacs/.emacs.d/init/oni-js-mode-init.org b/emacs/.emacs.d/init/oni-js-mode-init.org
deleted file mode 100644
index e28e84d..0000000
--- a/emacs/.emacs.d/init/oni-js-mode-init.org
+++ /dev/null
@@ -1,16 +0,0 @@
-#+TITLE: JavaScript mode
-
-I use js-mode for json files because js2-mode always complains about
-syntax errors.
-
-Turn on electric pairing for js-mode buffers.
-
-#+BEGIN_SRC emacs-lisp
- (add-hook 'js-mode-hook 'electric-pair-local-mode)
-#+END_SRC
-
-Turn on electric indent mode for js-mode buffers.
-
-#+BEGIN_SRC emacs-lisp
- (add-hook 'js-mode-hook 'electric-indent-local-mode)
-#+END_SRC
diff --git a/emacs/.emacs.d/init/oni-js2-init.el b/emacs/.emacs.d/init/oni-js2-init.el
index 506a2e5..df2191d 100644
--- a/emacs/.emacs.d/init/oni-js2-init.el
+++ b/emacs/.emacs.d/init/oni-js2-init.el
@@ -27,7 +27,9 @@
(require 'js2-mode)
(require 'js2-refactor)
+(setq js2-include-node-externs t)
(setq js2-strict-trailing-comma-warning nil)
+(setq js2-strict-missing-semi-warning nil)
(setq js2-basic-offset 2)
(add-hook 'js2-mode-hook 'subword-mode)
diff --git a/emacs/.emacs.d/init/oni-org-init.el b/emacs/.emacs.d/init/oni-org-init.el
index 223fb08..67559ff 100644
--- a/emacs/.emacs.d/init/oni-org-init.el
+++ b/emacs/.emacs.d/init/oni-org-init.el
@@ -29,13 +29,13 @@
(require 'org-capture)
(setq org-src-fontify-natively t)
+(setq org-return-follows-link t)
+(setq org-fontify-whole-heading-line t)
(setq org-hide-emphasis-markers t)
(setq org-return-follows-link t)
(add-hook 'org-mode-hook 'auto-fill-mode)
-
(add-hook 'org-mode-hook 'org-bullets-mode)
-
(provide 'oni-org-init)
;;; oni-org-init.el ends here
diff --git a/emacs/.emacs.d/init/oni-web-mode-init.el b/emacs/.emacs.d/init/oni-web-mode-init.el
index 3538f23..42734d2 100755
--- a/emacs/.emacs.d/init/oni-web-mode-init.el
+++ b/emacs/.emacs.d/init/oni-web-mode-init.el
@@ -24,6 +24,13 @@
;;; Code:
+(setq web-mode-attr-indent-offset 2)
+(setq web-mode-auto-quote-style 1)
+(setq web-mode-code-indent-offset 2)
+(setq web-mode-comment-style 2)
+(setq web-mode-css-indent-offset 2)
+(setq web-mode-css-indent-offset 2)
+
(add-hook 'web-mode-hook 'whitespace-only-tabs-mode)
(add-hook 'web-mode-hook 'flycheck-mode)
(add-hook 'web-mode-hook 'electric-pair-local-mode)
diff --git a/emacs/.emacs.d/site-lisp/oni-windows-nt.el b/emacs/.emacs.d/site-lisp/oni-windows-nt.el
index 06db487..19b80a4 100755
--- a/emacs/.emacs.d/site-lisp/oni-windows-nt.el
+++ b/emacs/.emacs.d/site-lisp/oni-windows-nt.el
@@ -54,6 +54,10 @@
(setq grep-program (shell-quote-argument "c:/cygwin64/bin/grep.exe"))
(setq grep-use-null-device nil)
(setq delete-by-moving-to-trash t)
+(setq projectile-enable-caching nil)
+(setq projectile-generic-command "\"C:\\Program Files\\Git\\usr\\bin\\find.exe\" . -type d \"(\" -path \"*/node_modules\" -o -path \"*/upload-test\" -o -path \"*/dlls\" -o -path \"*/apps/*/img\" -o -path \"*/apps/*/video\" -o -path \"*/apps/*/font\" -o -path \"*/apps/*/content\" -o -path \"*/apps/*/favicons\" -o -path \"*/apps/*/pages.*\" -o -path \"*/.intl\" \")\" -prune -o -type f -print0")
+(setq projectile-git-command "\"C:/Program Files/Git/bin/git.exe\" ls-files -zco --exclude-standard")
+(setq projectile-indexing-method 'alien)
(setq-default buffer-file-coding-system 'utf-8-unix)