108 lines
2.8 KiB
Nix
108 lines
2.8 KiB
Nix
{
|
|
plugins = {
|
|
harpoon = {
|
|
enable = true;
|
|
settings = {
|
|
# save_on_toggle = true;
|
|
# sync_on_ui_close = false;
|
|
};
|
|
|
|
# DEPRECATED, keep the comments because not all moved to keymaps
|
|
#
|
|
# enableTelescope = true;
|
|
# keymaps = {
|
|
# /*
|
|
# DUPRECATED, moved to keymaps session
|
|
# navFile = {
|
|
# "1" = "<C-h>";
|
|
# "2" = "<C-t>";
|
|
# "3" = "<C-n>";
|
|
# # "4" = "<C-m>"; # <C-m> breaks neorg links (<C-m> also treat as Enter key in terminal)
|
|
# "4" = "<C-l>";
|
|
# # "5" = "<C-l>"; # spare for luasnip
|
|
# };
|
|
# */
|
|
#
|
|
# /*
|
|
# # https://github.com/ThePrimeagen/harpoon/issues/487
|
|
# # DUPRECATED, but seems not yet implemented very well in harpoon2
|
|
# gotoTerminal = {
|
|
# "1" = "<C-a>1";
|
|
# "2" = "<C-a>2";
|
|
# "3" = "<C-a>3";
|
|
# "4" = "<C-a>4";
|
|
# "5" = "<C-a>5";
|
|
# };
|
|
# */
|
|
#
|
|
# # Moved to keymaps session to add descriptions
|
|
# # addFile = "<leader>hm";
|
|
# # toggleQuickMenu = "<leader>ht";
|
|
# # navNext = "<C-j>";
|
|
# # navPrev = "<C-k>";
|
|
# };
|
|
};
|
|
};
|
|
keymaps = [
|
|
{
|
|
mode = "n";
|
|
key = "<C-h>";
|
|
action.__raw = "function() require'harpoon':list():select(1) end";
|
|
}
|
|
{
|
|
mode = "n";
|
|
key = "<C-t>";
|
|
action.__raw = "function() require'harpoon':list():select(2) end";
|
|
}
|
|
{
|
|
mode = "n";
|
|
key = "<C-n>";
|
|
action.__raw = "function() require'harpoon':list():select(3) end";
|
|
}
|
|
{
|
|
mode = "n";
|
|
key = "<C-l>";
|
|
action.__raw = "function() require'harpoon':list():select(4) end";
|
|
}
|
|
{
|
|
mode = "n";
|
|
key = "<leader>hm";
|
|
options = {
|
|
silent = false;
|
|
desc = "Harpoon marks current file";
|
|
};
|
|
# action = mkRaw "require('harpoon.mark').add_file";
|
|
action.__raw = "function() require'harpoon':list():add() end";
|
|
}
|
|
{
|
|
mode = "n";
|
|
key = "<leader>ht";
|
|
options = {
|
|
silent = false;
|
|
desc = "Harpoon quick menu toggle";
|
|
};
|
|
# action = mkRaw "require('harpoon.ui').toggle_quick_menu";
|
|
action.__raw = "function() require'harpoon.ui':toggle_quick_menu(harpoon:list()) end";
|
|
}
|
|
{
|
|
mode = "n";
|
|
key = "<C-S-j>";
|
|
options = {
|
|
silent = false;
|
|
desc = "Harpoon next file";
|
|
};
|
|
# action = mkRaw "require('harpoon.ui').nav_next";
|
|
action.__raw = "function() require'harpoon':list():next() end";
|
|
}
|
|
{
|
|
mode = "n";
|
|
key = "<C-S-k>";
|
|
options = {
|
|
silent = false;
|
|
desc = "Harpoon previous file";
|
|
};
|
|
# action = mkRaw "require('harpoon.ui').nav_prev";
|
|
action.__raw = "function() require'harpoon':list():prev() end";
|
|
}
|
|
];
|
|
}
|