show icon for fugitive window
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
local lualine = require("lualine")
|
local lualine = require("lualine")
|
||||||
|
local devicons = require("nvim-web-devicons")
|
||||||
|
|
||||||
local mode = {
|
local mode = {
|
||||||
"mode",
|
"mode",
|
||||||
@@ -18,9 +19,15 @@ local diagnostics = {
|
|||||||
|
|
||||||
local filename = {
|
local filename = {
|
||||||
function()
|
function()
|
||||||
|
local filetype = vim.bo.filetype
|
||||||
local filename = vim.fn.expand("%:t")
|
local filename = vim.fn.expand("%:t")
|
||||||
local fileext = vim.fn.expand("%:e")
|
local fileext = vim.fn.expand("%:e")
|
||||||
local icon = require("nvim-web-devicons").get_icon(filename, fileext)
|
local icon = devicons.get_icon(filename, fileext)
|
||||||
|
|
||||||
|
if filetype == "fugitive" then
|
||||||
|
icon = devicons.get_icons().git.icon
|
||||||
|
filename = "git"
|
||||||
|
end
|
||||||
|
|
||||||
if not icon then
|
if not icon then
|
||||||
return filename
|
return filename
|
||||||
|
|||||||
Reference in New Issue
Block a user