Skip to content

Commit

Permalink
updates from work, custom yasnippets, ensime
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Gran committed Jul 6, 2016
1 parent 911c967 commit 0e38732
Show file tree
Hide file tree
Showing 13 changed files with 103 additions and 34 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@ recentf
savefile
tramp
eshell
rake.cache
rake.cache
/saved-places
/smex-items
/url/*
11 changes: 11 additions & 0 deletions .mc-lists.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
;; This file is automatically generated by the multiple-cursors extension.
;; It keeps track of your preferences for running commands with multiple cursors.

(setq mc/cmds-to-run-for-all
'(
clipboard-yank
))

(setq mc/cmds-to-run-once
'(
))
3 changes: 3 additions & 0 deletions Cask
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
(depends-on "elixir-mode")
(depends-on "elscreen")
(depends-on "elscreen-buffer-group")
(depends-on "ensime")
(depends-on "epl")
(depends-on "eww-lnum")
(depends-on "exec-path-from-shell")
Expand Down Expand Up @@ -84,9 +85,11 @@
(depends-on "redo+")
(depends-on "robe")
(depends-on "rspec-mode")
(depends-on "ruby-additional")
(depends-on "rust-mode")
(depends-on "s")
(depends-on "scad-mode")
(depends-on "scala-mode")
(depends-on "scss-mode")
(depends-on "shut-up")
(depends-on "slim-mode")
Expand Down
6 changes: 3 additions & 3 deletions init.el
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
(quote
("21d5f90e7565c1edc6db8cd4ae7adb7b81e0fa4f1be2726bfdbbd9ab7dbfbd6d" "e6d2471579829f38c348f5fb922e273eff858c7c7687bfa870f075552d9dbfa7" "6a37be365d1d95fad2f4d185e51928c789ef7a4ccf17e7ca13ad63a8bf5b922f" "c5a044ba03d43a725bd79700087dea813abcb6beb6be08c7eb3303ed90782482" "c74e83f8aa4c78a121b52146eadb792c9facc5b1f02c917e3dbb454fca931223" "3c83b3676d796422704082049fc38b6966bcad960f896669dfc21a7a37a748fa" "2a953a5d70fdfb1aeb07b81b3c3d703d5ed0359f932896a49b45784ef3b37dfa" default)))
'(fci-rule-color "#102a33")
'(js2-basic-offset 2)
'(js2-basic-offset 2 t)
'(jsx-indent-level 2)
'(magit-completing-read-function (quote magit-ido-completing-read))
'(magit-push-arguments nil)
Expand All @@ -45,8 +45,8 @@
(unsplittable . t)
(set-background-color "black"))))
'(tab-width 2)
'(web-mode-code-indent-offset 2)
'(web-mode-markup-indent-offset 2))
'(web-mode-code-indent-offset 2 t)
'(web-mode-markup-indent-offset 2 t))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
Expand Down
30 changes: 7 additions & 23 deletions jg/jg-functions.el
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,13 @@
(buffer-list)))


;; (defun view-percent ()
;; (interactive)
;; (snippet-insert "<% $. %>")
;; )

;; (defun view-percent-equal ()
;; (interactive)
;; (snippet-insert "<%= $. %>")
;; )

;; (defun layout-content ()
;; (interactive)
;; (snippet-insert "<%= content_for(:$${title}) { $. } %>")
;; )

;; (defun css-curlies ()
;; (interactive)
;; (snippet-insert " {\n$.\n}")
;; (forward-line 1)
;; (indent-for-tab-command)
;; (forward-line -1)
;; (indent-for-tab-command)
;; )
(defun demi-brolin ()
(interactive)
(save-excursion
(progn
(end-of-line)
(insert-char ?\;))))


(defun open-line-above ()
(interactive)
Expand Down
2 changes: 1 addition & 1 deletion jg/jg-init.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;; color theme stuff.
(add-to-list 'custom-theme-load-path (concat emacs-root "jg/color-themes/jg-zenburn"))
(load-theme 'jg-zenburn)
(load-theme 'jg-zenburn t)
(require 'unicode-fonts)
(unicode-fonts-setup)

Expand Down
42 changes: 36 additions & 6 deletions jg/jg-modes.el
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@
(global-subword-mode 1)

(require 'smart-mode-line)
(sml/setup)
(sml/apply-theme 'respectful)
(add-hook 'after-init-hook '(lambda ()
(sml/setup)
(setq sml/no-confirm-load-theme t)
(sml/apply-theme 'respectful)))

(require 'git-status-modeline)
(git-status-modeline-global-mode)
Expand Down Expand Up @@ -123,8 +125,21 @@
(require 'expand-region)
(require 'ruby-mode)
(setq ruby-insert-encoding-magic-comment nil)
(setq ruby-use-smie nil)
(setq ruby-deep-indent-paren nil)
(setq ruby-deep-indent-paren-style nil)

; Markdown support


(require 'ensime)
(add-hook 'scala-mode-hook 'ensime-scala-mode-hook)






;; Markdown support
(autoload 'markdown-mode "markdown-mode.el"
"Major mode for editing Markdown files" t)
(add-to-list 'auto-mode-alist '("\\.text$" . markdown-mode))
Expand Down Expand Up @@ -175,14 +190,23 @@

;; js mode
(setq js-indent-level 2)
(add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))
(add-to-list 'auto-mode-alist '("\\.conkerorrc$" . js2-mode))
(setq js2-basic-offset 2)
(setq sgml-basic-offset 2)

(add-to-list 'auto-mode-alist '("\\.js\\'" . js2-jsx-mode))
(add-to-list 'auto-mode-alist '("\\.conkerorrc$" . js2-mode))
(add-to-list 'auto-mode-alist '("\\.jsx?\\'" . js2-jsx-mode))
(add-to-list 'interpreter-mode-alist '("node" . js2-jsx-mode))
(add-to-list 'auto-mode-alist '("\\.es6\\'" . js2-mode))

;; adjust indents for web-mode to 2 spaces
(setq web-mode-markup-indent-offset 2)
(setq web-mode-css-indent-offset 2)
(setq web-mode-code-indent-offset 2)

(eval-after-load 'js2-mode '(lambda ()
(define-key js2-mode-map (kbd "M-;") 'demi-brolin)))

(add-to-list 'auto-mode-alist '("\\.es6\\'" . js2-mode))


;; coffeescript mode
Expand Down Expand Up @@ -376,6 +400,12 @@
(define-key yas-minor-mode-map (kbd "<tab>") nil)
(define-key yas-minor-mode-map (kbd "TAB") nil)
(define-key yas-minor-mode-map (kbd "C-y") 'yas-expand)
(define-key yas-minor-mode-map (kbd "C-M-e") 'yas-expand)
(eval-after-load 'yasnippet '(lambda ()
(yas-load-directory (concat emacs-root "jg/yas"))))





(setq shell-file-name "/usr/local/bin/bash")
Expand Down
3 changes: 3 additions & 0 deletions jg/jg-setup.el
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

(defalias 'yes-or-no-p 'y-or-n-p)

(setq split-height-threshold 9999
split-width-threshold 160)

(setq
backup-by-copying t ; don't clobber symlinks
backup-directory-alist '(("." . "~/.saves")) ; don't litter my fs tree
Expand Down
7 changes: 7 additions & 0 deletions jg/yas/js-mode/js-array.yasnippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: jg_js#array
# key: a
# --
[
$0
]
7 changes: 7 additions & 0 deletions jg/yas/js-mode/js-arrowfn.yasnippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: jg_js#arrowFunction
# key: fa
# --
=> {
$0
}
7 changes: 7 additions & 0 deletions jg/yas/js-mode/js-empty-function.yasnippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: jg_js#emptyArrowFunction
# key: efa
# --
() => {
$0
}
7 changes: 7 additions & 0 deletions jg/yas/js-mode/js-function.yasnippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: jg_js#anonymousFunction
# key: afn
# --
function($0) {
$1
}
7 changes: 7 additions & 0 deletions jg/yas/js-mode/js-object.yasnippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: jg_js#object
# key: o
# --
{
$0
}

0 comments on commit 0e38732

Please sign in to comment.