Simplify Ruby configuration
This commit is contained in:
parent
f6541b764c
commit
3e9b0b12d4
3 changed files with 17 additions and 15 deletions
|
|
@ -6,4 +6,9 @@
|
|||
(interactive)
|
||||
(mapc 'kill-buffer (delq (current-buffer) (buffer-list)))
|
||||
)
|
||||
|
||||
(defun align-to-colon (begin end)
|
||||
"Align region from BEGIN to END according to colon signs."
|
||||
(align-regexp begin end
|
||||
(rx ":" (group (zero-or-mode (syntax-white))))))
|
||||
;;; functions.el ends here
|
||||
|
|
|
|||
23
languages.el
23
languages.el
|
|
@ -10,22 +10,19 @@
|
|||
(remove-hook 'elixir-mode-hook 'elixir-mode-config)
|
||||
(remove-hook 'emacs-lisp-mode-hook 'elisp-mode-config)
|
||||
|
||||
(aggressive-mode-indent)
|
||||
(defun align-to-colon (begin end)
|
||||
"Align region to colon signs"
|
||||
(align-regexp begin end
|
||||
(rx ":" (group (zero-or-mode (syntax-white))))))
|
||||
;; Do not align 'begin' and 'while' ;;
|
||||
(setq ruby-align-to-stmt-keywords '(if begin case elseif rescue))
|
||||
(aggressive-mode-indent))
|
||||
|
||||
;; Do not indent inside the parenthasis
|
||||
(setq ruby-deep-indent-paren nil)
|
||||
;; Do not align 'begin' and 'while' ;;
|
||||
(setq ruby-align-to-stmt-keywords '(if begin case elseif rescue))
|
||||
|
||||
;; Do not insert encoding comments ;;
|
||||
(setq ruby-insert-encoding-magic-comment nil)
|
||||
;; Do not indent inside the parenthasis
|
||||
(setq ruby-deep-indent-paren nil)
|
||||
|
||||
;; Use web-mode for erb
|
||||
(add-to-list 'auto-mode-alist '("\\.erb\\'" . web-mode)))
|
||||
;; Do not insert encoding comments ;;
|
||||
(setq ruby-insert-encoding-magic-comment nil)
|
||||
|
||||
;; Use web-mode for erb
|
||||
(add-to-list 'auto-mode-alist '("\\.erb\\'" . web-mode))
|
||||
|
||||
(add-hook 'ruby-mode-hook 'ruby-mode-config)
|
||||
(add-hook 'ruby-mode-hook 'set-line-80)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
(require 'smart-mode-line)
|
||||
(setq sml/no-confirm-load-theme t)
|
||||
(sml/setup)
|
||||
(sml/apply-theme 'light)
|
||||
(sml/apply-theme 'dark)
|
||||
|
||||
;; Display time on mode line
|
||||
(setq display-time-format "%H:%M")
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
(require 'helm-themes)
|
||||
(if (display-graphic-p)
|
||||
(progn
|
||||
(enable-theme 'flatui))
|
||||
(enable-theme 'atom-one-dark))
|
||||
;; (enable-theme 'airline-doom-one)
|
||||
;; (helm-themes 'avk-daylight t))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue