feat: Add ability to turn off devicon colors

This commit is contained in:
TJ DeVries
2020-10-25 08:19:09 -04:00
parent 477261e5c0
commit 113a516c63
3 changed files with 8 additions and 2 deletions
+6 -1
View File
@@ -1,5 +1,6 @@
local has_devicons, devicons = pcall(require, 'nvim-web-devicons')
local conf = require('telescope.config').values
local path = require('telescope.path')
local utils = require('telescope.utils')
@@ -17,7 +18,11 @@ if has_devicons then
local icon, icon_highlight = devicons.get_icon(filename, string.match(filename, '%a+$'), { default = true })
local icon_display = (icon or ' ') .. ' ' .. display
return icon_display, icon_highlight
if conf.color_devicons then
return icon_display, icon_highlight
else
return icon_display
end
end
else
transform_devicons = function(_, display, _)