home
NOTE: Under Construction - I'm in the middle of upgrading my site and lots of stuff is kinda broken. Please forgive the mess.

Neovim Telescope Plugin Development Setup

March 2023

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

Directory Structure

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

Extension File

Code
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

Code
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.

═══ § ═══