diff options
| author | TJ DeVries <devries.timothyj@gmail.com> | 2020-10-25 08:19:09 -0400 |
|---|---|---|
| committer | TJ DeVries <devries.timothyj@gmail.com> | 2020-10-25 08:19:09 -0400 |
| commit | 113a516c63fb6e1ae1fb01173ed8fefdf450b08a (patch) | |
| tree | 94456d9f4505bc17e196920b12b53fe5cb8f6bbb /lua/telescope/make_entry.lua | |
| parent | 477261e5c06fb627118a8df8077ff47392b8a16f (diff) | |
feat: Add ability to turn off devicon colors
Diffstat (limited to 'lua/telescope/make_entry.lua')
| -rw-r--r-- | lua/telescope/make_entry.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lua/telescope/make_entry.lua b/lua/telescope/make_entry.lua index 46fd3c2..bf018d0 100644 --- a/lua/telescope/make_entry.lua +++ b/lua/telescope/make_entry.lua @@ -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, _) |
