Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Neovim setup generated sources #601

Closed
auryn31 opened this issue Nov 8, 2024 · 4 comments · May be fixed by #629
Closed

Neovim setup generated sources #601

auryn31 opened this issue Nov 8, 2024 · 4 comments · May be fixed by #629

Comments

@auryn31
Copy link

auryn31 commented Nov 8, 2024

Hey their,

thank you a lot for your work!!
I am using the kotlin language server and love to use neovim for further coding. But somehow the language server does not detect generated java files from openapi
It works just fine in intellij, so the linking in maven seems correct. But somehow the language server cannot resolve the java file/package.
It just doesnt find it.
The java files are located in
target/generated-sources/src/java
Is it possible to recognize these?

Thank you for your support

@AlexandrosAlexiou
Copy link
Contributor

I would like this feature as well, can we maybe have some pointers on how to implement this?
I would be available to create an MR, but I need some info to understand where to start from.

Pinging @fwcd, in case you have some time to give some pointers it would be great!
Thanks for you work!

@AlexandrosAlexiou
Copy link
Contributor

@auryn31 I took a look and seems it was easier that I thought.

I opened a pull request in a fork of this project that seems to be more active than this one here

@ikezedev
Copy link

The LSP ignores everything listed here https://github.com/kotlin-community-tools/kotlin-language-server/blob/main/shared/src/main/kotlin/org/javacs/kt/SourceExclusions.kt#L16-L20.

To work around this, set this in gradle.properties

buildDir=build_dir #sth else that is not ignore and make sure to add it to .gitignore

Rebuild and restart the lsp/extension host for the changes to be picked up

@auryn31
Copy link
Author

auryn31 commented Nov 29, 2024

Nice, thank you a lot. Will give it a try and see if i get it running :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants