Code base navigation without LSP

I sometimes like to take a quick glance at various Java/Kotlin projects I have. Due to their reliance on JVM & gradle, their respective LSP’s language server takes a considerable amount of time to load symbols/indexing, which makes tasks like goto definition an expensive task.

You could look into ctags/cscope (assuming it works for Kotlin, I don’t know). There is this plugin that I just saw quickly. I used to have my own functions back before the init.lua days I think. There’s also a thread on reddit about Kotlin development in NeoVim.

Thanks. Apparently, cscope is the only viable option now. Kotlin language server isn’t all that greater outside of Jetbrains’ products, and it’s equally resource-hungry if I were to ever navigation through multiple codebases

Turns out I still have one script, which I think was my hacky way to avoid using a plugin for this. It just refreshes the tags database based on some hash heuristics, but it’s pretty dumb and you have to manualy update the cscope.files listing to tell it which files to hash. Probably gets annoying for large codebases but maybe you will find it useful: ~adigitoleo/dotconf (master): .local/bin/scope - sourcehut git

1 Like