mirror of
https://github.com/kristoferssolo/telescope-frecency.nvim.git
synced 2025-10-21 20:10:38 +00:00
fix: only show filter column when show_filter_column is true (#51)
This commit is contained in:
parent
ea44b316f4
commit
979a6f3d88
@ -122,7 +122,7 @@ local frecency = function(opts)
|
|||||||
display_items = state.show_scores and { { entry.score, "TelescopeFrecencyScores" } } or {}
|
display_items = state.show_scores and { { entry.score, "TelescopeFrecencyScores" } } or {}
|
||||||
|
|
||||||
-- TODO: store the column lengths here, rather than recalculating in get_display_cols()
|
-- TODO: store the column lengths here, rather than recalculating in get_display_cols()
|
||||||
-- TODO: only include filter_paths column if opts.show_filter_col is true
|
if state.show_filter_column then
|
||||||
local filter_path = ""
|
local filter_path = ""
|
||||||
if state.active_filter then
|
if state.active_filter then
|
||||||
if state.active_filter_tag == "LSP" or state.active_filter_tag == "CWD" then
|
if state.active_filter_tag == "LSP" or state.active_filter_tag == "CWD" then
|
||||||
@ -131,7 +131,10 @@ local frecency = function(opts)
|
|||||||
filter_path = Path:new(state.active_filter):make_relative(os_home) .. os_path_sep
|
filter_path = Path:new(state.active_filter):make_relative(os_home) .. os_path_sep
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
table.insert(display_items, { filter_path, "Directory" })
|
table.insert(display_items, { filter_path, "Directory" })
|
||||||
|
end
|
||||||
|
|
||||||
if has_devicons and not state.disable_devicons then
|
if has_devicons and not state.disable_devicons then
|
||||||
icon, icon_highlight = devicons.get_icon(entry.name, string.match(entry.name, "%a+$"), { default = true })
|
icon, icon_highlight = devicons.get_icon(entry.name, string.match(entry.name, "%a+$"), { default = true })
|
||||||
table.insert(display_items, { icon, icon_highlight })
|
table.insert(display_items, { icon, icon_highlight })
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user