mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-11-14 04:55:57 +01:00
feat: toggleterm keybindings
This commit is contained in:
parent
f3aac8cb5a
commit
0938859c18
2 changed files with 8 additions and 1 deletions
|
@ -14,7 +14,7 @@ in {
|
||||||
|
|
||||||
vim.luaConfigRC.toggleterm = nvim.dag.entryAnywhere ''
|
vim.luaConfigRC.toggleterm = nvim.dag.entryAnywhere ''
|
||||||
require("toggleterm").setup({
|
require("toggleterm").setup({
|
||||||
open_mapping = [[<c-t>]],
|
open_mapping = '${cfg.mappings.open}',
|
||||||
direction = '${toString cfg.direction}',
|
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
|
-- 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)
|
size = function(term)
|
||||||
|
|
|
@ -7,6 +7,13 @@ with lib;
|
||||||
with builtins; {
|
with builtins; {
|
||||||
options.vim.terminal.toggleterm = {
|
options.vim.terminal.toggleterm = {
|
||||||
enable = mkEnableOption "Enable toggleterm as a replacement to built-in terminal command";
|
enable = mkEnableOption "Enable toggleterm as a replacement to built-in terminal command";
|
||||||
|
mappings = {
|
||||||
|
open = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
description = "The keymapping to open toggleterm";
|
||||||
|
default = "<c-t>";
|
||||||
|
};
|
||||||
|
};
|
||||||
direction = mkOption {
|
direction = mkOption {
|
||||||
type = types.enum ["horizontal" "vertical" "tab" "float"];
|
type = types.enum ["horizontal" "vertical" "tab" "float"];
|
||||||
default = "horizontal";
|
default = "horizontal";
|
||||||
|
|
Loading…
Reference in a new issue