This project is no longer maintained.
Please use zerochae/endpoint.nvim instead.
A powerful Telescope picker for quickly finding and navigating Spring Boot API endpoints with customizable UI and smart caching.
- π Fast Endpoint Discovery: Quickly find Spring Boot API endpoints by HTTP method
- π¨ Customizable UI: Configurable icons, colors, and display options
- β‘ Smart Caching: Multiple cache modes including persistent disk storage
- π Path Variable Support: Handles complex path variables and RequestMapping patterns
- π Precise Navigation: Jump directly to the exact line with annotation highlighting
- π Syntax Highlighting: Preview window with Java syntax highlighting
- π§ Easy Setup: Just call
require("spring").setup()
to get started
:Spring Get " Find all GET endpoints
:Spring Post " Find all POST endpoints
:Spring Put " Find all PUT endpoints
:Spring Delete " Find all DELETE endpoints
:Spring Patch " Find all PATCH endpoints
:Spring ClearCache " Clear all cached data
:Spring CacheStatus " Show current cache status
:SpringGetMapping " Find all GET endpoints
:SpringPostMapping " Find all POST endpoints
:SpringPutMapping " Find all PUT endpoints
:SpringDeleteMapping " Find all DELETE endpoints
:SpringPatchMapping " Find all PATCH endpoints
:Telescope spring " Default picker
:Telescope spring get " GET endpoints
:Telescope spring post " POST endpoints
:Telescope spring put " PUT endpoints
:Telescope spring delete " DELETE endpoints
:Telescope spring patch " PATCH endpoints
β οΈ Important: You must callrequire("spring").setup()
in aconfig
function for the plugin to work properly. Theopts
table alone is not sufficient.
{
"zerochae/telescope-spring.nvim",
dependencies = { "nvim-telescope/telescope.nvim" },
cmd = {
"Spring",
"SpringGetMapping",
"SpringPostMapping",
"SpringPutMapping",
"SpringDeleteMapping",
"SpringPatchMapping",
},
config = function()
require("spring").setup({
-- Optional: customize settings
cache_ttl = 5000, -- Cache time in milliseconds (time/session modes)
cache_mode = "time", -- Cache mode: "time", "session", or "persistent"
debug = false, -- Enable debug logging
ui = {
show_icons = true, -- Show method icons
show_method = true, -- Show method text (GET, POST, etc.)
-- Customize icons (requires show_icons = true)
method_icons = {
GET = "π₯",
POST = "π€",
PUT = "βοΈ",
DELETE = "ποΈ",
PATCH = "π§",
},
-- Customize colors
method_colors = {
GET = "DiagnosticOk", -- Green
POST = "DiagnosticInfo", -- Blue
PUT = "DiagnosticWarn", -- Yellow
DELETE = "DiagnosticError", -- Red
PATCH = "DiagnosticHint", -- Purple
},
},
})
end,
}
{
"zerochae/telescope-spring.nvim",
dependencies = { "nvim-telescope/telescope.nvim" },
cmd = {
"Spring",
"SpringGetMapping",
"SpringPostMapping",
"SpringPutMapping",
"SpringDeleteMapping",
"SpringPatchMapping",
},
config = function()
require("spring").setup({
ui = {
show_icons = true,
show_method = true,
},
})
end,
}
use {
"zerochae/telescope-spring.nvim",
requires = { "nvim-telescope/telescope.nvim" },
config = function()
require("spring").setup() -- This is required!
end,
}
require("spring").setup({
cache_ttl = 5000, -- Cache TTL in milliseconds (time/session modes)
cache_mode = "time", -- Cache mode: "time", "session", or "persistent"
debug = false, -- Enable debug logging
file_patterns = { "**/*.java" }, -- File patterns to search
exclude_patterns = { -- Patterns to exclude
"**/target/**",
"**/build/**"
},
ui = {
show_icons = false, -- Show method icons
show_method = true, -- Show method text
method_colors = {
GET = "TelescopeResultsNumber",
POST = "TelescopeResultsConstant",
PUT = "TelescopeResultsKeyword",
DELETE = "TelescopeResultsSpecialChar",
PATCH = "TelescopeResultsFunction",
},
method_icons = {
GET = "π₯",
POST = "π€",
PUT = "βοΈ",
DELETE = "ποΈ",
PATCH = "π§",
},
},
})
You can customize how endpoints are displayed:
-- Option 1: Icons only
ui = {
show_icons = true,
show_method = false,
}
-- Result: π₯ /api/users
-- Option 2: Method text only (default)
ui = {
show_icons = false,
show_method = true,
}
-- Result: GET /api/users
-- Option 3: Both icons and method text
ui = {
show_icons = true,
show_method = true,
}
-- Result: π₯ GET /api/users
-- Option 4: Minimal (path only)
ui = {
show_icons = false,
show_method = false,
}
-- Result: /api/users
Choose from different icon themes:
-- Theme 1: Meaningful Icons (Default)
method_icons = {
GET = "π₯", -- Inbox (receiving data)
POST = "π€", -- Outbox (sending data)
PUT = "βοΈ", -- Pencil (editing)
DELETE = "ποΈ", -- Trash (deleting)
PATCH = "π§", -- Wrench (fixing/patching)
}
-- Theme 2: Geometric
method_icons = {
GET = "βΌ", -- Down arrow
POST = "β²", -- Up arrow
PUT = "β", -- Diamond
DELETE = "β", -- X mark
PATCH = "β", -- Circle with dot
}
The plugin includes an intelligent caching system with three modes:
{
cache_ttl = 10000, -- Cache for 10 seconds (time/session modes only)
cache_mode = "time", -- Cache mode: "time", "session", or "persistent"
debug = false, -- Enable debug logging for troubleshooting
}
Cache Modes:
"time"
: Cache expires after the specified TTL (default)"session"
: Cache remains valid until nvim is closed"persistent"
: Cache is saved to disk and persists across nvim sessions
The persistent cache mode offers the best performance for large projects:
require("spring").setup({
cache_mode = "persistent",
debug = false, -- Set to true for troubleshooting
})
Features:
- π Project-specific caching: Each project gets its own cache directory
- πΎ Disk storage: Cache survives nvim restarts and system reboots
- π Instant loading: No re-scanning on subsequent launches
- π Smart invalidation: Automatically detects when annotations need re-scanning
- ποΈ Cache location:
~/.local/share/nvim/telescope-spring/[project-name]/
Cache Management:
:SpringClearCache " Clear all cache files for current project
:SpringCacheStatus " Show detailed cache information
Cache Files Structure:
~/.local/share/nvim/telescope-spring/my-project/
βββ find_cache.lua " Endpoint data (paths, methods, locations)
βββ metadata.lua " Scan history and project metadata
When to use persistent mode:
- β Large Spring Boot projects with many controllers
- β Frequent nvim restarts during development
- β Want maximum performance after initial scan
- β Small projects (overhead not worth it)
- β Controllers change very frequently
Customize which files to search:
{
file_patterns = { "**/*.java", "**/*.kt" }, -- Java and Kotlin
exclude_patterns = {
"**/target/**",
"**/build/**",
"**/node_modules/**"
},
}
- Neovim >= 0.8.0
- telescope.nvim
- ripgrep (for fast searching)
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.