Files
cyper-mac/home/neovim/yazi.nix
2025-12-27 13:35:09 +01:00

42 lines
1018 B
Nix

{ pkgs, ... }: {
# Yazi: Terminal file manager integration for Neovim
# Provides a fast, visual way to browse and manage files.
programs.nixvim = {
# Use extraPlugins to manually load yazi.nvim
extraPlugins = with pkgs.vimPlugins; [ yazi-nvim ];
# Configure yazi after it's loaded
extraConfigLua = ''
require('yazi').setup({
open_for_directories = true,
})
'';
keymaps = [
{
mode = "n";
key = "<leader>fy";
action.__raw = ''
function()
require('yazi').yazi(nil, vim.loop.cwd())
end
'';
options.desc = "Open Yazi file manager";
}
{
mode = "n";
key = "<leader>fd";
action.__raw = ''
function()
require('yazi').yazi(nil, vim.fn.expand("%:p:h"))
end
'';
options.desc = "Open Yazi in current file directory";
}
];
# Install yazi terminal program
extraPackages = with pkgs; [ yazi ];
};
}