mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-22 21:30:51 +00:00
feat: add nvim-session-manager keybindings
This commit is contained in:
parent
5a56de1b9f
commit
15185f9ad6
2 changed files with 29 additions and 6 deletions
|
@ -15,13 +15,13 @@ in {
|
||||||
]
|
]
|
||||||
++ optionals (cfg.usePicker) ["dressing-nvim"];
|
++ optionals (cfg.usePicker) ["dressing-nvim"];
|
||||||
|
|
||||||
vim.nnoremap = {
|
vim.maps.normal = mkMerge [
|
||||||
"<leader>sl" = ":SessionManager load_session<CR>";
|
(mkBinding cfg.mappings.loadSession ":SessionManager load_session<CR>" "Load session")
|
||||||
"<leader>sd" = ":SessionManager delete_session<CR>";
|
(mkBinding cfg.mappings.deleteSession ":SessionManager delete_session<CR>" "Delete session")
|
||||||
"<leader>sc" = ":SessionManager save_current_session<CR>";
|
(mkBinding cfg.mappings.saveCurrentSession ":SessionManager save_current_session<CR>" "Save current session")
|
||||||
"<leader>slt" = ":SessionManager load_last_session<CR>";
|
(mkBinding cfg.mappings.loadLastSession ":SessionManager load_last_session<CR>" "Load last session")
|
||||||
# TODO: load_current_dir_session
|
# TODO: load_current_dir_session
|
||||||
};
|
];
|
||||||
|
|
||||||
vim.luaConfigRC.nvim-session-manager = nvim.dag.entryAnywhere ''
|
vim.luaConfigRC.nvim-session-manager = nvim.dag.entryAnywhere ''
|
||||||
local Path = require('plenary.path')
|
local Path = require('plenary.path')
|
||||||
|
|
|
@ -8,6 +8,29 @@ with builtins; {
|
||||||
options.vim.session.nvim-session-manager = {
|
options.vim.session.nvim-session-manager = {
|
||||||
enable = mkEnableOption "Enable nvim-session-manager";
|
enable = mkEnableOption "Enable nvim-session-manager";
|
||||||
|
|
||||||
|
mappings = {
|
||||||
|
loadSession = mkOption {
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
description = "Load session";
|
||||||
|
default = "<leader>sl";
|
||||||
|
};
|
||||||
|
deleteSession = mkOption {
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
description = "Delete session";
|
||||||
|
default = "<leader>sd";
|
||||||
|
};
|
||||||
|
saveCurrentSession = mkOption {
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
description = "Save current session";
|
||||||
|
default = "<leader>sc";
|
||||||
|
};
|
||||||
|
loadLastSession = mkOption {
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
description = "Load last session";
|
||||||
|
default = "<leader>slt";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
usePicker = mkOption {
|
usePicker = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
|
|
Loading…
Reference in a new issue