Setting Up a Full Spring Boot Dev Environment on Linux with Neovim and LazyVim
Your IDE is eating your RAM. Here's how to build Spring Boot apps on Linux with Neovim and LazyVim instead.

Maybe IntelliJ is eating your RAM. Maybe you're curious about the terminal-first workflow everyone keeps talking about. Or maybe you just want more control over your tools. Whatever brought you here — this guide walks you through setting up a complete, production-ready Spring Boot development environment on Linux using Neovim and LazyVim.
By the end, you'll have Java 21, Maven, LSP-powered autocompletion, debugging, Git integration, and everything you need to build real Spring Boot applications — without ever touching a traditional IDE.
Why This Setup?
Let's be honest about the elephant in the room first: Java development in Neovim? Sounds painful.
It's not. Here's the real picture:
A fresh IntelliJ instance with a Spring Boot project open consumes somewhere between 1.5 and 2.5 GB of RAM before you've written a single line. Neovim with the same project? Around 120 MB. On a machine with 8–16 GB of RAM running Docker containers, a database, and a browser — that difference is felt every single day.
Beyond performance, there's the workflow shift. Neovim is keyboard-native. Once the muscle memory builds, you stop reaching for the mouse entirely — navigation, refactoring, search, terminal, Git — all from the keyboard.
And then there's LazyVim. LazyVim is a Neovim configuration framework that gives you a curated, well-integrated setup out of the box. Sane defaults, lazy-loaded plugins for speed, and an extras system for enabling language-specific support like Java. You get IDE-quality features without spending a week writing Lua from scratch.
Prerequisites
Ubuntu 24.04 or Arch Linux (steps adapt to most distros)
Basic terminal comfort — navigating directories, running commands
No prior Vim/Neovim experience needed
Step 1 — Install System Dependencies
Start with the tools everything else depends on.
Ubuntu / Debian:
sudo apt update && sudo apt upgrade -y
sudo apt install -y build-essential git curl wget unzip \
ripgrep fd-find fzf nodejs npm python3 python3-pip
Arch Linux:
sudo pacman -Syu
sudo pacman -S base-devel git curl wget unzip ripgrep fd fzf nodejs npm python
💡 Why ripgrep and fd? Neovim's fuzzy finder (Telescope) uses these for file and text search. They are dramatically faster than
grepandfindon large codebases.
Step 2 — Install Java 21 with SDKMAN
The best way to manage Java on Linux is SDKMAN. It lets you install multiple JDKs side by side and switch between them per project. It also manages Maven, Gradle, and the Spring Boot CLI.
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
Install Java 21 (LTS, required for Spring Boot 3.x):
sdk install java 21.0.3-tem
sdk use java 21.0.3-tem
java -version
Now install Maven and Gradle:
sdk install maven
sdk install gradle
mvn -version
gradle -version
Step 3 — Install Neovim 0.10+
⚠️ Do not install Neovim from your distro's package manager — the versions there are usually outdated. LazyVim requires 0.9+ (0.10 recommended).
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz
tar xzf nvim-linux64.tar.gz
sudo mv nvim-linux64 /opt/nvim
Add to your ~/.bashrc or ~/.zshrc:
export PATH="$PATH:/opt/nvim/bin"
Reload and verify:
source ~/.bashrc
nvim --version
# NVIM v0.10.x
Step 4 — Install LazyVim
Back up any existing config first:
mv ~/.config/nvim ~/.config/nvim.bak
mv ~/.local/share/nvim ~/.local/share/nvim.bak
Clone the LazyVim starter:
git clone https://github.com/LazyVim/starter ~/.config/nvim
rm -rf ~/.config/nvim/.git
Launch Neovim:
nvim
The first launch triggers lazy.nvim to download and install all default plugins. Let it finish — it takes about a minute.
Essential Keybindings to Know Right Away
LazyVim uses Space as the leader key.
| Keybinding | Action |
|---|---|
Space + e |
Toggle file explorer |
Space + ff |
Find files (fuzzy search) |
Space + fg |
Live grep (search text in files) |
Space + gg |
Open Lazygit |
Space + xx |
Diagnostics panel |
gd |
Go to definition |
gr |
Go to references |
K |
Hover documentation |
Space + ca |
Code actions |
Space + rn |
Rename symbol |
Step 5 — Enable Java Support
LazyVim has an extras system for language-specific tooling. Enable the Java extra by editing your LazyVim config:
nvim ~/.config/nvim/lua/config/lazy.lua
Add the Java extra inside the spec table:
require("lazy").setup({
spec = {
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
{ import = "lazyvim.plugins.extras.lang.java" }, -- 👈 add this
{ import = "plugins" },
},
})
Save (:w) and restart Neovim. LazyVim will automatically install:
nvim-jdtls — Eclipse Java Language Server (same engine as VSCode's Java extension)
Java Treesitter grammar — semantic syntax highlighting
nvim-dap — debugging support
What you immediately get from this:
Autocompletion for methods, fields, constructors, and Spring annotations
Auto-import and import organization on save
Go to definition / references across the full project
Rename refactoring that updates all usages
Extract method / extract variable
Inline Javadoc via hover (
K)Real-time error and warning diagnostics
Step 6 — Configure the Java LSP
Create a config file to tell JDTLS where your JDK lives:
nvim ~/.config/nvim/lua/plugins/java.lua
return {
{
"mfussenegger/nvim-jdtls",
opts = {
settings = {
java = {
configuration = {
runtimes = {
{
name = "JavaSE-21",
path = vim.fn.expand("~/.sdkman/candidates/java/current"),
default = true,
},
},
},
format = {
enabled = true,
},
saveActions = {
organizeImports = true,
},
},
},
},
},
}
Save and restart. Neovim now knows your JDK path, auto-formats on save, and organizes imports automatically.
Also open Mason to verify your LSP tools are installed:
:Mason
Make sure jdtls and google-java-format are present. Press i on any item to install it.
Step 7 — Create a Spring Boot Project
Install the Spring Boot CLI via SDKMAN:
sdk install springboot
Generate a project:
spring init \
--dependencies=web,data-jpa,postgresql,lombok,validation \
--java-version=21 \
--build=maven \
--name=myapp \
myapp
Open it in Neovim:
cd myapp
nvim .
The file explorer opens showing your project structure. Navigate with j/k, open files with Enter, toggle the explorer with Space + e.
Step 8 — Writing Code: What the Workflow Feels Like
Open DemoApplication.java. You'll immediately notice semantic syntax highlighting, inline error markers, and autocompletion triggering as you type.
Create UserController.java and start typing:
package com.example.myapp;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@RequestMapping("/api/users")
public class UserController {
private final UserService userService;
public UserController(UserService userService) {
this.userService = userService;
}
@GetMapping
public List<User> getAllUsers() {
return userService.findAll();
}
@PostMapping
public User createUser(@RequestBody @Valid CreateUserRequest request) {
return userService.create(request);
}
}
As you write, watch JDTLS suggest completions for Spring annotations, flag missing imports as code actions (Space + ca to resolve), and underline undefined types. Press gd on any type to jump to its definition. Press K to read its Javadoc inline.
When you save with :w — imports are organized, formatting is applied. No manual step needed.
Step 9 — Running the App and Tests
Open a terminal inside Neovim with Ctrl + /. Run the app:
./mvnw spring-boot:run
For a split-pane workflow, press Ctrl + w + v (vertical split) and open a terminal in the new pane. Code on the left, logs on the right.
Running tests with neotest:
| Keybinding | Action |
|---|---|
Space + tt |
Run test under cursor |
Space + tf |
Run all tests in file |
Space + ta |
Run all project tests |
Space + ts |
Toggle test results panel |
Results appear inline. Stack traces are clickable — press Enter on a failing line to jump directly to it.
Step 10 — Git with Lazygit
Install Lazygit:
Ubuntu:
LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" \
| grep '"tag_name"' | sed -E 's/.*"v*([^"]+)".*/\1/')
curl -Lo lazygit.tar.gz \
"https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz"
tar xf lazygit.tar.gz lazygit
sudo install lazygit /usr/local/bin
Arch:
sudo pacman -S lazygit
Open it from inside Neovim with Space + gg. You get a full-screen Git UI — staged files, commit history, branches, diffs. Stage with Space, commit with c, push with P. Everything you'd do in a Git GUI, entirely in the terminal.
Step 11 — Debugging Spring Boot
This is the feature people assume you lose. You don't.
LazyVim's Java extra configures nvim-dap through JDTLS automatically.
| Keybinding | Action |
|---|---|
Space + db |
Toggle breakpoint |
Space + dd |
Start debug session |
F5 |
Continue |
F10 |
Step over |
F11 |
Step into |
Space + du |
Toggle debug UI |
The debug UI shows local variables, call stack, and a REPL for evaluating expressions. Full breakpoint debugging, right in the terminal.
Step 12 — Quality of Life Additions
Test Your API Without Leaving Neovim
Add the rest.nvim plugin and create .http files:
### Get all users
GET http://localhost:8080/api/users
Accept: application/json
###
### Create a user
POST http://localhost:8080/api/users
Content-Type: application/json
{
"name": "Alice",
"email": "alice@example.com"
}
Run the request under your cursor and see the response in a split window.
Use tmux for Persistent Sessions
sudo apt install tmux # Ubuntu
sudo pacman -S tmux # Arch
A solid layout for Spring Boot dev:
┌─────────────────────┬──────────────────┐
│ │ App logs │
│ Neovim (code) │ (mvnw run) │
│ ├──────────────────┤
│ │ Shell / tests │
└─────────────────────┴──────────────────┘
Helpful Shell Aliases
Add to your ~/.bashrc or ~/.zshrc:
alias vim="nvim"
alias vi="nvim"
alias sb-run="./mvnw spring-boot:run"
alias sb-test="./mvnw test"
alias sb-package="./mvnw clean package -DskipTests"
alias ll="ls -alF --color=auto"
Performance: Real Numbers
Measured on a ThinkPad T14 (Ryzen 5 Pro, 16 GB RAM, Arch Linux):
| Metric | IntelliJ IDEA | Neovim + LazyVim |
|---|---|---|
| Cold startup time | ~12 seconds | ~0.2 seconds |
| Memory at idle | ~1.8 GB | ~120 MB |
| Time to first completion | ~20 seconds | ~3 seconds |
| Full project indexing | ~45 seconds | ~8 seconds |
The memory difference is what you feel in daily use. Running a Spring Boot app, PostgreSQL in Docker, a browser, and Neovim simultaneously is comfortable. Add IntelliJ to that mix and it wasn't.
The Learning Curve — What to Actually Expect
Week 1: Everything is slow. You'll reach for the mouse. You'll panic in visual block mode (just press Escape). You'll forget commands. This is normal — push through.
Week 2: Core motions start clicking. ciw (change inner word), dap (delete a paragraph), % (jump to matching bracket), / (search) become reflexes. You stop using arrow keys.
Week 3: You notice you're moving faster. The IDE feels heavy and indirect when you open it.
Month 2+: You start customizing. Your config becomes yours. This is the real joy of Neovim — it grows with you and never changes behavior out from under you.
💡 Tip: Keep a printed cheatsheet for the first two weeks. Active recall builds muscle memory faster than anything else.
Wrapping Up
Setting up this environment takes an afternoon. Using it comfortably takes a few weeks. What you end up with is a development setup that:
Starts in under 200ms
Uses a fraction of the memory a traditional IDE needs
Gives you IDE-grade Java and Spring Boot support via the same LSP powering VSCode
Lives entirely in the terminal
Is fully version-controllable — your whole config is just files in
~/.config/nvim
The toolchain — Linux, Neovim, LazyVim, JDTLS, Lazygit, tmux — is actively maintained and battle-tested by a large community. And because your configuration is plain Lua files, you can reproduce your exact setup on any machine in minutes.
If you've been on the fence, the ecosystem is genuinely good enough now. Give it 30 days.
Resources
If this helped you, share it with a fellow developer still waiting for IntelliJ to finish indexing. 🚀

