icons and highlights for cmdline
This commit is contained in:
parent
8020b6efc9
commit
89c5cdb7f5
@ -158,7 +158,9 @@ return {
|
|||||||
text = function(ctx)
|
text = function(ctx)
|
||||||
local lspkind = require('lspkind')
|
local lspkind = require('lspkind')
|
||||||
local icon = ctx.kind_icon
|
local icon = ctx.kind_icon
|
||||||
if vim.tbl_contains({ 'Path' }, ctx.source_name) then
|
if ctx.source_name == 'cmdline_history' then
|
||||||
|
icon = require('nvim-web-devicons').get_icon('log')
|
||||||
|
elseif vim.tbl_contains({ 'Path' }, ctx.source_name) then
|
||||||
local dev_icon, _ = require('nvim-web-devicons').get_icon(ctx.label)
|
local dev_icon, _ = require('nvim-web-devicons').get_icon(ctx.label)
|
||||||
if dev_icon then
|
if dev_icon then
|
||||||
icon = dev_icon
|
icon = dev_icon
|
||||||
@ -177,7 +179,11 @@ return {
|
|||||||
-- keep the highlight groups in sync with the icons.
|
-- keep the highlight groups in sync with the icons.
|
||||||
highlight = function(ctx)
|
highlight = function(ctx)
|
||||||
local hl = ctx.kind_hl
|
local hl = ctx.kind_hl
|
||||||
if vim.tbl_contains({ 'Path' }, ctx.source_name) then
|
if ctx.source_name == 'cmdline_history' then
|
||||||
|
_, hl = require('nvim-web-devicons').get_icon('log')
|
||||||
|
elseif ctx.source_name == 'cmdline' then
|
||||||
|
_, hl = require('nvim-web-devicons').get_icon('cc')
|
||||||
|
elseif vim.tbl_contains({ 'Path' }, ctx.source_name) then
|
||||||
local dev_icon, dev_hl = require('nvim-web-devicons').get_icon(ctx.label)
|
local dev_icon, dev_hl = require('nvim-web-devicons').get_icon(ctx.label)
|
||||||
if dev_icon then
|
if dev_icon then
|
||||||
hl = dev_hl
|
hl = dev_hl
|
||||||
|
Loading…
x
Reference in New Issue
Block a user