Skip to content

Commit

Permalink
refactor: remove logic for caching feature
Browse files Browse the repository at this point in the history
  • Loading branch information
delphinus committed Aug 13, 2023
1 parent 45eedae commit 6f43ec1
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions lua/frecency/picker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,9 @@ function Picker:start(opts)
return self:default_path_display(picker_opts, path)
end,
}, opts or {}) --[[@as FrecencyPickerOptions]]
self.lsp_workspaces = {}
local workspace = self:get_workspace(opts.cwd, self.config.initial_workspace_tag)
log.debug { workspace = workspace, ["self.workspace"] = self.workspace }
if vim.tbl_isempty(self.results) or workspace ~= self.workspace then
self.workspace = workspace
self.results = self:fetch_results(self.workspace)
end
self.workspace = self:get_workspace(opts.cwd, self.config.initial_workspace_tag)
log.debug { workspace = self.workspace }
self.results = self:fetch_results(self.workspace)

local state = State.new()

Expand All @@ -109,7 +105,7 @@ function Picker:start(opts)
end

function Picker:discard_results()
self.results = {}
-- TODO: implement here when it needs to cache.
end

--- See :h 'complete-functions'
Expand Down

0 comments on commit 6f43ec1

Please sign in to comment.