all repos — nixfiles @ 583bb272fe7002fe3a21f4ce2b5a2025e855e269

System and user configuration, managed by nix and home-manager

Emacs: setup flycheck like flymake and prefer it in lsp-ui
Alan Pearce alan@alanpearce.eu
Tue, 08 Oct 2019 16:34:10 +0200
commit

583bb272fe7002fe3a21f4ce2b5a2025e855e269

parent

c94b5ae2244f87d051d55fcfbdbfa48e0a3659f6

2 files changed, 25 insertions(+), 5 deletions(-)

jump to
M user/emacs/.emacs.d/init.eluser/emacs/.emacs.d/init.el
@@ -707,9 +707,30 @@ "XXX.....") (use-package flymake
   :custom ((flymake-error-bitmap '(left-vertical-bar compilation-error))
            (flymake-warning-bitmap '(left-vertical-bar compilation-warning))))
-(use-package flymake-diagnostic-at-point
-  :custom ((flymake-diagnostic-at-point-diagnostic-function #'flymake-diagnostic-at-point-display-minibuffer))
-  :ghook '(flymake-mode-hook))
+(use-package flycheck
+  :custom ((flycheck-highlighting-mode 'sexps))
+  :config (progn
+            (flycheck-define-error-level 'error
+              :severity 100
+              :compilation-level 2
+              :overlay-category 'flycheck-error-overlay
+              :fringe-bitmap 'left-vertical-bar
+              :fringe-face 'flycheck-fringe-error
+              :error-list-face 'flycheck-error-list-error)
+            (flycheck-define-error-level 'warning
+              :severity 10
+              :compilation-level 1
+              :overlay-category 'flycheck-warning-overlay
+              :fringe-bitmap 'left-vertical-bar
+              :fringe-face 'flycheck-fringe-warning
+              :warning-list-face 'flycheck-error-list-warning)
+            (flycheck-define-error-level 'info
+              :severity -10
+              :compilation-level 0
+              :overlay-category 'flycheck-info-overlay
+              :fringe-bitmap 'left-vertical-bar
+              :fringe-face 'flycheck-fringe-info
+              :info-list-face 'flycheck-error-list-info)))
 
 (use-package lsp-mode
   :ghook ('(typescript-mode-hook
@@ -725,7 +746,7 @@ :functions (lsp--flymake-setup)   :gfhook 'lsp--flymake-setup
   :custom ((lsp-auto-guess-root t)
            (lsp-auto-configure nil)
-           (lsp-prefer-flymake t)
+           (lsp-prefer-flymake nil)
            (lsp-enable-symbol-highlighting nil))
   :config (progn
             (add-to-list 'lsp-language-id-configuration '(js-mode . "javascript"))))
M user/settings/emacs.nixuser/settings/emacs.nix
@@ -80,7 +80,6 @@ eyebrowse       feature-mode
       fish-completion
       flycheck
-      flymake-diagnostic-at-point
       general
       git-gutter-fringe
       git-messenger