-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Status Line Integration #44
Comments
See https://github.com/xeluxee/competitest.nvim#statusline-and-winbar-integration
Here's my config for feline: conditional_components = {
{
condition = function()
return vim.bo.filetype == "CompetiTest"
end,
inactive = {
{
{
provider = "",
hl = { bg = "bg" },
},
},
{
{
left_sep = "slant_left",
provider = function()
return vim.b.competitest_title or "CompetiTest"
end,
hl = { fg = "main_fg", bg = "main_bg" },
right_sep = "slant_right",
},
},
{},
},
},
}, |
-- Custom extension
local competitest_line = {
filetypes = {'CompetiTest'},
sections = {
lualine_b = { function()
return vim.b.competitest_title or 'CompetiTest'
end },
lualine_y = {'searchcount'},
lualine_z = {lineinfo},
},
inactive_sections = {
lualine_b = { function()
return vim.b.competitest_title or 'CompetiTest'
end },
},
}
-- Add extension to your require('lualine').setup block
require('lualine').setup { extensions = {competitest_line} } Alternatively, if you want to have the same statusline for when a window is focused or when it is inactive: local competitest_line = {
filetypes = {'CompetiTest'},
inactive_sections = {
lualine_b = { function()
return vim.b.competitest_title or 'CompetiTest'
end },
},
}
require('lualine').setup {
ignore_focus = {'CompetiTest'},
extensions = {competitest_line},
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
Can you please explain how to integrate statusline variables name using lualine, that is what is your configuration to produce the second screenshot in the README?
For me the status line shows the name of the file when it is not active which I would like to keep, but change the statusline only if your buffer variable is set,
Thanks
The text was updated successfully, but these errors were encountered: