Skip to content

Commit

Permalink
check for telescope
Browse files Browse the repository at this point in the history
  • Loading branch information
bgrohman committed Nov 8, 2022
1 parent 7ac3261 commit a43851e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions lua/nvim-keymapper/init.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
local has_telescope, _ = pcall(require, 'telescope')

if not has_telescope then
error('This plugin requires nvim-telescope/telescope.nvim')
end

local pickers = require('telescope.pickers')
local conf = require('telescope.config').values

Expand Down
8 changes: 7 additions & 1 deletion lua/telescope/_extensions/nvim-keymapper.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
return require('telescope').register_extension({
local has_telescope, telescope = pcall(require, 'telescope')

if not has_telescope then
error('This plugin requires nvim-telescope/telescope.nvim')
end

return telescope.register_extension({
setup = function(ext_config, config)
end,
exports = require('nvim-keymapper')
Expand Down

0 comments on commit a43851e

Please sign in to comment.