neovim: show only filetype in statusline
This commit is contained in:
@@ -17,7 +17,7 @@ local diagnostics = {
|
|||||||
always_visible = true,
|
always_visible = true,
|
||||||
}
|
}
|
||||||
|
|
||||||
local filename = {
|
local filetype = {
|
||||||
function()
|
function()
|
||||||
local filetype = vim.bo.filetype
|
local filetype = vim.bo.filetype
|
||||||
local filename = vim.fn.expand("%:t")
|
local filename = vim.fn.expand("%:t")
|
||||||
@@ -26,14 +26,13 @@ local filename = {
|
|||||||
|
|
||||||
if filetype == "fugitive" then
|
if filetype == "fugitive" then
|
||||||
icon = devicons.get_icons().git.icon
|
icon = devicons.get_icons().git.icon
|
||||||
filename = "git"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if not icon then
|
if not icon then
|
||||||
return filename
|
return filetype
|
||||||
end
|
end
|
||||||
|
|
||||||
return icon .. " " .. filename
|
return icon .. " " .. filetype
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -94,17 +93,17 @@ lualine.setup({
|
|||||||
lualine_a = { tabs },
|
lualine_a = { tabs },
|
||||||
},
|
},
|
||||||
winbar = {
|
winbar = {
|
||||||
lualine_a = { filename },
|
lualine_a = { filetype },
|
||||||
},
|
},
|
||||||
inactive_winbar = {
|
inactive_winbar = {
|
||||||
lualine_a = { filename },
|
lualine_a = { filetype },
|
||||||
},
|
},
|
||||||
sections = {
|
sections = {
|
||||||
lualine_a = { mode },
|
lualine_a = { mode },
|
||||||
lualine_b = { branch },
|
lualine_b = { branch },
|
||||||
lualine_c = { diagnostics },
|
lualine_c = { diagnostics },
|
||||||
lualine_x = { diff, location, tabstop, fileformat },
|
lualine_x = { diff, location, tabstop, fileformat },
|
||||||
lualine_y = { filename },
|
lualine_y = { filetype },
|
||||||
lualine_z = {},
|
lualine_z = {},
|
||||||
},
|
},
|
||||||
extensions = { "nvim-tree", "fugitive", "quickfix" },
|
extensions = { "nvim-tree", "fugitive", "quickfix" },
|
||||||
|
|||||||
Reference in New Issue
Block a user