summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorTJ DeVries <devries.timothyj@gmail.com>2020-09-11 11:21:09 -0400
committerTJ DeVries <devries.timothyj@gmail.com>2020-09-11 11:21:09 -0400
commit402d8f1b6a7d46911de05843a458afeafe5dcd24 (patch)
tree8a819e36a18d37812c02da6a27b2b2f4c2235728 /lua
parent31f2e9139c178bf51a33350d3d3b7b9c4dfd22e9 (diff)
fix: make begin proff
Diffstat (limited to 'lua')
-rw-r--r--lua/telescope/init.lua4
-rw-r--r--lua/telescope/pickers.lua5
2 files changed, 8 insertions, 1 deletions
diff --git a/lua/telescope/init.lua b/lua/telescope/init.lua
index c0a4e37..ecec931 100644
--- a/lua/telescope/init.lua
+++ b/lua/telescope/init.lua
@@ -44,6 +44,10 @@ require('telescope').setup {
--]]
function telescope.setup(opts)
+ if opts.default then
+ error("'default' is not a valid value for setup. See 'defaults'")
+ end
+
require('telescope.config').set_defaults(opts.defaults)
end
diff --git a/lua/telescope/pickers.lua b/lua/telescope/pickers.lua
index 146cfa7..dae92dc 100644
--- a/lua/telescope/pickers.lua
+++ b/lua/telescope/pickers.lua
@@ -115,6 +115,7 @@ function Picker:new(opts)
width = get_default(opts.width, config.values.width),
get_preview_width = get_default(opts.preview_width, config.values.get_preview_width),
results_width = get_default(opts.results_width, 0.8),
+ winblend = get_default(opts.winblend, config.values.winblend),
prompt_position = get_default(opts.prompt_position, config.values.prompt_position),
@@ -264,6 +265,7 @@ function Picker:find()
-- TODO: Should probably always show all the line for results win, so should implement a resize for the windows
a.nvim_win_set_option(results_win, 'wrap', false)
a.nvim_win_set_option(results_win, 'winhl', 'Normal:TelescopeNormal')
+ a.nvim_win_set_option(results_win, 'winblend', self.window.winblend)
local preview_win, preview_opts, preview_bufnr
@@ -274,12 +276,13 @@ function Picker:find()
-- TODO: For some reason, highlighting is kind of weird on these windows.
-- It may actually be my colorscheme tho...
a.nvim_win_set_option(preview_win, 'winhl', 'Normal:TelescopeNormal')
- a.nvim_win_set_option(preview_win, 'winblend', config.values.winblend)
+ a.nvim_win_set_option(preview_win, 'winblend', self.window.winblend)
end
-- TODO: We need to center this and make it prettier...
local prompt_win, prompt_opts = popup.create('', popup_opts.prompt)
local prompt_bufnr = a.nvim_win_get_buf(prompt_win)
+ a.nvim_win_set_option(prompt_win, 'winblend', self.window.winblend)
a.nvim_win_set_option(prompt_win, 'winhl', 'Normal:TelescopeNormal')
pcall(a.nvim_buf_set_option, prompt_bufnr, 'filetype', 'TelescopePrompt')