utility/snacks-nvim: add lualine, bufferline extension / offset

This commit is contained in:
Venkatesan Ravi 2025-04-09 21:52:55 +00:00
parent 67d9aa7cb5
commit 28af5c1ff9
3 changed files with 30 additions and 27 deletions

View file

@ -298,12 +298,12 @@
- Add lint (luacheck) and formatting (stylua) support for Lua. - Add lint (luacheck) and formatting (stylua) support for Lua.
- Add lint (markdownlint-cli2) support for Markdown. - Add lint (markdownlint-cli2) support for Markdown.
- Add catppuccin integration for Bufferline, Lspsaga. - Add catppuccin integration for Bufferline, Lspsaga.
- Add neo-tree integration for Bufferline. - Add `neo-tree`, `snacks.explorer` integrations to `bufferline`.
- Add more applicable filetypes to illuminate denylist. - Add more applicable filetypes to illuminate denylist.
- Disable mini.indentscope for applicable filetypes. - Disable mini.indentscope for applicable filetypes.
- Fix fzf-lua having a hard dependency on fzf. - Fix fzf-lua having a hard dependency on fzf.
- Enable inlay hints support - `config.vim.lsp.inlayHints`. - Enable inlay hints support - `config.vim.lsp.inlayHints`.
- Add `neo-tree` extension to `lualine`. - Add `neo-tree`, `snacks.picker` extensions to `lualine`.
[tebuevd](https://github.com/tebuevd): [tebuevd](https://github.com/tebuevd):

View file

@ -14,17 +14,28 @@
bCfg = config.vim.ui.breadcrumbs; bCfg = config.vim.ui.breadcrumbs;
in { in {
config = mkMerge [ config = mkMerge [
(mkIf config.vim.filetree.nvimTree.enable { {
vim.statusline.lualine.setupOpts = { vim.statusline.lualine.setupOpts.extensions =
extensions = ["nvim-tree"]; (lib.optionals config.vim.filetree.nvimTree.enable ["nvim-tree"])
}; ++ (lib.optionals config.vim.filetree.neo-tree.enable ["neo-tree"])
}) ++ (lib.optionals config.vim.utility.snacks-nvim.enable [
{
(mkIf config.vim.filetree.neo-tree.enable { # same extensions as nerdtree / neo-tree
vim.statusline.lualine.setupOpts = { # https://github.com/nvim-lualine/lualine.nvim/blob/master/lua/lualine/extensions/nerdtree.lua
extensions = ["neo-tree"]; # https://github.com/nvim-lualine/lualine.nvim/blob/master/lua/lualine/extensions/neo-tree.lua
}; sections = {
}) lualine_a = mkLuaInline ''
{
function()
return vim.fn.fnamemodify(vim.fn.getcwd(), ":~")
end,
}
'';
};
filetypes = ["snacks_picker_list" "snacks_picker_input"];
}
]);
}
(mkIf (bCfg.enable && bCfg.lualine.winbar.enable && bCfg.source == "nvim-navic") { (mkIf (bCfg.enable && bCfg.lualine.winbar.enable && bCfg.source == "nvim-navic") {
vim.statusline.lualine.setupOpts = { vim.statusline.lualine.setupOpts = {

View file

@ -272,20 +272,12 @@ in {
offsets = mkOption { offsets = mkOption {
type = listOf attrs; type = listOf attrs;
default = [ default = map (filetype: {
{ inherit filetype;
filetype = "NvimTree"; text = "File Explorer";
text = "File Explorer"; highlight = "Directory";
highlight = "Directory"; separator = true;
separator = true; }) ["NvimTree" "neo-tree" "snacks_layout_box"];
}
{
filetype = "neo-tree";
text = "File Explorer";
highlight = "Directory";
separator = true;
}
];
description = "The windows to offset bufferline above, see `:help bufferline-offset`"; description = "The windows to offset bufferline above, see `:help bufferline-offset`";
}; };