flycheck

Font-lock and disable js2-mode parsing node shebang line

旧巷老猫 提交于 2021-01-29 14:22:51
问题 How can I treat the a shebang line of the form #! /usr/bin/env node As a comment line, when using js2-mode ? I've tried a couple things, one as a modification of something Stefan proposed on another thread (can't find it now), eg. a modification to the syntax-propertize-rules , (defalias 'my-js2-syntax-propertize-shebang (syntax-propertize-rules ("\\`\\(#\\)!.*/[^ \t\n]+" (1 "!")))) (defun my-js2-hook () (add-function :before (local 'syntax-propertize-rules) #'my-js2-syntax-propertize-shebang

Setting flycheck-clang-include-path in .dir-locals using projectile

孤者浪人 提交于 2021-01-27 19:47:38
问题 Trying to set flycheck-clang-include-path without the need to include the full path of the project include directories using projectile, but I get errors... So this works: ((nil . ( (company-clang-arguments . ( "/home/user/Downloads/project/headers" "/home/user/Downloads/project/source/mon" )) (flycheck-clang-include-path . ( "/home/user/Downloads/project/headers" "/home/user/Downloads/project/source/mon" )) ))) But this does not: ((nil . ( (company-clang-arguments . ( (concat "-I"

Display Flycheck buffer (with errors) when saving

雨燕双飞 提交于 2019-12-12 18:12:05
问题 In Emacs, what would be the way to display the Flycheck buffer automatically when saving, only if there are errors? A bit like https://github.com/steelbrain/linter. I've searched on https://stackoverflow.com/questions/tagged/flycheck?sort=votes&pageSize=50 but did not find anything approaching. 回答1: Add the following to ~/.emacs , this will bind it to C-x C-s : (defun save-buffer-maybe-show-errors () "Save buffer and show errors if any." (interactive) (save-buffer) (when (not flycheck-current

How to install flycheck in spacemacs?

南笙酒味 提交于 2019-12-08 07:59:47
问题 I am attempting to use flycheck with my spacemacs setup. The spacemacs documentation, under "12.4.0.6 Minor Modes" lists flycheck as a mode which can be toggled with SPC t s . However, no such option is present in my spacemacs setup. Pressing SPC t raises a set of options that does not include s . And, if I press SPC t s anyway, I get the message SPC t s is undefined . How can I install flycheck to use with spacemacs? 回答1: Flycheck is provided as part of the syntax-checking layer. You need to