opensourceprojects.dev

A broadsheet for software that doesn't ask for your email

Java development in Neovim with Spring Boot, debugging, and tests built in
GitHub RepoImpressions4

Project Description

View on GitHub

Java Development in Neovim Without the Usual Pain

If you've ever tried to set up Java development in Neovim, you know the drill. You spend an afternoon wrestling with jdtls configuration, another hour figuring out how to get debugging working, and by the time you're done, you've forgotten what you actually wanted to build. nvim-java aims to fix that. It's a plugin that bundles together everything you need for Java development in Neovim, and according to its README, you can "just install and start writing public static void main(String[] args)."

What It Does

nvim-java is a Neovim plugin that provides a complete Java development environment. It handles the integration between Neovim and the Java ecosystem, including Spring Boot tooling, language server support through jdtls, debugging via nvim-dap, and test running. The plugin is written in Lua and works across Linux, Windows, and macOS.

Under the hood, it manages the connection between Neovim and Eclipse's JDT language server, which powers features like diagnostics, auto-completion, and code actions. It also integrates with Spring Boot Tools for framework-specific support. The plugin requires Neovim 0.11.5 or later and handles the configuration of these tools so you don't have to wire them together yourself.

Why It's Cool

  • Spring Boot support out of the box. If you're working with Spring, you know how much tooling exists specifically for that framework. nvim-java includes Spring Boot Tools integration, which means you get framework-aware completions and diagnostics without additional setup.

  • Debugging that configures itself. The README notes that DAP (Debug Adapter Protocol) is autoconfigured on startup. For anyone who's spent time manually setting up debug configurations in Neovim, this is a welcome change. There's also a JavaDapConfig command if you need to force reconfiguration.

  • A built-in application runner with a log viewer. This is one of those features you don't realize you want until you have it. You can run your main class with JavaRunnerRunMain, pass arguments, stop it with JavaRunnerStopMain, and toggle a log window with JavaRunnerToggleLogs. It's a small thing, but it keeps you in the editor instead of switching to a terminal.

  • Test running that's actually convenient. There are commands for running the current test class, the test method under your cursor, or all tests in the workspace. You can also debug any of those. The JavaTestViewLastReport command opens the last test report in a popup, which is a nice touch.

  • Profile management. The JavaProfile command opens a UI for managing profiles, and you can run and debug with different profiles. This matters if you're working on applications that behave differently across environments.

  • Code actions and refactoring. The plugin supports code actions (the README links to a wiki page with tips on running them) and includes refactoring commands like JavaRefactorExtractVariable for extracting variables from selections.

  • Decompiler support. If you've ever wanted to look at what's inside a library you're using, this is useful. The plugin includes decompiler support, so you can navigate into compiled code.

  • Organize imports and formatting. These are the kind of features you expect from an IDE, and they're included here.

How to Try It

The installation is straightforward, especially if you're using lazy.nvim. Here's the minimal setup:

{
  'nvim-java/nvim-java',
  config = function()
    require('java').setup()
    vim.lsp.enable('jdtls')
  end,
}

If you're using vim.pack, the README shows a slightly more involved setup that includes spring-boot.nvim, nui.nvim, and nvim-dap as dependencies:

vim.pack.add({
  {
    src = 'https://github.com/JavaHello/spring-boot.nvim',
    version = '218c0c26c14d99feca778e4d13f5ec3e8b1b60f0',
  },
  'https://github.com/MunifTanjim/nui.nvim',
  'https://github.com/mfussenegger/nvim-dap',

  'https://github.com/nvim-java/nvim-java',
})

require('java').setup()
vim.lsp.enable('jdtls')

The README also mentions a wiki page with tips and tricks, which is worth checking out once you have things running.

You can find the full documentation and command reference at https://github.com/nvim-java/nvim-java.

Final Thoughts

nvim-java is for developers who want to work with Java in Neovim but don't want to spend their time configuring the toolchain. It's particularly well-suited for Spring Boot developers, since that's a first-class concern here. The plugin doesn't try to be everything to everyone—it focuses on making the common tasks (running, debugging, testing) work smoothly. If you've been putting off setting up Java in Neovim because it seemed like too much work, this plugin makes a strong case that it's worth another look.

Back to Projects
Project ID: 9e94d1f1-77cc-441f-852f-b1cbaad744a5Last updated: October 9, 2026 at 07:11 AM