Fork me on GitHub

How do Calva/clj-kondo/clojure-lsp work out which files to lint? From my experiments, for my deps.edn project, it seems as though it looks at the directories specified within :paths but not any of those specified within :extra-paths? Do I understand that correctly? Why am I looking at this? I’m working on a Clojurescript application built with Figwheel Main. I have to put the generated target directory on the classpath so that it can be served to the browser, but if I do so by adding it to :paths, I get literally thousands of warnings in Calva for those generated files. If I add it to :extra-paths then I don’t?


@paulbutcher This is a clojure-lsp setting.


So you want to exclude files right?


Right now, I just want to understand what is and what is not included by default. But yes, ultimately I want to stop it from linting generated files.


Is there any documentation which describes how project files are treated for linting?


you can check the settings here:


Ah cool - exactly what I was looking for - thanks! I haven’t yet entirely grokked the relationship between clj-kondo and clojure-lsp and for some reason I was hunting for this in the clj-kondo documentation and didn’t think to look in clojure-lsp (blush).


they are very much related. clj-kondo does the analysis of the clojure code and then passes that information to clojure-lsp, so clojure-lsp can provide features based on that


I think that what you want to do is set ignore-classpath-directories to true in the Clojure LSP settings.


So I’m reading that documentation right now and I admit I’m not entirely sure I understand the relationship between :source-aliases and :ignore-classpath-directories? As I understand it :paths and :extra-paths add directories to the classpath? So if I set :ignore-classpath-directories which directories will clojure-lsp lint?


I’ve been doing some experiments, and I’m definitely confused. :ignore-classpath-directories seems to have no effect at all that I can see (I’m still getting warnings from the generated code when it’s set to true, and clojure-lsp is still parsing everything that’s in :paths). Can someone help me understand what it actually does?


I really thought it would do the trick. Maybe you have better luck asking in #lsp.


I definitely don’t have an accurate mental model of what’s going on here. I will see if I can get some clarity in #lsp Thanks!


Dear Calva friends: Here’s a VSIX for you to test. It adds babashka and nbb jack-in support. I haven’t tested on Windows yet and suspect problems there of course. But who knows, maybe it will just work?

Bob B20:10:05

at a superficial level (a toy project with some basic scripts), the bb repl appears to work on Windows (for me)

🙏 1