-
Notifications
You must be signed in to change notification settings - Fork 3
/
languages.el
71 lines (57 loc) · 2.46 KB
/
languages.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
;; paredit for lisp dialects
(add-hook 'emacs-lisp-mode-hook 'enable-paredit-mode)
;; show parens
(show-paren-mode t)
;; smartparent - trying it out
;;(smartparens-global-mode t)
;;(add-to-list 'sp-ignore-modes-list 'erc-mode)
;; paredit for non lisps
;;(add-hook 'ruby-mode-hook 'intinig-paredit-nonlisp)
;;(add-hook 'html-mode-hook 'intinig-paredit-nonlisp)
;; highlight current line
;;(add-hook 'prog-mode-hook 'intinig-turn-on-hl-line-mode)
;; highlight words
;;(add-hook 'prog-mode-hook 'idle-highlight-mode)
;; ruby mode defaults
(eval-after-load 'ruby-mode
'(progn
(define-key ruby-mode-map (kbd "C-l") 'intinig-insert-equals-l)
))
;; sass compilation in sass mode
;; (eval-after-load 'sass-mode
;; '(progn
;; (define-key sass-mode-map (kbd "C-x t") 'sass-compile-this-buffer)
;; (define-key sass-mode-map (kbd "C-x C-t") 'sass-compile-region)))
;; no deep indentation for ruby
(setq ruby-deep-indent-paren nil)
;; Rake files are ruby, too, as are gemspecs, rackup files, etc.
(add-to-list 'auto-mode-alist '("\\.rake$" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.thor$" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.gemspec$" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.ru$" . ruby-mode))
(add-to-list 'auto-mode-alist '("Rakefile$" . ruby-mode))
(add-to-list 'auto-mode-alist '("Thorfile$" . ruby-mode))
(add-to-list 'auto-mode-alist '("Gemfile$" . ruby-mode))
(add-to-list 'auto-mode-alist '("Capfile$" . ruby-mode))
(add-to-list 'auto-mode-alist '("Vagrantfile$" . ruby-mode))
;; We never want to edit Rubinius bytecode or MacRuby binaries
(add-to-list 'completion-ignored-extensions ".rbc")
(add-to-list 'completion-ignored-extensions ".rbo")
;; Erlang
(add-to-list 'auto-mode-alist '("\\.erl?$" . erlang-mode))
(add-to-list 'auto-mode-alist '("\\.hrl?$" . erlang-mode))
(add-to-list 'auto-mode-alist '("\\.app.src?$" . erlang-mode))
;; Web-mode goodies
;;(add-to-list 'auto-mode-alist '("\\.phtml\\'" . web-mode))
;;(add-to-list 'auto-mode-alist '("\\.tpl\\.php\\'" . web-mode))
;;(add-to-list 'auto-mode-alist '("\\.jsp\\'" . 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 '("\\.mustache\\'" . web-mode))
;;(add-to-list 'auto-mode-alist '("\\.djhtml\\'" . web-mode))
;; Corona
;;(add-to-list 'auto-mode-alist '("build\\.settings$" . lua-mode))
;; tab-widths
;;(setq coffee-tab-width 2)
(setq js-indent-level 2)
;;(setq lua-indent-level 4)