Skip to content

About

A complete Spring Boot dashboard for Neovim. Manage beans, endpoints, tests, and configurations directly from a tabbed sidebar UI with auto-restart on save, configuration-diff and much more.

Topics

Resources

Stars

15 stars

Watchers

0 watching

Forks

Latest commit

 

History

363 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stars Forks Issues License Neovim Last Commit

spring-tools.nvim

Spring Boot Dashboard for Neovim.
Manage applications, browse endpoints and beans, run tests, inspect configuration, and stream logs from a single sidebar.

Features • Installation • Usage • Configuration • Highlights • Troubleshooting

Note for first run: On first open, spring-tools.nvim performs a one-time project discovery scan across your workspace — parsing Java files and building caches. You may notice a brief pause while this happens. All results are persisted to disk, so subsequent sessions load instantly.


Previews

Click to expand screenshots and demos

Dashboard — project list, start/stop, custom run commands

Tip: Press <CR> on a project for the nested action menu, o to toggle the output panel, D for config diff.

Beans Explorer — collapsible type sections, nested @Bean methods

Endpoints Explorer — routes grouped by HTTP method, collapsible REST / Actuator sections, curl test client

Tip: Press t on any endpoint to send a curl request. Add headers like -H "Authorization: Bearer xxx". Press Tab for completions.

-- Custom curl flags for Tab completion
command_input = {
  curl_suggestions = {
    { word = "-H \"X-API-Key: \"", menu = "API key header" },
  },
}

Actuator Endpoints — browse runtime info: health, beans, metrics, env, loggers, mappings, and more

Tip: Only health and info are exposed by default. Add management.endpoints.web.exposure.include=* to your application.properties to enable all endpoints.

Config Diff — side-by-side comparison with color-coded highlights

Tip: Press c/l/r/s to filter by diff type. a to show all. ? for help.

-- Customize diff highlight colors
diff = {
  highlights = {
    changed = "DiagnosticWarn",    -- amber
    same = "DiagnosticOk",         -- green
    left_only = "DiagnosticError", -- red
    right_only = "DiagnosticError",
  },
}

Smart Fold Navigation — collapse parents, expand children, jump between headers

Tip: Press c to collapse the nearest open fold above your cursor — O to expand the nearest closed one below. < and > jump between foldable headers. All keys are configurable.

Test Runner — discover and run JUnit 5 tests, per-method results

Run All Tests — batch test execution with surefire reporting

Config Explorer — browse properties/YAML, preview values, jump to line

Log Filtering — color-coded levels (ERROR / WARN / INFO / DEBUG / TRACE) with toggle keys

Tip: Press e/w/i/d/t to toggle log levels. c copies all output.

-- Add custom log highlight patterns
log = {
  levels = {
    { pattern = "[AUDIT]", hl = "SpringToolsLogWarn" },
  },
  custom = {
    pattern = "[DEMO]", hl = "SpringToolsLogWarn", key = "x",
  },
  service_colors = {},               -- defaults to rainbow (SpringToolsRainbow1-7)
},

Log Filtering (multiple projects) — switch between project logs while filtering

HTTP Client — curl requests from endpoints with JSON responses, live log streaming

Tip: Press t on an endpoint, fill path variables, add curl args with Tab completions. Responses open in a formatted buffer with headers, status, timing.

-- Customizable curl completions
command_input = {
  curl_suggestions = {
    { word = "-H \"X-API-Key: \"", menu = "API key header" },
  },
}

Full Walkthrough — sidebar navigation, command input, output panel

Keybindings Reference

Commands Reference

Formatted Output — compile errors, root cause extraction

Click to view microservice screenshots

Tip: The sidebar dynamically detects when you're in a multi-project workspace — a parent header groups child microservices, Section keys are scoped per project, and Docker Compose integration surfaces in both the project menu and as a clickable widget. The UI adapts automatically whether you're working in a monorepo or a microservice cluster.

Microservice Log Filtering — per-service toggle (1–9), color-coded, combine with level filters

Tip: Press 1–9 to toggle individual services off/on, then narrow further with e/w/i/d/t level filters. Combine both to zero in on exactly the data you need — no noise. Services are ordered alphabetically — position 1 = first service by name, position 2 = second, etc.

-- Assign a highlight group per service position (defaults to rainbow SpringToolsRainbow1-7)
log = {
  service_colors = {
    "MyRed",                 -- 1st service (alpha-sorted) — override default rainbow
    "MyGreen",               -- 2nd
    "MyBlue",                -- 3rd
  },
}
highlights = {
  MyRed = { fg = "#ff6b6b" },
  MyGreen = { fg = "#51cf66" },
  MyBlue = { fg = "#339af0" },
}

Microservice Dashboard — foldable parent header, nested services, Docker Compose widget

Microservice Beans — per-project grouping with collapsible headers

Microservice Endpoints — scoped REST and Actuator sections per service

Microservice Tests — separate test explorers per project

Microservice Config — independent property browsing per service

Microservice Config Diff — cross-service comparison with project-name labels

Works out of the box

Zero dependencies required. Shown here with default configs on popular distros:

Tip: NvChad uses defaults = { lazy = true } — add lazy = false to the plugin spec. Java Tree-sitter parser must be installed (:TSInstall java).

Features

  • Sidebar UI — persistent sidebar with 5 tabbed views and ? help float; position configurable (left/right)
  • Output Panel — bottom split for live log streaming; toggle with o; height configurable (output.height); fullscreen toggle with f (output.keymaps.toggle_fullscreen)
  • Dashboard — project list with ★ active marker, ●/○ status dots, auto-selects CWD project
  • Nested Action Menu — Enter on a project opens a structured picker: Recent & default commands, Common commands, Custom run, View logs, Restart/Stop, Open config — recent commands can be deleted inline
  • Command History — :SpringCommands browses all saved custom commands across projects; re-run, copy, or delete
  • Custom Run Command — floating input with omnifunc completion (mvn lifecycle phases, plugin goals, -D properties, Gradle tasks), position configurable (top/center/bottom), locked against window navigation
  • Dynamic Maven Goal Discovery — auto-discovers plugin goals from help:effective-pom and help:describe for any Maven plugin, not just 55+ well-known ones; caches across sessions; auto-invalidates on POM changes
  • Dynamic Gradle Task Discovery — auto-discovers Gradle tasks via gradle tasks --all for any Gradle project; caches across sessions; auto-invalidates on build.gradle changes
  • Bean Explorer — collapsible sections by stereotype, nested @Bean methods under @Configuration
  • Endpoint Explorer — routes grouped by HTTP method (GET/POST/PUT/PATCH/DELETE), collapsible REST endpoints + Actuator endpoints (health, beans, metrics, env, loggers, mappings, and more) — both sections independently collapsible with their own nested sub-headers
  • Test Runner — discover/run JUnit 5 tests, per-method results from surefire XML
  • Config Explorer — browse application.properties/YAML, file-grouped, preview values with p, Enter jumps to exact line
  • Config Diff — :SpringConfigDiff or D in sidebar opens two config files side-by-side with explicit color-coded highlights (green same, amber changed, red one-sided) and filter toggles via a floating toolbar
  • HTTP Client — t on an endpoint sends a curl request; auto-detects port from running process; supports custom headers/args; pretty-prints JSON responses with syntax highlighting
  • Process Manager — unbuffered I/O, port extraction, exit code tracking
  • Multi-Project Workspace — detects projects under CWD + one level down (services//apps//packages//modules//tests/); groups microservices under parent headers when docker-compose.yml or a container dir exists; independent monorepo projects stay flat; workspace_filter limits to current directory (off by default)
  • Docker Compose — builds + starts containers inline via --force-recreate; detects running state via docker-compose ps with v1/v2 fallbacks; streams stderr + stdout merged; auto-refreshes sidebar on build completion
  • Service Log Filtering — per-service toggle with 1–9 keys; rainbow color-coded by position; combines with level filters (e/w/i/d/t) to isolate exactly what you need
  • Unified Search — :SpringSearch opens a fuzzy picker across all beans, endpoints, tests, and config properties with nerd-font icons — jumps directly to the definition on selection
  • Auto-restart — save any file and the app restarts automatically; skips test files, debounces rapid saves, shows changed filename in success line; per-project toggle persists across sessions; optional clean rebuild

Installation

lazy.nvim
{
  "DevDad-Main/spring-tools.nvim",
  -- Telescope is optional — falls back to vim.ui.select
  dependencies = {
    "nvim-telescope/telescope.nvim",
  },
  config = function()
    require("spring-tools").setup()
  end,
}
packer.nvim
use {
  'DevDad-Main/spring-tools.nvim',
  -- Telescope is optional — falls back to vim.ui.select
  requires = {
    'nvim-telescope/telescope.nvim',
  },
  config = function()
    require('spring-tools').setup()
  end,
}

Usage

Commands
Command Description
:SpringTools Open sidebar (defaults to Dashboard)
:SpringBoot Open sidebar on Dashboard
:SpringBeans Open sidebar on Beans
:SpringEndpoints Open sidebar on Endpoints
:SpringTest Open sidebar on Tests
:SpringConfig Open sidebar on Config
:SpringRefresh Clear caches and re-index
:SpringClearCache Clear all caches (project cache + dynamic goals)
:SpringConfigDiff Diff two config files side-by-side
:SpringSearch Fuzzy search beans, endpoints, tests, and config
:SpringCommands Browse and manage saved custom commands
:SpringTestClass Run current test class
:SpringTestMethod Run current test method
:SpringConfigSearch <query> Search config properties
Sidebar Navigation (default keymaps)
Key Action
j / k Move selection up/down
h / l Previous/next tab
1–5 Jump to tab (Dash/Beans/Endp/Tests/Config)
<CR> Open nested action menu (commands, logs, stop, etc.)
o Toggle output panel
/ Unified search across all views
p Preview config value (in Config view)
d Remove project from cache
D Open Config Diff viewer
t Test endpoint (send curl request)
c Collapse nearest open parent fold
O Expand nearest closed child fold
C Collapse all folds in current view
E Expand all folds in current view
< / > Jump to prev/next foldable header
R Refresh current view
q Close sidebar
? Toggle help floating window
:SpringSearch — unified fuzzy picker

Presents a single searchable list of all Spring artifacts in the current project:

  • Beans (coffee icon) — class name with stereotype type
  • @Bean methods (branch icon) — method name with parent @Configuration class
  • Endpoints (globe icon) — HTTP method + path + controller method name
  • Tests (flask icon) — class and method names
  • Config (gear icon) — property key + value + source file

Select any entry to jump directly to its definition. Opens natively in Telescope when available; falls back to vim.ui.select otherwise. Press / in the sidebar to open.

Dashboard action menu (Enter on a project)

Pressing <CR> on a project opens a nested picker:

 Recent & default (3)    ← expand for saved + default commands
 Common commands (112)   ← expand for Maven/Gradle tasks
  Custom run...           ← opens floating input for a one-off command
  View logs               ← (running/failed only) opens output panel
  Restart                 ← (running only) restarts the app
  Stop                    ← (running only) stops the app
  Open config             ← opens config file picker
  • Recent commands prompt Run / Delete before executing
  • Esc navigates back to the parent menu
  • Telescope overrides the picker when enabled for fuzzy filtering
Custom Run Command Input

Press <CR> on a stopped project → select  Custom run... → a floating input window appears.

  • Tab triggers omnifunc completion (mvn lifecycle phases, plugin goals, -D properties, Gradle tasks)
  • <C-j> / <C-k> navigate the completion popup
  • Completion auto-triggers as you type after word characters
  • Position configurable via command_input.position ("top", "center", "bottom")

Window locked — can't navigate away:

  • <Esc> exits insert mode (stays in float)
  • <Esc> or q in normal mode closes
  • <C-w/h/j/k/l>, mouse clicks all blocked
:SpringCommands — command history management

Browse all saved custom commands across projects. Each command entry shows the owning project and the full command string.

  • Re-run — starts the command with the project's backend (Maven/Gradle)
  • Copy — copies the command to clipboard
  • Delete — removes from history

Open natively in Telescope when available; falls back to vim.ui.select otherwise.

Auto-restart on save

When enabled, saving a .java or build file automatically restarts the running Spring Boot app after a debounce delay. Toggle per-project from the dashboard action menu — a ↻ indicator appears on the project line when active.

  • skip_tests (default true) — ignores saves in src/test/** to avoid unnecessary restarts
  • cooldown (default 3000ms) — prevents rapid double-restarts from quick consecutive saves
  • clean (default false) — runs mvn clean / gradle clean before each restart for a full rebuild
  • Changed file — the success line shows which file triggered the restart (· AppStartupRunner.java)

vs spring-boot-devtools:

Benchmarked on a small Spring Boot app (TestApp, ~15 classes, embedded H2):

Auto-restart DevTools
Restart time ~4.2s (full JVM restart) ~1–2s (class reload)
Speed vs DevTools ~2–4x slower —
Dependencies None spring-boot-devtools in pom.xml
Config changes Yes Only via restart
Bean wiring changes Yes Limited
Works with any build Yes Maven/Gradle only

Times vary by hardware, JVM warm-up, and project size — larger projects will see longer restart times. Auto-restart is a zero-dependency convenience feature that works out of the box. DevTools is faster for pure code changes but requires the dependency and has limitations with configuration and bean wiring changes. Use both together — DevTools for live-coding, auto-restart as a fallback for projects where DevTools isn't set up.


Configuration

Full default config with inline docs
require("spring-tools").setup({
  java_command = "java",       -- Java binary path
  terminal = "float",          -- "float" or "tab" for Maven/Gradle output
  cache_dir = nil,             -- custom cache path (defaults to stdpath("cache"))
  auto_refresh = true,         -- re-index on file save
  workspace_filter = false,    -- true = only show projects under cwd (less noise)
  icons = {
    running = "\u{f144}",      -- playing icon
    stopped = "\u{f04d}",      -- pause icon
    failed = "\u{f071}",       -- warning icon
    active = "\u{f00c}",       -- checkmark icon
  },
  sidebar = {
    position = "left",         -- "left" or "right"
    width = 48,                -- sidebar width in columns
    keymaps = {
      move_down = "j",
      move_up = "k",
      move_down_alt = "<Down>",
      move_up_alt = "<Up>",
      activate = "<CR>",
      close = "q",
      refresh = "R",
      remove = "d",
      switch_dashboard = "1",
      switch_beans = "2",
      switch_endpoints = "3",
      switch_tests = "4",
      switch_config = "5",
      tab_next = "l",
      tab_prev = "h",
      show_help = "?",
      search = "/",
      preview = "p",
      toggle_output = "o",
      collapse_fold = "c",
      expand_fold = "O",
      jump_fold_prev = "<",
      jump_fold_next = ">",
      collapse_all = "C",
      expand_all = "E",
     },
  },
  highlights = {
    -- Override any highlight group. Can use attributes or link.
    -- SpringToolsNormal = { link = "Normal" },
    -- SpringToolsSelected = { bg = "#334455" },
  },
  keymaps = {
    enable = true,             -- enable global keymaps
    boot = "<leader>sb",
    beans = "<leader>be",
    endpoints = "<leader>se",
    tests = "<leader>st",
    config = "<leader>sc",
    search = "<leader>ss",
  },
  telescope = {
    enable = true,             -- enable Telescope-based pickers
  },
  output = {
    height = 0.3,               -- fraction of editor height (0.3 = 30%). Use integer for fixed rows.
    keymaps = {
      close = "q",
      close_alt = "<Esc>",
      copy = "c",
      filter_error = "e",
      filter_warn = "w",
      filter_info = "i",
      filter_debug = "d",
      filter_trace = "t",
      toggle_fullscreen = "f",
    },
  },
  log = {
    levels = {},                 -- extra patterns: { pattern = "[AUDIT]", hl = "SpringToolsLogWarn" }
    custom = {},                 -- one toggleable: { pattern = "[DEMO]", hl = "SpringToolsLogWarn", key = "x" }
    service_colors = {},         -- defaults to rainbow (SpringToolsRainbow1 through SpringToolsRainbow7)
  },
  diff = {
    highlights = {
      changed = "SpringToolsDiffChanged",
      same = "SpringToolsDiffSame",
      left_only = "SpringToolsDiffRemoved",
      right_only = "SpringToolsDiffAdded",
    },
  },
  command_input = {
    position = "center",       -- "top", "center", or "bottom"
    keymaps = {
      complete = "<Tab>",
      trigger = "<C-Space>",
      popup_next = "<C-j>",
      popup_prev = "<C-k>",
      close = "<Esc>",
      close_alt = "q",
    },
  },
  auto_restart = {
    enable = true,             -- master switch (off = disabled for all)
    delay = 500,               -- debounce delay in ms
    cooldown = 3000,           -- minimum ms between restarts
    clean = false,             -- run mvn clean / gradle clean before restart
    skip_tests = true,         -- ignore saves in src/test/**
  },
  search = {
    icons = {
      bean = "",              -- bean class
      bean_method = "",       -- @Bean method
      endpoint = "",          -- REST endpoint
      test_class = "",        -- test class
      test_method = "",       -- test method
      config = "",            -- config property
    },
  },
  jdtls = {
    enable = false,            -- experimental Spring Boot LSP integration
  },
  log_level = vim.log.levels.INFO,  -- plugin log verbosity
})

Highlights

All theme-derived highlight groups

All highlights derive from your active colorscheme via nvim_get_hl at startup:

Group Derives from Description
SpringToolsNormal Normal Default text
SpringToolsHeader Title Sidebar / popup titles
SpringToolsSelected Visual Selected line
SpringToolsAccent Special ? help window section headers
SpringToolsStopped Inherits SpringToolsDim Sidebar ⏸ icon when stopped
SpringToolsBorder Inherits SpringToolsDim Floating window borders
SpringToolsSectionHeader Title Collapsible section headers (Controllers, GET, etc.)
SpringToolsMethodHeader Inherits SpringToolsAccent Endpoint method section headers (GET, POST)
SpringToolsBeanHeader Inherits SpringToolsAccent Bean type section headers (Controllers, Services)
SpringToolsBeanName Inherits Normal Individual bean names (UserController, UserService)
SpringToolsBeanMethod Inherits SpringToolsDim @Bean method entries (@appName(), @maxConnections())
SpringToolsRunning DiagnosticOk Running status
SpringToolsGet Inherits SpringToolsRunning GET keyword on endpoint lines
SpringToolsPost Inherits SpringToolsRunning POST keyword on endpoint lines
SpringToolsPut Inherits SpringToolsRunning PUT keyword on endpoint lines
SpringToolsPatch Inherits SpringToolsRunning PATCH keyword on endpoint lines
SpringToolsDelete Inherits SpringToolsRunning DELETE keyword on endpoint lines
SpringToolsTestRunAll Inherits SpringToolsAccent Run all tests header
SpringToolsTestClass Inherits SpringToolsAccent Test class header
SpringToolsTestMethod Inherits SpringToolsDim Test method name
SpringToolsError ErrorMsg Failed status
SpringToolsKey Special Keys in config/key-value views
SpringToolsValue Normal Values in config/key-value views
SpringToolsConfigSection Inherits SpringToolsAccent Config prefix section headers (server:, spring:)
SpringToolsConfigFile Inherits SpringToolsHeader Config file section headers (application.properties)
SpringToolsConfigKey Inherits SpringToolsKey Config property key name
SpringToolsConfigValue Inherits SpringToolsValue Config property value
SpringToolsDashboardProject Inherits Normal (bold) Project name in dashboard
SpringToolsDashboardStatus Inherits SpringToolsDim Status text (stopped/running/failed)
SpringToolsDashboardBuildType Inherits SpringToolsDim Build type (maven/gradle)
SpringToolsParentHeader Inherits SpringToolsHeader Collapsible workspace / microservice parent header
SpringToolsLogError ErrorMsg Log ERROR, FATAL, SEVERE levels
SpringToolsLogWarn Special Log WARN, WARNING levels
SpringToolsLogInfo DiagnosticOk Log INFO level
SpringToolsLogDebug Comment Log DEBUG level
SpringToolsLogTrace Comment Log TRACE level
SpringToolsRainbow1 Red 1st docker-compose service in rainbow cycle
SpringToolsRainbow2 Orange 2nd docker-compose service
SpringToolsRainbow3 Yellow 3rd docker-compose service
SpringToolsRainbow4 Green 4th docker-compose service
SpringToolsRainbow5 Cyan 5th docker-compose service
SpringToolsRainbow6 Blue 6th docker-compose service
SpringToolsRainbow7 Purple 7th docker-compose service
SpringToolsDim Comment Stopped, inactive tab
Override examples
require("spring-tools").setup({
  highlights = {
    -- General UI
    SpringToolsHeader     = { bold = true },                  -- View titles ("Spring Beans", "REST Endpoints")
    SpringToolsSelected   = { bg = "#334455" },               -- Currently selected line
    SpringToolsAccent     = { link = "@comment" },            -- ? help window headers
    SpringToolsDim        = { fg = "#888888" },               -- Dim/muted text, inactive tabs
    SpringToolsError      = { fg = "#ff0000" },               -- Error/failure status

    -- Endpoints
    SpringToolsMethodHeader = { fg = "#ffaa00" },             -- GET(8), POST(2) section headers
    SpringToolsGet          = { fg = "#00ff00" },             -- GET keyword on endpoint lines
    SpringToolsPost         = { fg = "#00ff00" },             -- POST keyword
    SpringToolsPut          = { fg = "#00ff00" },             -- PUT keyword
    SpringToolsPatch        = { fg = "#00ff00" },             -- PATCH keyword
    SpringToolsDelete       = { fg = "#ff0000" },             -- DELETE keyword

    -- Beans
    SpringToolsBeanHeader   = { fg = "#ffaa00" },             -- Controllers, Services section headers
    SpringToolsBeanName     = { fg = "#aabbcc" },             -- Individual bean names
    SpringToolsBeanMethod   = { link = "Comment" },           -- @appName(), @maxConnections()

    -- Tests
    SpringToolsTestRunAll   = { fg = "#00ff00" },             -- ▶ Run all tests
    SpringToolsTestClass    = { fg = "#ffaa00" },             -- Test class headers
    SpringToolsTestMethod   = { fg = "#888888" },             -- ⊡ testGetUser, ⊡ testCreateUser

    -- Status
    SpringToolsRunning      = { fg = "#00ff00" },             -- Running indicator ●
    SpringToolsStopped      = { fg = "#ff0000" },             -- Stopped indicator ○

    -- Config
    SpringToolsConfigSection = { fg = "#ffaa00" },            -- server:, spring: prefix section headers
    SpringToolsConfigFile     = { fg = "#ffaa00", bold = true }, -- application.properties file headers
    SpringToolsConfigKey     = { fg = "#eebb00" },            -- port, datasource.url property keys
    SpringToolsConfigValue   = { fg = "#aabbcc" },            -- 9090, jdbc:h2:mem:testdb values

    -- Dashboard
    SpringToolsDashboardProject   = { fg = "#ffffff", bold = true }, -- Project name
    SpringToolsDashboardStatus    = { fg = "#888888" },             -- stopped/running/failed
    SpringToolsDashboardBuildType = { fg = "#666666" },             -- maven/gradle
    SpringToolsParentHeader = { fg = "#ffffff", bold = true },       -- workspace / microservice parent

    -- Log output
    SpringToolsLogError   = { fg = "#ff0000", bold = true },        -- ERROR, FATAL, SEVERE
    SpringToolsLogWarn    = { fg = "#ffaa00" },                     -- WARN, WARNING
    SpringToolsLogInfo    = { fg = "#00ff00" },                     -- INFO
    SpringToolsLogDebug   = { fg = "#888888" },                     -- DEBUG
    SpringToolsLogTrace   = { fg = "#555555" },                     -- TRACE

    -- Rainbow service log colors (1-7 indexed, recycled for more services)
    SpringToolsRainbow1   = { fg = "#ff6b6b" },                     -- red
    SpringToolsRainbow2   = { fg = "#ffa94d" },                     -- orange
    SpringToolsRainbow3   = { fg = "#ffd43b" },                     -- yellow
    SpringToolsRainbow4   = { fg = "#69db7c" },                     -- green
    SpringToolsRainbow5   = { fg = "#38d9a9" },                     -- cyan
    SpringToolsRainbow6   = { fg = "#74c0fc" },                     -- blue
    SpringToolsRainbow7   = { fg = "#b197fc" },                     -- purple
  },
})

Similar Projects

A few other plugins also aim to improve the Spring Boot experience in Neovim. Here's how they compare:

Plugin Approach What it does well
JavaHello/spring-boot.nvim LSP integration (STS4) Config completion, bean finding via workspace symbols, code actions — all through the language server
elmcgill/springboot-nvim Compile & run helpers Incremental compiling on save, quick bootRun, Java file templates
jkeresman01/spring-initializr.nvim Project scaffolding Spring Initializr UI to generate new projects from within Neovim

I was already using spring-boot.nvim for LSP-based config hints and found it useful, but I wanted a more visual sidebar — something closer to what IntelliJ's Spring Boot panel provides. That's what led me to build this plugin: a dedicated UI with tabbed views for projects, beans, endpoints, tests, and config, all sitting alongside the editor in Neovim's own window layout.


Architecture

Module tree
lua/spring-tools/
├── init.lua               -- Entry point
├── config.lua             -- User config with defaults
├── commands.lua           -- :Spring* commands and keymaps
├── utils.lua              -- Cache, file helpers, picker
├── project.lua            -- Project detection, active project, persistent cache
├── boot.lua               -- Thin wrapper for sidebar commands
├── beans.lua              -- Bean scanner (class annotations + @Bean methods)
├── endpoints.lua          -- REST endpoint discovery
├── tests.lua              -- JUnit test discovery and runner
├── config_explorer.lua    -- properties/YAML parser
├── actuator.lua           -- Actuator endpoint definitions (health, beans, metrics, env, …)
├── build_completion.lua  — Maven & Gradle task discovery via effective-pom, help:describe, and gradle tasks --all
├── backends/
│   ├── init.lua           -- Backend registry
│   ├── spring_boot.lua    -- Maven/Gradle backend
│   └── docker.lua         -- Docker backend
├── core/
│   ├── init.lua
│   ├── backend.lua        -- BaseBackend, ProcessManager with unbuffered I/O
│   └── state.lua          -- Pub/sub state, shared project list
└── ui/
    ├── init.lua           -- Legacy helpers (float windows, background jobs)
    ├── sidebar.lua        -- Sidebar manager, tab bar, keymaps, help window, auto-select active
    ├── output.lua         -- Bottom output panel
    ├── components.lua     -- Theme-derived highlight setup
    ├── sections.lua       -- Reusable collapsible sections module
    └── views/
        ├── init.lua       -- View registry (tab order)
        ├── dashboard.lua  -- Project dashboard with action picker, custom command float
        ├── beans.lua      -- Bean browser with type grouping + @Bean nesting
        ├── endpoints.lua  -- Endpoint browser with HTTP method grouping
        ├── tests.lua      -- Test explorer with class/method listing, surefire XML parsing
        └── config.lua     -- Config property browser, value preview, line jump
Key implementation details
  • render() vs refresh() — j/k uses lightweight render() (no re-scan), tab-switch/Enter/R uses full refresh() (re-scan + render)
  • p keymap — global in sidebar, dispatches to view's toggle_preview for config value preview
  • Custom command float — buftype = "prompt" buffer with omnifunc, TextChangedI auto-trigger, <C-j>/<C-k> popup nav, winfixbuf, BufLeave fail-safe
  • Maven completion — POM parser for <plugin> blocks, dynamic discovery via help:effective-pom + help:describe for unknown plugins, 55+ well-known plugins, 76 default goals, 26 lifecycle phases, 31 -D properties, per-project cached with POM mtime invalidation
  • Gradle completion — dynamic task discovery via gradle tasks --all, 45 hardcoded tasks as base set, per-project cached with build.gradle mtime invalidation; wrapper auto-detection
  • Segments-based rendering — dashboard items use separate highlight groups per element (project name, status text, build type tag)
  • Expanded props persistence — config view's M.expanded_props survives load_items() rebuild
  • Dashboard auto-select — sidebar refresh() searches for is_active and jumps M.selected to the CWD-matching project

Troubleshooting

Problem Solution
No projects detected Cache has old data — press R in sidebar or run :SpringRefresh
Compile errors in output Check the "Root cause" section at the top of the output panel
Port conflict fuser -k 9090/tcp to kill existing process, then restart
Telescope not showing Check telescope.enable = true in config
Tests not running Ensure Maven/Gradle is on PATH
Gradle build fails Stop stale daemons: ./gradlew --stop in the project root

Testing

# With plenary.nvim installed
nvim --headless -c "PlenaryBustedDirectory tests/ {minimal_init = 'tests/init.lua'}" -c "q"

A sample Spring Boot test app is available at tests/TestApp/ (Maven) and tests/TestApp-Gradle/ (Gradle):

  • Full MVC: models, repositories, services, controllers
  • All HTTP methods (GET, POST, PUT, PATCH, DELETE)
  • @Configuration with @Bean methods, @Component runners
  • 5 test classes (11 methods), 30+ config properties with dev profile
  • Same source code across both projects to verify parity

Requirements

  • Neovim 0.10+
  • Telescope.nvim (optional — enhances pickers, falls back to vim.ui.select)
  • plenary.nvim (optional — only needed for running tests)
  • Maven or Gradle (for running apps/tests)

Limitations

  • Java parsing powered by Tree-sitter AST queries — accurate detection of nested and multi-line annotations, immune to comment/string false positives
  • Windows support limited — find command is used for file discovery
  • Multi-module projects fully supported

Roadmap

  • POM-driven CLI completion — parses pom.xml for configured plugin goals, Tab-complete in custom command prompt; enhanced with dynamic discovery via help:effective-pom + help:describe
  • Persistent goal cache with POM invalidation — discovered goals survive Neovim restarts; cache auto-invalidates when pom.xml changes
  • Configurable float position — command_input.position accepts "top", "center", or "bottom"
  • Float window lock — no accidental navigation away (<C-w/h/j/k/l> blocked, BufLeave fail-safe)
  • Auto-select active project — jumps cursor to CWD-matching project on sidebar refresh
  • Unified fuzzy search — :SpringSearch across beans, endpoints, tests, and config with Telescope-native picker, nerd-font icons, and sidebar / keymap
  • Custom command history management — :SpringCommands to browse, re-run, copy, and delete saved commands
  • Auto-restart on save — debounced restart on file save with per-project toggle and ↻ indicator
  • Gradle task discovery — parse build.gradle and query gradle tasks --all for dynamic task completion
  • Config diff viewer — :SpringConfigDiff side-by-side comparison of config files
  • HTTP test client — t on an endpoint sends curl requests with custom args, shows JSON response
  • Multi-project workspace — detect and manage multiple independent Spring Boot projects; foldable parent headers, Docker Compose integration, UI auto-adapts
  • Profile picker — select active Spring profiles when starting an app

License

MIT

About

A complete Spring Boot dashboard for Neovim. Manage beans, endpoints, tests, and configurations directly from a tabbed sidebar UI with auto-restart on save, configuration-diff and much more.

Topics

Resources

Stars

15 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages