mirror of
https://github.com/kristoferssolo/telescope-frecency.nvim.git
synced 2025-10-21 20:10:38 +00:00
fix: workspace filtering (#150)
* fix: call `finder:start()` separately from finder init fixes #149 * fix: show filter column for default workspace if enabled
This commit is contained in:
parent
eaaabc90ed
commit
4bdd9bafc7
@ -88,11 +88,12 @@ function Picker:start(opts)
|
|||||||
return self:default_path_display(picker_opts, path)
|
return self:default_path_display(picker_opts, path)
|
||||||
end,
|
end,
|
||||||
}, opts or {}) --[[@as FrecencyPickerOptions]]
|
}, opts or {}) --[[@as FrecencyPickerOptions]]
|
||||||
self.workspace = self:get_workspace(opts.cwd, self.config.initial_workspace_tag)
|
self.workspace = self:get_workspace(opts.cwd, self.config.initial_workspace_tag or self.config.default_workspace_tag)
|
||||||
log.debug { workspace = self.workspace }
|
log.debug { workspace = self.workspace }
|
||||||
|
|
||||||
self.state = State.new()
|
self.state = State.new()
|
||||||
local finder = self:finder(opts, self.workspace, self.config.initial_workspace_tag)
|
local finder =
|
||||||
|
self:finder(opts, self.workspace, self.config.initial_workspace_tag or self.config.default_workspace_tag)
|
||||||
local picker = pickers.new(opts, {
|
local picker = pickers.new(opts, {
|
||||||
prompt_title = "Frecency",
|
prompt_title = "Frecency",
|
||||||
finder = finder,
|
finder = finder,
|
||||||
@ -218,7 +219,12 @@ function Picker:on_input_filter_cb(picker_opts)
|
|||||||
end
|
end
|
||||||
if self.workspace ~= workspace then
|
if self.workspace ~= workspace then
|
||||||
self.workspace = workspace
|
self.workspace = workspace
|
||||||
opts.updated_finder = self:finder(picker_opts, self.workspace, tag or self.config.initial_workspace_tag):start()
|
opts.updated_finder = self:finder(
|
||||||
|
picker_opts,
|
||||||
|
self.workspace,
|
||||||
|
tag or self.config.initial_workspace_tag or self.config.default_workspace_tag
|
||||||
|
)
|
||||||
|
opts.updated_finder:start()
|
||||||
end
|
end
|
||||||
return opts
|
return opts
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user