Skip to content

Commit

Permalink
lint: fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc committed Mar 17, 2022
1 parent e7139cf commit c9e7f4f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lua/dressing/select/telescope.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ M.is_supported = function()
return pcall(require, "telescope")
end

local defaults = { previewer = false }

M.select = function(config, items, opts, on_choice)
local themes = require("telescope.themes")
local actions = require("telescope.actions")
Expand All @@ -23,7 +21,8 @@ M.select = function(config, items, opts, on_choice)
}
end

local theme, ttype = nil, type(config.theme)
local theme
local ttype = type(config.theme)
if ttype == "string" then
theme = themes[string.format("get_%s", config.theme)]
elseif ttype == "function" then
Expand All @@ -34,11 +33,11 @@ M.select = function(config, items, opts, on_choice)
end
end

local picker_opts = vim.tbl_extend("keep", config, theme({ previewer = false }))

local picker_opts = vim.tbl_extend("keep", config, theme({}))

pickers.new(picker_opts, {
prompt_title = opts.prompt,
previewer = false,
finder = finders.new_table({
results = items,
entry_maker = entry_maker,
Expand Down

0 comments on commit c9e7f4f

Please sign in to comment.