Configure Neovim for Java Development

preview_player
Показать описание
In this video I go over how to configure Neovim for Java development using KickstartNvim, with nvim-jdtls and nvim-java (spoiler: I couldn't get this one to work for me). I also share my keymaps that you can use to organize imports and extract methods or extract variables.

Join the channel to get access to perks:

Gear:

🎵 Music
Music : Way Home by Tokyo Music Walker
Creative Commons — Attribution 3.0 Unported — CC BY 3.0

⏰ Timestamps
0:00 Intro
1:22 Create example project
4:01 Install / Configure nvim-jdtls
8:21 Configure Lombok
12:34 Install / Configure nvim-java
14:54 Outro

#neovim #coding #java
Рекомендации по теме
Комментарии
Автор

I will update here once I get nvim-java working and what the fix was.

ascourter
Автор

You're a better man than me man. I use vim and I used it for JS and TS but it's always been my dream to also use it with Java, but this seems too hardcore and error prone to me. Maybe one day..

johnr
Автор

I had my java config already working, however it kept using 2 space indents because of format being enabled, thank you for this tutorial very helpful!

timproved
Автор

Awesome video and overview, thank you :)
Til now I used for Java intellij, but I prefer nvim so much
So will switch also for Java now

CodingWithAuryn
Автор

I love Java and Neovim so this is so nice

jagernet
Автор

I didn't go with the one plugin trick, but for setting up the Java LSP and getting the annotations working for Lombok was very helpful, thanks for the guide

jon-keys
Автор

Thank you thank you thank you. My jdtls wasn't working for inbuilt functions when I pressed gd, only user defined functions. It's working now. I'd been stuck on this for a while. Also if anyone else wasted 4 days trying to get their jdtls to not quit with code 13, the solution might be as simple as switching to openjdk21, not that anyone would be foolish enough to miss that for 4 days straight 😅😭

vanshverma
Автор

0:56 could you elaborate on what you mean with "document symbols" and "language definitions"? A few missing features from your list are syntax highlighting, code navigation, code refactoring, formatting and debugging. Perhaps some of these are included in the two features I am asking about?

krige
Автор

I am new to neovim so thanks for showing the keystrokes

coltennabers
Автор

Does it work with project that use mapstruct or metal model generators?

ticler
Автор

3:12 Is treesitter automatically installed with kickstart?

krige
Автор

amazing video, thanks for the content

paulsotelo
Автор

Hey, I have a question, sorry. How do you format Java files using Neovim? Is there any package out there that you're using?

paulsotelo
Автор

Hello, I'm using java 21 with springboot and I did exactly what you show for jdtls, and I get the error of "The blank final field may not have been initialized", where Intellij doesn't give me this error. Do you know something about it?

NicolasRuizX
Автор

i thought it was going to be the first up to date java config for neovim but it ended up not working too

CaptainDouchie
Автор

Couldnt make jdtls recognize lombok. Followed the exact same steps from video but didnt work :/

dougcarneiro
Автор

thanks, you really help fixed some issues.

ivanmoya
Автор

Yeah dude! How long you’ve been doing Java now? You seeing a lot of opportunity in the java space?

cody_codes_youtube
Автор

did you try putting the "require" lines at the bottom of the kickstart config? For me it solved the issue

guglielmobartelloni
Автор

How to turn off the autoformat on save.

amalgjoseph
visit shbcf.ru