Skip to content

zerochae/endpoint.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

290 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image

endpoint.nvim

A powerful Neovim plugin for quickly finding and navigating web framework API endpoints with multiple picker interfaces and smart caching.

Supported Frameworks:

  • Spring Boot (Java)
  • Rails (Ruby)
  • Symfony (PHP)
  • Express (Node.js)
  • NestJS (TypeScript/JavaScript)
  • FastAPI (Python)
  • .NET Core (C#)
  • Ktor (Kotlin)
  • Java Servlet (Java)
  • React Router (Client-side routing)

🖥️ Demo

스크린샷 2025-09-06 16 46 59 스크린샷 2025-09-14 01 08 58 스크린샷 2025-09-13 21 49 37 스크린샷 2025-09-13 20 18 11

✨ Features

  • 🔍 Multi-Framework Support: Automatically detects and supports 10 web frameworks
  • 🎯 Multiple Picker Interfaces: Telescope, vim.ui.select, or Snacks.nvim
  • Smart Caching: Real-time, session, or persistent modes
  • 📍 Precise Navigation: Jump directly to endpoint definitions
  • 🤖 Auto-Detection: Automatically detects your project's framework
  • 🔧 Simple Setup: Just call require("endpoint").setup()

🚀 Usage

:Endpoint          " Find all endpoints
:Endpoint Get      " Find GET endpoints
:Endpoint Post     " Find POST endpoints
:Endpoint Put      " Find PUT endpoints
:Endpoint Delete   " Find DELETE endpoints
:Endpoint Patch    " Find PATCH endpoints
:EndpointRefresh   " Force refresh (bypass cache)

📦 Installation

lazy.nvim

{
  "zerochae/endpoint.nvim",
  dependencies = {
    -- Choose one or more pickers (all optional):
    "nvim-telescope/telescope.nvim", -- For telescope picker
    "folke/snacks.nvim",            -- For snacks picker
    "stevearc/dressing.nvim",       -- Enhances vim.ui.select with telescope backend
    -- vim.ui.select picker works without dependencies
  },
  cmd = { "Endpoint", "EndpointRefresh" },
  config = function()
    require("endpoint").setup()
  end,
}

⚙️ Configuration

require("endpoint").setup({
  -- Picker configuration
  picker = {
    type = "vim_ui_select", -- "telescope", "vim_ui_select", "snacks"
    options = {
      telescope = {},     -- Telescope-specific options
      snacks = {},        -- Snacks-specific options
      vim_ui_select = {   -- vim.ui.select-specific options
        enable_filter = false,        -- Enable filtering for large lists
        filter_threshold = 20,        -- Show filter prompt when endpoints > threshold
        filter_prompt = "Filter: ",   -- Custom filter prompt
        show_filter_examples = true,  -- Show filter examples in prompt
      },
    },
    -- Previewer configuration
    previewer = {
      enable_highlighting = true, -- Enable syntax highlighting in previewer (default: true)
    },
  },

  -- Cache configuration
  cache = {
    mode = "session",   -- "none", "session", "persistent"
  },

  -- Progress notification configuration
  progress = {
    enabled = true,     -- Enable progress notifications during scan
    provider = "auto",  -- "auto", "fidget", "notify"
    -- auto: Use fidget.nvim if available, fallback to vim.notify
  },

  -- UI configuration
  ui = {
    show_icons = true,
    show_method = true,
    methods = {
      GET = { icon = "📥", color = "TelescopeResultsNumber" },
      POST = { icon = "📤", color = "TelescopeResultsConstant" },
      PUT = { icon = "✏️", color = "TelescopeResultsKeyword" },
      DELETE = { icon = "🗑️", color = "TelescopeResultsSpecialChar" },
      PATCH = { icon = "🔧", color = "TelescopeResultsFunction" },
      ROUTE = { icon = "🔗", color = "TelescopeResultsIdentifier" },
    },
  },
})

Legacy Configuration (still supported with deprecation warnings):

require("endpoint").setup({
  picker = "telescope",       -- @deprecated: use picker.type
  picker_opts = {             -- @deprecated: use picker.options
    telescope = { theme = "dropdown" },
  },
})

🎯 Picker Options

⚠️ Important: You must set picker.type to match your installed picker!

  • Telescope: picker.type = "telescope" - Rich fuzzy search with preview
  • vim.ui.select: picker.type = "vim_ui_select" - Native Neovim interface with smart filtering, enhanced by dressing.nvim
  • Snacks: picker.type = "snacks" - Modern picker with file preview and line highlighting
-- If you use snacks.nvim
{
  "zerochae/endpoint.nvim",
  dependencies = { "folke/snacks.nvim" },
  config = function()
    require("endpoint").setup({
      picker = { type = "snacks" }
    })
  end,
}

-- If you use telescope.nvim
{
  "zerochae/endpoint.nvim",
  dependencies = { "nvim-telescope/telescope.nvim" },
  config = function()
    require("endpoint").setup({
      picker = { type = "telescope" }
    })
  end,
}

-- If you use vim.ui.select with dressing.nvim
{
  "zerochae/endpoint.nvim",
  dependencies = { "stevearc/dressing.nvim" },
  config = function()
    require("endpoint").setup({
      picker = {
        type = "vim_ui_select",
        options = {
          vim_ui_select = {
            enable_filter = true,
            filter_threshold = 20,
            filter_prompt = "Filter endpoints: ",
          }
        }
      }
    })
  end,
}

🔧 Caching

Configure caching behavior for optimal performance:

  • "none": Real-time search, always up-to-date (no caching)
  • "session" (default): Cache until nvim closes, good performance balance
  • "persistent": Disk cache, survives nvim restarts until manual refresh

Cache Storage

Persistent cache files are stored in:

  • Location: ~/.cache/nvim/endpoint.nvim/
  • Format: Lua files for optimal performance
  • Naming:
    • {project}.lua (all endpoints)
    • {project}_GET.lua (GET endpoints only)
    • {project}_POST.lua (POST endpoints only)

Example cache files:

~/.cache/nvim/endpoint.nvim/
├── myproject.lua              # All endpoints
├── myproject_GET.lua          # GET endpoints
└── myproject_POST.lua         # POST endpoints

Use :EndpointRefresh to force refresh (bypass cache).

⚡️ Requirements

Optional Dependencies

Plugin Purpose
telescope.nvim Enhanced fuzzy finder UI
snacks.nvim Modern picker with preview
fidget.nvim Progress notifications during scanning

📄 License

MIT License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors