Fork me on GitHub

After using clj-kondo with ALE for some time (integrated with vim-iced, which is amazing), I tried to use it directly with COC following the instructions in . It works just fine, except auto refresh doesn’t really work anymore as it did with Ale. Refresh only happens after save, regardless of my settings in COC config. Is it just me or does anyone else experience this issue? Other linters work with COC and auto refresh. I’m fine going back to ALE, just wondered if I can let COC handle the linting instead.


I migrated from ALE to COC long ago. COC works great for me. The clj-kondo linting does automatically update as I edit the file, without needing to save.


Sounds like the issue might be in my Neovim config then. I tried disabling all my other plugins, but it still doesn’t work. Did you use the exact configuration for COC (with the diagnostic extension) I linked above or something else?


No, I don't actually use clj-kondo directly. It comes bundled with clojure-lsp which I do use.


Here is my COC config, in case it's helpful: There is very little config for clojure-lsp

👍 1

Thanks for sharing! I couldn’t find the issue yet, but maybe the integration works differently with clojure-lsp vs clj-kondo. I only started recently working in Clojure and never tried clojure-lsp, but I may give it a try. Would you recommend it over something like vim-iced, Cider, Cursive, etc.? I wonder if I can use it together with vim-iced or if they would interfere with each other.


clojure-lsp is in a different category from those other things. It's a language server, so any text editor with LSP client support (including Neovim with COC) can make use of its features, which include linting and code refactoring tools. Clojure-lsp is excellent, I definitely recommend it


Sounds nice. I might just try it now, so at least I know if the problem is with clj-kondo or something else.


Wow - not only did clojure-lsp resolve my auto refresh issue, it also integrates surprisingly well with CoC (your config helped me get started) and vim-iced and I can finally get some features like “jump to definition” or “open ClojureDocs” to work with vim-iced. Love it!


Awesome, I'm happy it's working out!