summaryrefslogtreecommitdiff
path: root/lua/telescope/builtin/internal.lua
blob: b4d419725409e732dda818f8771212a08d5918eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
local m = setmetatable({}, {
  __index = function(_, k)
    local utils = require "telescope.utils"
    utils.notify("builtin", {
      msg = string.format(
        'You are using an internal interface. Do not use `require("telescope.builtin.internal").%s`,'
          .. ' please use `require("telescope.builtin").%s`! We will remove this endpoint soon!',
        k,
        k
      ),
      level = "ERROR",
    })
    return require("telescope.builtin")[k]
  end,
})

return m