1

Neovim: Configure lualine on_click elements

This commit is contained in:
2024-10-12 17:57:35 +02:00
parent b57c88a93f
commit 6eb0f18b82

View File

@ -1076,7 +1076,7 @@ in {
end)() end)()
''; '';
in { in {
extensions = ["fzf" "neo-tree" "toggleterm" "trouble"]; extensions = ["fzf" "lazy" "neo-tree" "oil" "quickfix" "toggleterm" "trouble"];
options = { options = {
theme.__raw = bubbles; theme.__raw = bubbles;
@ -1094,16 +1094,33 @@ in {
}; };
sections = { sections = {
# lualine_a = ["mode"]; # These often use mixed lists/attrSets, so we have to use __raw alot
# lualine_a.__raw = ''{ { "mode", separator = { left = "" }, right_padding = 2, } }'';
lualine_a.__raw = ''{ { "mode", separator = {}, } }''; lualine_a.__raw = ''{ { "mode", separator = {}, } }'';
lualine_b.__raw = ''{ "branch", "diff", "diagnostics", { "filename", path = 1, } }''; lualine_b.__raw = ''
{
{
"branch",
on_click = function() vim.cmd("LazyGit") end,
},
{
"diff",
on_click = function() vim.cmd("DiffviewOpen") end,
},
{
"diagnostics",
on_click = function() vim.cmd("Trouble diagnostics toggle") end,
},
-- Using incline for this instead
-- {
-- "filename",
-- path = 1,
-- },
}
'';
lualine_c.__raw = ''{}''; # Use __raw: Nixvim does nothing with "[]", so the default config would be used lualine_c.__raw = ''{}''; # Use __raw: Nixvim does nothing with "[]", so the default config would be used
lualine_x.__raw = ''{}''; lualine_x.__raw = ''{}'';
lualine_y = ["filetype" "encoding" "fileformat"]; lualine_y = ["filetype" "encoding" "fileformat"];
# lualine_z = ["location"];
# lualine_z.__raw = ''{ { "location", separator = { right = "" }, left_padding = 2, } }'';
lualine_z.__raw = ''{ { "location", separator = {}, } }''; lualine_z.__raw = ''{ { "location", separator = {}, } }'';
}; };