Fork me on GitHub

I have a monorepo with common , app1 and app2 the apps have in their dev profile all the source paths of common, but common has its own project.clj as well. Now if I open a clj file in common it doesn’t consider references in the apps for any var. How should that be configured?


Ideally I think I would like to just have a single lsp for the whole monorepo that adds all the source paths of common and the apps


you can use :source-paths in .lsp/config.edn Not sure about the mono repo but for common you could add "../app1/src", etc


thanks, I’ll try that


It seems to mostly work, still saying 0 refs for some


actually, it worked when I just put a .lsp/config.edn that lists all (common and apps) source paths in there… nice

🎉 2

you could try :source-aliases as well if you have aliases in your root project.clj that consider the source-paths of common


Hi folks. Why is this x 51 showing up in the code action name? All the ’add require` actions started having those numbers after a recent update :thinking_face: (I’m using eglot, if that matters).


it's how many places are already using this require with that alias


Got it. To be honest, I don’t see how this info is useful in this context :thinking_face:


sometimes you can have multiple suggestions for the same alias when your project is using different alias for same namespace, so it's nice to know there are 40 using foo but only 2 using foob for example


Ahhhhh, makes sense. Maybe this number should only be displayed in such situation.


I don't see any harms keeping it too, it's like a fun fact 😂


For me, before understanding it, it was more a like a mysterious fact hahahah


But yeah, no big harm in keeping it in all situations


yeah, but I agree that it'd be more useful only for those cases, not sure how hard would be though to know when it's one of those cases


Ot, if it’s too hard, maybe changing how it’s displayed. Something like ‘51 alias occurrences’


counter point: it’s nice to confirm that lsp is aware of the common alias and is using the same one. Big fan of this

👍 3
Noah Bogart19:06:52

I use this feature all the time. It's really helpful to keep consistent aliases when working in a big codebase

👍 1

yeah, maybe just improve the text would make everyone happy


Possible alternative text.: "(51 usages)"

👍 4

x51 seemed obvious to me and very useful (used: 51) may be more universally understood