Small refactor to terminal
This commit is contained in:
parent
d06e61dcba
commit
c5ab57456d
2 changed files with 11 additions and 17 deletions
|
|
@ -25,7 +25,7 @@ vim.opt = require("vim_opt")
|
||||||
require("lazy_init")
|
require("lazy_init")
|
||||||
|
|
||||||
-- Initialize the sticky terminal window at the bottom
|
-- Initialize the sticky terminal window at the bottom
|
||||||
require("terminal").setup()
|
require("terminal")
|
||||||
|
|
||||||
-- Initialize the custom window management functionality
|
-- Initialize the custom window management functionality
|
||||||
require("window_management").setup()
|
require("window_management").setup()
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
local utils = require("utils")
|
local utils = require("utils")
|
||||||
|
local wm = require("window_management")
|
||||||
local M = {}
|
|
||||||
|
|
||||||
local terminal_window = nil
|
local terminal_window = nil
|
||||||
local terminal_bufnr = nil
|
local terminal_bufnr = nil
|
||||||
|
|
@ -38,18 +37,13 @@ local function toggle_terminal()
|
||||||
vim.api.nvim_command("startinsert")
|
vim.api.nvim_command("startinsert")
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.setup()
|
utils.add_keymaps({
|
||||||
local wm = require("window_management")
|
n = {
|
||||||
utils.add_keymaps({
|
["<leader>h"] = {
|
||||||
n = {
|
cmd = function()
|
||||||
["<leader>h"] = {
|
toggle_terminal()
|
||||||
cmd = function()
|
wm.autosize_windows()
|
||||||
toggle_terminal()
|
end,
|
||||||
wm.autosize_windows()
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
end
|
})
|
||||||
|
|
||||||
return M
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue