Skip to content

Neovim setup generated sources #601

@auryn31

Description

@auryn31

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

Activity

AlexandrosAlexiou

AlexandrosAlexiou commented on Nov 25, 2024

@AlexandrosAlexiou
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

AlexandrosAlexiou commented on Nov 25, 2024

@AlexandrosAlexiou
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

ikezedev commented on Nov 28, 2024

@ikezedev

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

auryn31 commented on Nov 29, 2024

@auryn31
Author

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @auryn31@AlexandrosAlexiou@ikezedev

      Issue actions

        Neovim setup generated sources · Issue #601 · fwcd/kotlin-language-server