Add alchemist to elixir mode

This commit is contained in:
Maciej Szlosarczyk 2017-04-23 22:56:55 +03:00
parent 83569bf5f9
commit 20eb71b9c1
No known key found for this signature in database
GPG key ID: 0D4EEACF63D4262E
3 changed files with 21 additions and 14 deletions

View file

@ -82,18 +82,20 @@
;;;;;;;;;;;;;;;;;;;;;; indentation functions ;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;; indentation functions ;;;;;;;;;;;;;;;;;;;;;;
;; Use this function for ruby, elixir and such ;; Use this function for ruby, elixir and such
(defun set-line-limit-80-tab-2 () (defun set-line-limit-80-tab-2 ()
(setq whitespace-line-column 80) "Set line length to 80 and indentation to 2."
(setq tab-width 2) (setq whitespace-line-column 80)
(setq tab-stop-list (quote(2 4 6 8 10 12 14 16 20 22 24 26 28 30 32 34 36 38 (setq tab-width 2)
40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 (setq tab-stop-list (quote(2 4 6 8 10 12 14 16 20 22 24 26 28 30 32 34 36 38
72 74 76 78 80)))) 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70
72 74 76 78 80))))
;; Use this function for rust ;; Use this function for rust
(defun set-line-limit-99-tab-4 () (defun set-line-limit-99-tab-4 ()
(setq whitespace-line-column 99) "Set line length to 99 and indentation to 4."
(setq tab-width 4) (setq whitespace-line-column 99)
(setq tab-stop-list (quote(4 8 12 16 24 28 32 36 40 44 48 52 56 60 (setq tab-width 4)
64 68 72 76 80 84 88 92 96)))) (setq tab-stop-list (quote(4 8 12 16 24 28 32 36 40 44 48 52 56 60
64 68 72 76 80 84 88 92 96))))
;; By default, use 80 ;; By default, use 80
(set-line-limit-80-tab-2) (set-line-limit-80-tab-2)
@ -132,6 +134,8 @@
(require 'evil-leader) (require 'evil-leader)
(global-evil-leader-mode) (global-evil-leader-mode)
(evil-mode 1) (evil-mode 1)
;; Add magit for git
(require 'evil-magit) (require 'evil-magit)
;; ; Change cursor depending on the evil-mode ;; ; Change cursor depending on the evil-mode

View file

@ -1,6 +1,9 @@
(defun kill-other-buffers ;;; Functions -- summary
"Kill all buffers except for the current one" ;;; Commentary:
;;; Code:
(defun kill-other-buffers ()
"Kill all buffers except for the current one."
(interactive) (interactive)
(mapc 'kill-buffer (delq (current-buffer) (buffer-list))) (mapc 'kill-buffer (delq (current-buffer) (buffer-list)))
) )
;;; functions.el ends here

View file

@ -44,13 +44,13 @@
(add-hook 'rust-mode-hook 'rust-mode-config) (add-hook 'rust-mode-hook 'rust-mode-config)
;;; Elixir ;;; Elixir
(require 'alchemist)
(defun elixir-mode-config () (defun elixir-mode-config ()
"Call elixir mode config." "Call elixir mode config."
(remove-hook 'ruby-mode-hook 'ruby-mode-config) (remove-hook 'ruby-mode-hook 'ruby-mode-config)
(remove-hook 'rust-mode-hook 'rust-mode-config) (remove-hook 'rust-mode-hook 'rust-mode-config)
(remove-hook 'emacs-lisp-mode-hook 'elisp-mode-config) (remove-hook 'emacs-lisp-mode-hook 'elisp-mode-config)
(require 'alchemist) (alchemist-mode 1)
(alchemist-mode)
(flycheck-mode 1) (flycheck-mode 1)
(set-line-limit-80-tab-2) (set-line-limit-80-tab-2)
(ruby-end-mode)) (ruby-end-mode))