Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: selected icon highlight with color_devicons to false #2187

Merged
merged 2 commits into from
Oct 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/telescope.txt
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ telescope.setup({opts}) *telescope.setup()*
*telescope.defaults.color_devicons*
color_devicons: ~
Boolean if devicons should be enabled or not. If set to false, the
"TelescopeResultsFileIcon" highlight group is used.
text highlight group is used.
Hint: Coloring only works if |termguicolors| is enabled.

Default: true
Expand Down
2 changes: 1 addition & 1 deletion lua/telescope/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ append(
true,
[[
Boolean if devicons should be enabled or not. If set to false, the
"TelescopeResultsFileIcon" highlight group is used.
text highlight group is used.
Hint: Coloring only works if |termguicolors| is enabled.

Default: true]]
Expand Down
4 changes: 2 additions & 2 deletions lua/telescope/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ utils.transform_devicons = load_once(function()
if conf.color_devicons then
return icon_display, icon_highlight
else
return icon_display, "TelescopeResultsFileIcon"
return icon_display, nil
end
end
else
Expand Down Expand Up @@ -480,7 +480,7 @@ utils.get_devicons = load_once(function()
if conf.color_devicons then
return icon, icon_highlight
else
return icon, "TelescopeResultsFileIcon"
return icon, nil
end
end
else
Expand Down
1 change: 0 additions & 1 deletion plugin/telescope.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ local highlights = {
TelescopeResultsNumber = { default = true, link = "Number" },
TelescopeResultsComment = { default = true, link = "Comment" },
TelescopeResultsSpecialComment = { default = true, link = "SpecialComment" },
TelescopeResultsFileIcon = { default = true, link = "Normal" },

-- Used for git status Results highlighting
TelescopeResultsDiffChange = { default = true, link = "DiffChange" },
Expand Down