---
title: "A Ready-Made Neovim Config for Spring Boot"
canonical: "https://mnafshin.info/devtools/15-ready-made-config/"
author: "Afshin Amini"
date: 2026-11-29
---
# A Ready-Made Neovim Config for Spring Boot

The earlier parts of this series built a Java and Spring Boot setup one piece at a time. This part puts all of it in one place: a Git repository with a Neovim configuration you can clone instead of starting from the plain LazyVim starter. It contains only the plugins and settings the series tested against the companion code, and nothing it did not.

## Built on LazyVim, not a fork of it

LazyVim recommends one way to build your own configuration: start from its starter layout and load LazyVim as a plugin. The repository does exactly that. `lua/config/lazy.lua` bootstraps lazy.nvim and imports `lazyvim.plugins`, then your own files in `lua/plugins/`:

```lua
spec = {
  { "LazyVim/LazyVim", import = "lazyvim.plugins" },
  { import = "plugins" },
},
```

Because LazyVim stays a dependency, its updates arrive with `:Lazy update` like any other plugin. Nothing of LazyVim is copied into the repository.

## What is inside

The configuration is small. Most of it is a list of extras and three plugin files:

```text
nvim-spring-ide/
├── init.lua
├── lazyvim.json            extras: lang.java, dap.core, editor.overseer,
│                           lang.sql, lang.docker, lang.yaml
├── lazy-lock.json          exact plugin versions that were tested
├── lua/config/             LazyVim's options, keymaps, autocmds (defaults)
├── lua/plugins/
│   ├── spring-boot.lua     Spring Boot language server (Part 4)
│   ├── kubernetes-yaml.lua Kubernetes schema for k8s/**/*.yaml (Part 12)
│   └── ide-trainer.lua     loads the :IdeTrainer practice game (Part 16)
├── local-plugins/ide-trainer/  the game itself, plain Lua
└── extras/
    ├── tmux.conf           optional tmux settings (Part 14)
    └── vscode/             launch.json and tasks.json examples (Part 9)
```

[nvim-spring-ide repository](https://github.com/mnafshin/nvim-spring-ide)

Each extra maps to a part of the series: `lang.java` for jdtls, refactoring and tests (Parts 2, 3, 5, 8), `dap.core` for the debugger (Part 7), `editor.overseer` for tasks (Part 9), `lang.sql` for dadbod (Part 11), and `lang.docker` and `lang.yaml` for container and Kubernetes files (Part 12).

## Install it

You need the tools from Part 1: Neovim 0.12 or newer, Git, a C compiler, `tree-sitter-cli`, `curl`, `ripgrep`, `fd`, and a JDK 21 or newer, JDK 25 for the companion code. SDKMAN is an optional way to get the JDK. Then back up your configuration and clone:

```sh
mv ~/.config/nvim{,.bak}
git clone https://github.com/mnafshin/nvim-spring-ide ~/.config/nvim
nvim
```

On the first start lazy.nvim installs the plugins at the versions in `lazy-lock.json`, and Mason installs the external tools. In our test that was twelve packages, among them `jdtls`, `java-debug-adapter`, `java-test`, `vscode-spring-boot-tools`, `yaml-language-server`, `hadolint` and `sqlfluff`. Watch `:Mason` until they are done, restart once, and run `:LazyHealth`.

## Try it without replacing your setup

Neovim reads its configuration from a folder named by the `NVIM_APPNAME` variable, `nvim` by default. Clone the repository under another name and point the variable at it:

```sh
git clone https://github.com/mnafshin/nvim-spring-ide ~/.config/nvim-spring-ide
NVIM_APPNAME=nvim-spring-ide nvim
```

Plugins, Mason tools and caches then live in separate folders, such as `~/.local/share/nvim-spring-ide`, so your own setup is untouched. This is how we tested the repository: a fresh `NVIM_APPNAME`, the companion code opened from its root, and then the checks from the earlier parts, including jdtls, Spring symbols, a conditional breakpoint with evaluate and watches, tests, dadbod and the Kubernetes schema.

## Add the per-project files

Run configurations and tasks belong to a project, not to the editor. Copy the examples into the project and edit the module and class names:

```sh
mkdir -p .vscode
cp ~/.config/nvim/extras/vscode/*.json .vscode/
```

`launch.json` starts the catalog app on port 8081 with a JFR recording (Parts 9 and 10) and attaches to a JVM listening on port 5005 (Part 7). `tasks.json` holds two Maven tasks for overseer. For tmux, copy the lines you want from `extras/tmux.conf` into `~/.tmux.conf`.

## Make it yours

The repository is a starting point, so change it freely:

- Add or remove extras with `:LazyExtras`; the choice is saved in `lazyvim.json`.
- Add plugins as new files in `lua/plugins/`, and options or keymaps in `lua/config/`.
- Change the Kubernetes glob in `kubernetes-yaml.lua` if your manifests live somewhere other than `k8s/`.

Commit your changes to your own fork, so the same editor follows you to every machine.

## Keep it up to date

`:Lazy update` updates plugins, including LazyVim, and rewrites `lazy-lock.json`. Commit the lock file after checking that everything still works; if an update breaks something, `:Lazy restore` goes back to the versions in the committed lock file. `:Mason` lists the external tools, and `U` in that window updates them. LazyVim announces breaking changes in its news, which `:LazyExtras` and the LazyVim website show.

## Recap

- `nvim-spring-ide` is a LazyVim-based configuration with only the extras and plugins this series tested.
- LazyVim is loaded as a plugin, so `:Lazy update` updates it; `lazy-lock.json` pins tested versions.
- Clone it into `~/.config/nvim`, or try it with `NVIM_APPNAME=nvim-spring-ide nvim`.
- Copy `extras/vscode/*.json` into a project for run configurations and Maven tasks.
- Update with `:Lazy update` and `:Mason`, and roll back with `:Lazy restore`.
- `:IdeTrainer` practises the keys of this series inside the companion project (Part 16).

**Series: Neovim as a Java IDE.** Previous: [Neovim inside tmux](/devtools/14-neovim-inside-tmux/) · Next: [Practise the keys with a game inside Neovim](/devtools/16-ide-trainer/)

## Sources

Official documentation and well-known tutorials read while writing this article. The wording here is our own.

- [LazyVim: Installation (starter)](https://www.lazyvim.org/installation)
- [LazyVim: Configuration and plugins](https://www.lazyvim.org/configuration)
- [lazy.nvim: Lockfile and commands](https://lazy.folke.io/usage)
- [Neovim: NVIM_APPNAME](https://neovim.io/doc/user/starting.html#%24NVIM_APPNAME)
- [mason.nvim README](https://github.com/mason-org/mason.nvim)
- [Lorenzo Bettini: lazyvim-java configuration repository](https://github.com/LorenzoBettini/lazyvim-java)
- [LazyVim starter repository](https://github.com/LazyVim/starter)
- [Nirmal Ravidas: Setting Up a Full Spring Boot Dev Environment on Linux with Neovim and LazyVim](https://nirmalravidas.hashnode.dev/spring-boot-dev-environment-linux-neovim-lazyvim)
