Setup Neovim for Kotlin Development

  Рет қаралды 7,836

Andrew Courter

Andrew Courter

Күн бұрын

Пікірлер: 56
@ascourter
@ascourter 7 ай бұрын
Do you use Neovim for Kotlin Development? What works well / not so well?
@AngelAVasilev
@AngelAVasilev 4 ай бұрын
I am trying to use it, but "Go to definition" and "Go to reference" don't work for some reason, but I am pretty new to Neovim, so I guess I have mangled it somehow :D
@xdzzz0
@xdzzz0 2 ай бұрын
I would _really_ love to use neovim for Kotlin development since my company is a full Kotlin shop (transitioned from Java). However, performance is the issue. The project I work on is multi-module & has so many deps that it might be so big that the language server _literally_ cannot run on it 😥The CPU usage skyrockets & when you quit neovim the server does not shut down - it stays running in the background. The startup time & indexing mechanisms needs to be improved (caching) & incremental compiling needs to be implemented. Maybe I'm doing something wrong (I compiled kotlin-language-server from source in Java 17 🤷). But my neovim lspconfig is very vanilla - just like your example - just pulling it in like the rest with no extra setup (I've tried explicitly defining storagePath too). I've tested on a brand new empty project like this video - it runs fine.
@ascourter
@ascourter 2 ай бұрын
@@xdzzz0 unfortunately I've heard this a couple times with large multi module projects and having performance problems 😔
@thetruth2488
@thetruth2488 7 ай бұрын
Awesome stuff! As a mainly Java Developer i cant wait for the Java episode
@alzonpepito2813
@alzonpepito2813 2 ай бұрын
That is actually pretty nice. I hate needing to restart my PC because Android Studio is eating my memory away and crashing. The only issue is that this is still really slow, but, nonetheless, you gave me a great place to start. Thanks a lot for the video!!
@daffarandika3148
@daffarandika3148 2 ай бұрын
it worked flawlessly! love you mate
@s1nistr433
@s1nistr433 5 күн бұрын
You can escape paying the IRS easier than it is to escape having to use Jetbrains IDE/Android Studio for kotlin development
@ascourter
@ascourter 5 күн бұрын
LOL
@Lars-ce4rd
@Lars-ce4rd 5 ай бұрын
let us know if you get testing or debugging working too :D
@lintaoamons5712
@lintaoamons5712 7 ай бұрын
Damn, I work with kotlin as well, this title just bring me in. I will be very happy even if I will still use IDEA, but could use neovim just for browser the codebase
@rkdeshdeepak4131
@rkdeshdeepak4131 7 ай бұрын
Can this be setup for android projects? What steps would be different?
@ascourter
@ascourter 7 ай бұрын
Great question. I believe the setup would be the same but there are many visual aspects that you wouldn't get like the emulators, seeing renders of the UI code you work on in real time, etc. I would imagine the language server would work alright but there would be some parts that only android studio could provide at this point.
@Kmg403
@Kmg403 Ай бұрын
@@ascourter you can use Android Studio to create an emulator and then run it and connect to it, install your app, etc. without running Android Studio. But, you still don't get UI previews, of course.
@LorenzoBettini
@LorenzoBettini 7 ай бұрын
Thanks for the nice video! I look forward to the Java one.
@cody_codes_youtube
@cody_codes_youtube 7 ай бұрын
NEOVIM GOODIES! First comment
@ascourter
@ascourter 7 ай бұрын
You're so fast!
@cody_codes_youtube
@cody_codes_youtube 7 ай бұрын
@@ascourter YOURE MY BOY, BLUE!
@dorianvedel1910
@dorianvedel1910 7 ай бұрын
Less than 1 minute. You're so fast #thatswhatshesaid.
@cody_codes_youtube
@cody_codes_youtube 7 ай бұрын
@@dorianvedel1910 FAST OR EFFICIENT?? I choose the latter
@morpheus4564
@morpheus4564 6 ай бұрын
will be nice if is possible start kotlin spring boot app eg. to run it inside vim
@ascourter
@ascourter 6 ай бұрын
You could run it via the terminal in Neovim or even have a user or auto command kick off
@casadogaspar
@casadogaspar 7 ай бұрын
Can we have one for swift?
@ascourter
@ascourter 7 ай бұрын
I will definitely put this on my list. In all honesty I have not done Swift development so I'll need to do some research on that topic first.
@casadogaspar
@casadogaspar 7 ай бұрын
@@ascourter Would be much appreciated 🍻
@lorenzobats6369
@lorenzobats6369 7 ай бұрын
a video on Java in Neovim would be great. IntelliJ has many java specific features that I dont want to miss out on in Neovim
@lengors7327
@lengors7327 7 ай бұрын
I very much doubt we will ever get a good LSP for Kotlin, unless some other big company heavily invests on the language. And honestly, the only company possibly ever doing that imo is Google themselves (Microsoft already has c# and typescript and Apple only wants proprietary shit). Its essentially against jetbrains interests to release (even if paid for) an LSP for Kotlin
@ascourter
@ascourter 7 ай бұрын
Yep. I wish this wasn't the case but it's the truth.
@klevisimeri607
@klevisimeri607 23 күн бұрын
Thank you, very nice video!
@SB-gc8wf
@SB-gc8wf 7 ай бұрын
Hey Andrew, thanks for your dive into this topic. I am also mainly developing Kotlin in the backend. Did you find any meaningful way to work with gradle build files (build.gradle.kts, settings.gradle.kts,...)? You did mention that you used gradle with the grooy DSL. I was wondering how good this might work with the Kotlin DSL?
@ascourter
@ascourter 7 ай бұрын
Great question. In this current setup I don't get autocompletion inside Groovy or Kotlin gradle files. I intend to dig into this further with the Java setup and see if configuring jdtls adds this capability. If you find anything useful then let me know!
@FeinesFabi
@FeinesFabi 5 ай бұрын
Goto References (gr) doesn't work for me while gd does. It feels like it's trying to rename the current character after pressing r.
@ascourter
@ascourter 5 ай бұрын
Oh interesting. Take a look at :Telescope keymaps and see what you have gr and gd mapped to. You can also search for "Go to definition" and see if that is mapped. Double check that your LSP is attached to the buffer using :LspInfo.
@Skaiiur
@Skaiiur 6 ай бұрын
JAVA !!!
@sunnyheheheh9401
@sunnyheheheh9401 7 ай бұрын
please one for java
@vikingthedude
@vikingthedude 7 ай бұрын
Thanks a lot! I'm totally looking forward to a video on Java. Personally I'm curious to know if the java LSP can process Lombok annotations so that it could give us intellisense on methods that Lombok generates (getters/setters/builder pattern etc)
@ascourter
@ascourter 7 ай бұрын
I have seen this setup using COC.nvim but want to check this will work with built in LSP because so many people use Lombok.
@MichaelSt
@MichaelSt 7 ай бұрын
Thanks for the vid. The LSP vs Language server at 1:02 is confusing, It implies that LSP and a language server are different things, when in fact they are the same.
@ascourter
@ascourter 7 ай бұрын
Apologies for the confusion. Should have said "LSP Client"
@daltonyon
@daltonyon 4 ай бұрын
You explain very well, I will try to install to explorer more kotlin, thank very much!!!
@ascourter
@ascourter 4 ай бұрын
Thank you!
@morpheus4564
@morpheus4564 6 ай бұрын
I need your dotfiles looks nice your setup. also tmux etc
@ascourter
@ascourter 6 ай бұрын
Thanks! Here are links to each: github.com/exosyphon/nvim github.com/exosyphon/dotfiles
@korigamik
@korigamik 7 ай бұрын
What’s ur tmux conf?
@ascourter
@ascourter 7 ай бұрын
I really need to make an updated video on my config. Here is a link to my conf though: github.com/exosyphon/dotfiles/blob/main/.tmux.conf
5 ай бұрын
Thanks for this amazing video! Is there a way to contextually run the tests inside Nvim? 🤔
@ascourter
@ascourter 5 ай бұрын
I have another video I need to record to show this but I use neotest and added Gradle to it and got it working
5 ай бұрын
​@@ascourter Great! I'm gonna try neotest-gradle, let's see if it works! Thank you for the fast response!
@tyrisnolam
@tyrisnolam 5 ай бұрын
awesome, thank you very much! There has been some changes to Kickstart since the recording of the video. I found your neovim config, but I can't see your version of the Kickstart Neovim config. Is it there somewhere? If not, are you planning to publish it?
@ascourter
@ascourter 5 ай бұрын
I don't have it published yet. I'll do that this week and reply with the link.
@ascourter
@ascourter 5 ай бұрын
Here is a link to the config repo: github.com/exosyphon/KickstartNvim/tree/kotlin-config
@tyrisnolam
@tyrisnolam 5 ай бұрын
@@ascourter thank you so much!
@mars_0008
@mars_0008 7 ай бұрын
Great video, do you have any experience of using neovim on larger kotlin projects that use dependency injection (koin) and ktor?
@ascourter
@ascourter 7 ай бұрын
I'm using it for work today with Ktor. I just made the switch so I'll have to get back to you after some time on experience.
@mars_0008
@mars_0008 7 ай бұрын
@@ascourter yes I am trying to make the switch too, I found the nvim debugger crashed when jumping between functions. Would be really grateful if you could share whether you successfully got the project set up without errors (I am going to have a go at it tomorrow!).
@ascourter
@ascourter 7 ай бұрын
@@mars_0008 I haven't configured the debugger yet. On my short list though
Configure Neovim for Java Development
15:11
Andrew Courter
Рет қаралды 20 М.
My Neovim Dev Workflow
41:37
Lazar Nikolov
Рет қаралды 32 М.
The Joker wanted to stand at the front, but unexpectedly was beaten up by Officer Rabbit
00:12
iPhone or Chocolate??
00:16
Hungry FAM
Рет қаралды 39 МЛН
My Neovim configuration in 2024
20:48
Andrew Courter
Рет қаралды 7 М.
Being Competent With Coding Is More Fun
11:13
TheVimeagen
Рет қаралды 81 М.
Fabric: The Best AI Prompts for Obsidian
11:02
Different AI
Рет қаралды 1,8 М.
Lazygit - The Best Way To Use Git On The Terminal & Neovim
11:47
Josean Martinez
Рет қаралды 59 М.
Why Rust is NOT a Passing Fad...
8:54
Travis Media
Рет қаралды 37 М.
Как быстро освоить Vim / Neovim?
23:31
PurpleSchool | Anton Larichev
Рет қаралды 58 М.
My Initial Impresson Of Go
12:39
TheVimeagen
Рет қаралды 91 М.
NeoVim - лучший редактор кода
12:32
Чёрный Треугольник
Рет қаралды 191 М.
The perfect Neovim setup for C++
17:45
Dreams of Code
Рет қаралды 183 М.
Autocomplete and Snippets in Neovim | FREE COURSE // EP 5
17:07
The Joker wanted to stand at the front, but unexpectedly was beaten up by Officer Rabbit
00:12