5

I wrote a Flycheck frontend for LDC. It installs into Emacs fine, and I remember to require it, but for some reason, it doesn't automatically enable itself when I open a file in d-mode. What did I miss?

Edit: As per request, here are the relevant parts of my init file:

;;D
(autoload 'd-mode "d-mode" "Major mode for editing D code." t)
(add-to-list 'auto-mode-alist '("\\.d[i]?\\'" . d-mode))

;;Flycheck
(require 'flycheck-ldc)
(add-hook 'after-init-hook #'global-flycheck-mode)
(setq-default flycheck-disabled-checkers '(c/c++-clang))

Edit 2: As per request, here is the result of C-c ! v in a d-mode buffer:

Syntax checkers for buffer logic.d in d-mode:

  d-dmd
    - predicate:  nil
    - executable: Not found

Flycheck Mode is enabled.

The following syntax checkers are not registered:

  - d-ldc

 Try adding these syntax checkers to `flycheck-checkers'.
Koz Ross
  • 425
  • 3
  • 13
  • That's impossible to say with as little information as you have given. Please edit your question and add the relevant parts of your init file. Specifically, show your D-Mode and Flycheck setup. –  Apr 24 '15 at 09:18
  • I have some foggy memory that flycheck keeps a list of major modes where it should be enabled. Don't remember what the variable name. You would probably find it if you looked into its sources. – wvxvw Apr 24 '15 at 12:34
  • Do you actually turn flycheck on in your d-mode buffers? For instance, automatically with (add-hook 'd-mode-hook 'flycheck-mode) – deprecated Apr 27 '15 at 04:42
  • I just noticed that you enable global-flycheck-mode, so my suggestion in the previous comment should not be necessary. – deprecated Apr 27 '15 at 13:36
  • What does the function flycheck-possibly-suitable-checkers return when run in your D buffer?
  • Is flycheck-mode t in your D buffer?
  • What does flycheck-may-enable-mode return in your D buffer?
  • Why not add d-dmd to flycheck-disabled-checkers?
  • – Erik Hetzner Apr 29 '15 at 17:22
  • 1
    Please type C-c ! v in a D Mode buffer, and add the contents of the buffer which pops up to your question. Feel free to use a screenshot if that's convenient for you. –  Apr 29 '15 at 19:22
  • @lunaryorn Added per your request. – Koz Ross May 04 '15 at 05:47