kotlin-language-server icon indicating copy to clipboard operation
kotlin-language-server copied to clipboard

Can pick wrong ClassPathResolver

Open halfninja opened this issue 2 years ago • 1 comments

I've got a Gradle project whose build plan is defined by Bamboo Specs, which means there is a file called bamboo-specs/pom.xml in the project. This causes the server to use the MavenClassPathResolver, which is no good for building the actual app. If I rename pom.xml and restart the language server it picks the Gradle resolver and things work fine.

I'm not sure what the best way is to get around this - maybe rather than picking the first one, collect them all and prioritise based on which is highest up in the directory structure?

halfninja avatar Apr 12 '23 15:04 halfninja

Hm yeah, this is a tricky one. Haskell's language server solves this by letting the user place an hie.yaml in the project root to specify the preferred build tool, perhaps we could do something similar (e.g. kls.yaml, kotlin-language-server.yaml or similar)?

fwcd avatar Apr 14 '23 16:04 fwcd