TODO: * fix flyspell not loading on every buffer * Add other dictionaries to flyspell (Polish)
26 lines
724 B
EmacsLisp
26 lines
724 B
EmacsLisp
(add-hook 'ruby-mode-hook
|
|
(aggressive-indent-mode))
|
|
|
|
(add-hook 'yaml-mode-hook
|
|
(lambda () (indent-guide-mode -1)))
|
|
|
|
(add-hook 'sql-mode-hook
|
|
(lambda () (indent-guide-mode -1)))
|
|
|
|
(defun align-to-colon (begin end)
|
|
"Align region to colon (:) signs"
|
|
(interactive "r")
|
|
(align-regexp begin end
|
|
(rx ":" (group (zero-or-more (syntax whitespace))) ) 1 1 ))
|
|
|
|
;; Do not align 'begin' and 'while' ;;
|
|
(setq ruby-align-to-stmt-keywords '(if begin case elseif rescue))
|
|
|
|
;; Do not indent inside the parenthasis
|
|
(setq ruby-deep-indent-paren nil)
|
|
|
|
;; 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))
|