/telescope-phx-routes.nvim

View and access Phoenix routes using Telescope.nvim.

Primary LanguageLua

Telescope Phoenix Routes

View and access Phoenix routes using Telescope.nvim.

demo

Table of Contents

Installation

Install the plugin with your preferred package manager.

-- lazy.nvim
{
    'dinocosta/telescope-phx-routes.nvim',
    dependencies = { 'nvim-telescope/telescope.nvim' }
}

Setup

After installation you simply need to load the extension with:

require('telescope').load_extension('phx-routes')

Usage

The extension can easily be run with the :Telescope command:

:Telescope phx-routes routes

Or, more conveniently, you can create a mapping for it. In this example, space + p + r is used:

vim.api.nvim_set_keymap(
  "n",
  "<space>pr",
  ":Telescope phx-routes routes<CR>",
  { noremap = true }
)