Try to override statusline modules
This commit is contained in:
+37
-1
@@ -6,10 +6,46 @@ local highlights = require "custom.highlights"
|
||||
|
||||
M.ui = {
|
||||
theme = "onedark",
|
||||
theme_toggle = { "onedark", "monekai" },
|
||||
theme_toggle = { "onedark", "onedark" },
|
||||
|
||||
hl_override = highlights.override,
|
||||
hl_add = highlights.add,
|
||||
|
||||
statusline = {
|
||||
order = {
|
||||
"macro",
|
||||
"mode",
|
||||
"relativepath",
|
||||
"file",
|
||||
"git",
|
||||
"%=",
|
||||
"lsp_msg",
|
||||
"%=",
|
||||
"diagnostics",
|
||||
"lsp",
|
||||
"cwd",
|
||||
"cursor",
|
||||
},
|
||||
modules = {
|
||||
macro = function()
|
||||
local noice = require "noice"
|
||||
if noice.api.statusline.mode.has() then
|
||||
return "%#St_CommandMode#" .. noice.api.statusline.mode.get()
|
||||
end
|
||||
return ""
|
||||
end,
|
||||
relativepath = function()
|
||||
local stbufnr = vim.api.nvim_win_get_buf(vim.g.statusline_winid or 0)
|
||||
local path = vim.api.nvim_buf_get_name(stbufnr)
|
||||
|
||||
if path == "" then
|
||||
return ""
|
||||
end
|
||||
|
||||
return "%#St_relativepath# " .. vim.fn.expand "%:.:h" .. " /"
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
M.plugins = "custom.plugins"
|
||||
|
||||
Reference in New Issue
Block a user