Fork me on GitHub
#lsp
<
2024-04-15
>
andrea.crotti09:04:49

does anyone else have the issues with too many open files on mac, which is possibly caused also by LSP (opening big projects)? M-x file-notify-rm-all-watches solves it for a bit but then it happens a gain, would like a more permanent solution ideally

borkdude09:04:13

I have this in my .el stuff:

lsp-enable-file-watchers nil
      lsp-file-watch-threshold 10000

borkdude09:04:29

they might not make sense in combination, but that's what I have ;)

andrea.crotti09:04:05

ah right so you just disabled it then though

andrea.crotti09:04:18

I guess I can do the same

andrea.crotti09:04:39

not entirely sure what does that affect

dpsutton14:04:17

lsp watches all files by default. if you have a js portion of your project, this means it will watch a ton of temporary files and compiled output. Currently there’s no way to specify the folders you want it to watch, you have to enumerate the ones you want it to not watch

dpsutton14:04:27

(although it’s been a while since i’ve looked into it)

seancorfield16:04:30

It's been years since I used a Mac but I used to run into the default file open limit on all sorts of things so I used to set ulimit to unlimited. I don't remember the command or config for that any more but if you search for too many open files ulimit I expect you can find it...

aisamu01:04:50

Since you use emacs, you might be interested in https://emacs-lsp.github.io/lsp-mode/page/faq/#how-do-i-force-lsp-mode-to-forget-the-workspace-folders-for-multi-root-servers-so-the-workspace-folders-are-added-on-demand (to make lsp lazily load workspaces and hence file-watches). Adding ignores to compiled output also helps (I have it set for .projen, cdk.out , .next, .husky, etc)

lassemaatta11:04:41

Does clojure-lsp support find references http://et.al. when you refer to a var with a quoted qualified symbol?

ericdallo11:04:28

Definition should be supported, references I guess, needs to test

lassemaatta11:04:40

but when I try something like

(def foo "hello")

(def bar 'the.current.namespace/foo)
I can a) navigate from the symbol to foo but b) lens reports "0 references"

ericdallo11:04:59

it's possible to support, but probably needs some tweak

lassemaatta11:04:52

right, ok. I can make a ticket if it helps 🙂 motivation: we have a bunch of datastructures with symbols (e.g. (def operations {"some name" 'some.namespace/a-function ...}) + requiring-resolve) and unfortunately clojure-lsp flags the referred vars with "unused public var", which is sometimes unfortunate as you might accidentally think it's safe to remove such var.

ericdallo11:04:06

Hum, my biggest concern is flag it as used wrongly

ericdallo11:04:18

But I can see how convenient it is most of the time

ericdallo11:04:24

Please open a issue

ericdallo11:04:15

yes, thanks!

👍 1