]> code.delx.au - dotemacs/commitdiff
flycheck improvements
authorJames Bunton <jamesbunton@delx.net.au>
Sun, 24 Jul 2016 11:01:45 +0000 (21:01 +1000)
committerJames Bunton <jamesbunton@delx.net.au>
Sun, 24 Jul 2016 23:25:16 +0000 (09:25 +1000)
init.el
lisp/my-defuns.el
lisp/my-file-modes.el
lisp/my-flycheck.el [new file with mode: 0644]
lisp/my-minor-modes.el

diff --git a/init.el b/init.el
index 398500c1a7bcb362be0080f66e13e18bedabe229..d8cedf2e4c1d2c23e782acdcc7d8d0e9c6e177fc 100644 (file)
--- a/init.el
+++ b/init.el
@@ -12,6 +12,7 @@
 (load-library "my-keys")
 (load-library "my-completion")
 (load-library "my-recentf")
+(load-library "my-flycheck")
 (load-library "my-other-modes")
 (load-library "my-minor-modes")
 (load-library "my-file-modes")
index 35cb3051f6892026b32a354bc544f5cf6f4b06dc..ee4d4e49dd6e4fb06d16c1ceaf3d954fa78c36c6 100644 (file)
   "If using a terminal frame then sends the escape codes to update the title."
   (if (terminal-parameter (frame-terminal) 'terminal-initted)
       (send-string-to-terminal (concat "\033]0;" (my/generate-frame-title) "\007"))))
-
-(defun my/use-eslint-from-node-modules ()
-  (let* ((root (locate-dominating-file
-                (or (buffer-file-name) default-directory)
-                "node_modules"))
-         (eslint (and root
-                      (expand-file-name "node_modules/.bin/eslint" root))))
-    (when (and eslint (file-executable-p eslint))
-      (setq-local flycheck-javascript-eslint-executable eslint))))
index ba893a310128d3e63ac7be3b8acd7f0f8d2f9064..326e6eeea76c47f534333c479e51137afb9a1ff2 100644 (file)
@@ -24,6 +24,8 @@
 (require 'js2-mode)
 (add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))
 (add-to-list 'interpreter-mode-alist '("node" . js2-mode))
+(setq js2-concat-multiline-strings 'eol)
+(setq js2-highlight-external-variables nil)
 
 (require 'markdown-mode)
 (setq markdown-command "markdown_py -x markdown.extensions.smart_strong -x markdown.extensions.fenced_code -x markdown.extensions.nl2br")
diff --git a/lisp/my-flycheck.el b/lisp/my-flycheck.el
new file mode 100644 (file)
index 0000000..d0a1959
--- /dev/null
@@ -0,0 +1,39 @@
+(require 'flycheck)
+
+(global-flycheck-mode 1)
+
+(setq-default flycheck-disabled-checkers '(emacs-lisp-checkdoc))
+
+(setq flycheck-emacs-lisp-load-path 'inherit)
+
+(add-hook 'flycheck-mode-hook #'my/use-eslint-from-node-modules)
+
+(setq flycheck-indication-mode 'right-fringe)
+
+(define-fringe-bitmap 'flycheck-fringe-bitmap-double-arrow
+  (vector #b00000000
+          #b00000000
+          #b00000000
+          #b00000000
+          #b00000000
+          #b00011001
+          #b00110110
+          #b01101100
+          #b11011000
+          #b01101100
+          #b00110110
+          #b00011001
+          #b00000000
+          #b00000000
+          #b00000000
+          #b00000000
+          #b00000000))
+
+(defun my/use-eslint-from-node-modules ()
+  (let* ((root (locate-dominating-file
+                (or (buffer-file-name) default-directory)
+                "node_modules"))
+         (eslint (and root
+                      (expand-file-name "node_modules/.bin/eslint" root))))
+    (when (and eslint (file-executable-p eslint))
+      (setq-local flycheck-javascript-eslint-executable eslint))))
index a38657f4e5bfbebb7d2deefc0ae52bc6afc7db7b..7f3c63d2e1f2a6cb177813e5c6f3c18700515892 100644 (file)
 
 (require 'flyspell)
 
-(require 'flycheck)
-(global-flycheck-mode 1)
-(setq-default flycheck-disabled-checkers '(emacs-lisp-checkdoc))
-(setq flycheck-emacs-lisp-load-path 'inherit)
-(add-hook 'flycheck-mode-hook #'my/use-eslint-from-node-modules)
-
 (require 'misc)
 
 (require 'multiple-cursors)