]> code.delx.au - dotemacs/blobdiff - lisp/my-file-modes.el
Add newlines at end of files
[dotemacs] / lisp / my-file-modes.el
index 6f1dd34e027efccdb3452014458b86c049db50ad..6020b4cf2e8848197e7c6cc453f8aa264d3ad0bb 100644 (file)
@@ -1,6 +1,7 @@
 ;;; -*- lexical-binding: t -*-
 
 (setq-default indent-tabs-mode nil)
+(setq-default require-final-newline t)
 
 (require 'cc-mode)
 (setq c-auto-align-backslashes nil)
@@ -34,6 +35,8 @@
 (setq js2-mode-show-parse-errors nil)
 (setq js2-mode-show-strict-warnings nil)
 (setq js--declaration-keyword-re "x^") ; declarations should have normal indentation
+(when (require 'tern nil 'noerror)
+  (add-hook 'js2-mode-hook (lambda () (tern-mode t))))
 
 (require 'markdown-mode)
 (define-key markdown-mode-map (kbd "M-{") 'markdown-beginning-of-block)