lsp

Chase 2025-02-04T19:12:56.756749Z

I'm working in a repo that uses Polylith and having an issue. I'm using Neovim w/ Conjure and using :LspInfo to gather this information and have recreated the issue using Sean Corfield's usermanager polylith example repo/branch. If I open a file in the root directory first, the LSP will keep that as my root directory forever, even if I go to a component with it's own deps.edn , etc. This is the expected behavior and what I need. But if I open up a component file first, the LSP then sets that as the root, causing all kinds of chaos (clj-kondo lint warnings and errors all over the place, etc.) Is there a way to make sure the root directory will always be the root directory and never change to the components in a polylith project?

mitchelkuijpers 2025-02-04T19:14:52.477399Z

I Neovim you can change the configuration on how it should find the root. For your case it might be good to force it to find a .git folder to find the root of your repository

1
☝️ 2
ericdallo 2025-02-04T19:15:22.511729Z

This is a client responsibility (nvim in this case)

mitchelkuijpers 2025-02-04T19:15:47.358419Z

What config do you have?

Chase 2025-02-04T19:26:05.822669Z

I recently switched to the built in lsp (with mason I think?? lol). Anyways, I did as you advised and it seems to have it all sorted out, thank you!

mitchelkuijpers 2025-02-04T19:50:10.328199Z

Nice!