mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 10:21:31 +00:00
refactor: use new mapping format
This commit is contained in:
parent
2d9b24dfdb
commit
7e566c9687
4 changed files with 56 additions and 17 deletions
|
@ -14,7 +14,7 @@ in {
|
|||
|
||||
vim.luaConfigRC.toggleterm = nvim.dag.entryAnywhere ''
|
||||
require("toggleterm").setup({
|
||||
open_mapping = '${cfg.mappings.open}',
|
||||
open_mapping = null,
|
||||
direction = '${toString cfg.direction}',
|
||||
-- TODO: this should probably be turned into a module that uses the lua function if and only if the user has not set it
|
||||
size = function(term)
|
||||
|
@ -32,5 +32,7 @@ in {
|
|||
},
|
||||
})
|
||||
'';
|
||||
|
||||
vim.maps.normal = mkBinding cfg.mappings.open "<Cmd>execute v:count . \"ToggleTerm\"<CR>" "Toggle terminal";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ with builtins; {
|
|||
enable = mkEnableOption "Enable toggleterm as a replacement to built-in terminal command";
|
||||
mappings = {
|
||||
open = mkOption {
|
||||
type = types.str;
|
||||
type = types.nullOr types.str;
|
||||
description = "The keymapping to open toggleterm";
|
||||
default = "<c-t>";
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue