feat: configure yazi file viewer

This commit is contained in:
Youwen Wu 2024-08-18 03:36:57 -07:00
parent 30ba3c5580
commit b3c0ab342c
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3

View file

@ -304,33 +304,55 @@
{ {
action = "<Plug>(YankyPutAfter)"; action = "<Plug>(YankyPutAfter)";
key = "p"; key = "p";
options = {};
mode = ["n" "x"]; mode = ["n" "x"];
} }
{ {
action = "<Plug>(YankyPutBefore)"; action = "<Plug>(YankyPutBefore)";
key = "P"; key = "P";
options = {};
mode = ["n" "x"]; mode = ["n" "x"];
} }
{ {
action = "<Plug>(YankyGPutAfter)"; action = "<Plug>(YankyGPutAfter)";
key = "gp"; key = "gp";
options = {};
mode = ["n" "x"]; mode = ["n" "x"];
} }
{ {
action = "<Plug>(YankyGPutBefore)"; action = "<Plug>(YankyGPutBefore)";
key = "gP"; key = "gP";
options = {};
mode = ["n" "x"]; mode = ["n" "x"];
} }
{ {
action = ":Telescope yank_history<CR>"; action = ":Telescope yank_history<CR>";
key = "<Leader>p"; key = "<Leader>p";
options = {};
mode = "n"; mode = "n";
} }
{
action = '':lua require("yazi").yazi()<CR>'';
key = "<Leader>mm";
options = {
desc = "Open Yazi current nvim working directory";
noremap = true;
silent = true;
};
}
{
action = '':lua require("yazi").yazi("cwd")<CR>'';
key = "<Leader>mm";
options = {
desc = "Open Yazi current nvim working directory";
noremap = true;
silent = true;
};
}
# {
# action = ":Yazi<CR>";
# key = "<Leader>mf";
# options = {
# desc = "Open Yazi at current file";
# noremap = true;
# silent = true;
# };
# }
# { # {
# action = "<cmd>lua require'conform'.format({ bufnr = args.bf })<CR>"; # action = "<cmd>lua require'conform'.format({ bufnr = args.bf })<CR>";
# key = "<Leader>cf"; # key = "<Leader>cf";
@ -515,6 +537,12 @@
"_" = ["trim_whitespace"]; "_" = ["trim_whitespace"];
}; };
}; };
yazi = {
enable = true;
settings = {
open_for_directories = true;
};
};
}; };
extraPlugins = [ extraPlugins = [