Home
Head's Up: I'm in the middle of upgrading my site. Most things are in place, but there are something missing and/or broken including image alt text. Please bear with me while I'm getting things fixed.

Neovim Telescope Plugin Development Setup

This needs a write up but here's the code in the mean time.

Directory Structure

~/Desktop/extension_name
└── lua
    └── telescope
        └── _extensions
            └── extension_name.lua

Extension File

lua
local pickers = require "telescope.pickers"
local finders = require "telescope.finders"

local run_extension = function()
  pickers.new({}, {
    prompt_title = "grimoire",
    finder = finders.new_table {
      results = { "red", "green", "blue" }
    },
  }):find()
end

return require("telescope").register_extension {
  exports = {
    extension_name = run_extension
  },
}

Configuration Setup

lua
require('lazy').setup({

  { dir = "~/Desktop/extension_name" },
  
  -- other plugins
  
}, {})


pcall(require('telescope').load_extension, 'extension_name')

- The docs show moving the code for the plugin to other files. I haven't had a problem keeping it directly in this file for small processes.