2

I have tidy in my setup.

When I run HTML-mode as major mode in html file, I do flycheck-verify-setup and I get tidy as syntax checker. the executable is also found.

When running web-mode as major mode, I do flycheck-verify-setup and I get handlebars as syntax checker, which is not found.

I configured it then as

(setq flycheck-handlebars-executable "c:/Dropbox/Vim/vim74/tidy.exe").

Then it's running, verified with flycheck-verify-setup, but when I made intentionally flaws in my html file, I get no error reporting from flycheck, which is using Tidy.

So I assume I'm mistaken somewhere. But I have really no idea.

Any suggestion?

ReneFroger
  • 3,855
  • 22
  • 63

1 Answers1

6

Undo all that you have done in your question. Specifically unset the executable variable of handlebars again—how did you get the idea that this could possibly work?

Then add the following to your init file instead:

(eval-after-load 'flycheck
   '(flycheck-add-mode 'html-tidy 'web-mode))

That let's you use HTML Tidy for Web Mode. Be warned though that this doesn't work so well for any mixed content, like templates.

  • Thanks for your help, it worked right for me. But in order to learn from it, how did you knew that something as `html-tidy` exists? And how did you know that it would solve my question? – ReneFroger Jun 06 '15 at 22:06
  • 6
    I'm supposed to know. I wrote Flycheck. Besides, there's a comprehensive manual at http://www.flycheck.org –  Jun 06 '15 at 23:14