lsp 2025-04-05

how do i get :paths-ignore-regex to work? i have {:paths-ignore-regex ["test/__optic__/.*"]} as the contents of .lsp/config.edn, and when i run clojure-lsp diagnostics, it shows me errors in a file in test/__optic__/noahtheduke/...

$ cat .lsp/config.edn
{:paths-ignore-regex ["test/__optic__/.*"]}
noah@Noahs-MacBook-Pro ~/personal/fluent-clj  [main ≡ +4 ~4 -0 !]
$ clojure-lsp diagnostics
[ 99%] Project analyzed            Finding diagnostics...
test/__optic__/noahtheduke/fluent/pprint_test/pprint_str.clj:3:3: error: [unresolved-symbol] Unresolved symbol: parse-and-print-str 

did some more digging and looked at :paths-ignore-regex too. The path at time of matching regex is an absolute path, so you do need to start your regex expression with .* for example. {:paths-ignore-regex [".*test/__optic__/.*"]}

How much RAM is clojure-lsp using on your machines typically when you look at your Activity Monitor or the equivalent thing on linux?

On my system (arch linux):

Private  +   Shared  =  RAM used	Program

925.0 MiB +   1.6 MiB = 926.5 MiB	clojure-lsp
---------------------------------
                        926.5 MiB
=================================

👍 1

2.9 GiB thisisfine

(in above, note that this does not include virt memory, as if you count that, it's 32GB, but virt memory includes things like shared libraries, or mmaped files - but I don't tend to count virt memory, just rss (resident set size - the actual memory that is actually loaded into ram and currently being used)).

macOS:

Real Memory Size: 539.1 MB

Virtual Memory Size: 423.88 GB

Shared Memory Size: 9.5 MB

Private Memory Size: 488.1 MB

Tiny side project I'm in right now, one Clojure file: 359 MB. Work project: 847 MB.

LSP was using several gigabytes on the last data science project I did. I assume there is a lot of variation depending on the project being analysed.

Typically 6gb for me

work project, 30k+ loc Between 2-2.5 GB usually (mac)

yes it vary depending on the size of the project, especially because of clj-kondo analysis we keep in memory, in Nubank I did tests that vary from 300mb to 2-3 GB. mem improvements suggestions/PRs are always welcome as that is not trivial to improve

Other side question. How much memory do y'all have in your laptops

I have 5 clojure-lsp:s running (taking a total of ~3,2gb)… 32gb M1 pro mac, not worried about the memory usage

16gb asus zenbook

fwiw, docker images I run for databases and other auxiliary stuff to support the clojure apps, takes way more memory

1

between 0.5 and 1 gb

After opening our main project at work, 3.3GB.