borkdude / flycheck-clj-kondo

Emacs integration for clj-kondo via flycheck
94 stars 17 forks source link

Unable to see flycheck errors, flycheck-mode cannot be enabled #24

Closed LiGoldragon closed 8 months ago

LiGoldragon commented 8 months ago

On NixOS (bleeding edge), unable to get any output on flycheck mode, list-errors complains mode is disabled despite being manually enabled. The only deviation from running clj-kondo from cli is that emacs has one error less, and exits with Compilation exited abnormally with code 2 [...]. The verify-setup seems happy. Flycheck works fine with nix. I lack information to chase this bug. Any pointers would be welcome. Thank you for making this package :pray:

borkdude commented 8 months ago

What do you get with flycheck-compile?

LiGoldragon commented 8 months ago
Syntax checkers for buffer main.clj in clojure-mode:

First checker to run:

  clj-kondo-clj
    - may enable: yes
    - may run:    t
    - executable: Found at /home/li/.nix-profile/bin/clj-kondo

Checkers that are compatible with this mode, but will not run until properly configured:

  clj-kondo-edn
    - may enable: yes
    - may run:    nil
    - executable: Found at /home/li/.nix-profile/bin/clj-kondo

Flycheck Mode is disabled.  Use C-u M-x flycheck-disable-checker to
enable disabled checkers.

--------------------

Flycheck version: 33snapshot (package: 20230813.620)
Emacs version:    29.1
System:           x86_64-pc-linux-gnu
Window system:    pgtk
borkdude commented 8 months ago

Can you follow up on this hint?

Flycheck Mode is disabled. Use C-u M-x flycheck-disable-checker to enable disabled checkers.

LiGoldragon commented 8 months ago

I should have said that the value of flycheck-disabled-checkers is nil. After switching to clojure-ts-mode, it ended up being fixed, perhaps because of :ensure t or and/or because it had a double use-package entry. Sorry I couldnt hunt the bug better. Thank you so much :pray:

Fixing commit

LiGoldragon commented 8 months ago

Actually, the double-entry is one of the requirements for it to work, although my problem has changed (verify now fails from lacking an entry in flycheck-checkers I believe.) I added a TODO for later investigation. Moving on for now. Thanks Hacky commit