feature: terminal
This commit is contained in:
parent
d843dd909d
commit
859d1e4a62
|
@ -1,3 +1,4 @@
|
||||||
|
---@diagnostic disable: lowercase-global
|
||||||
-- You can add your own plugins here or in other files in this directory!
|
-- You can add your own plugins here or in other files in this directory!
|
||||||
-- I promise not to create any merge conflicts in this directory :)
|
-- I promise not to create any merge conflicts in this directory :)
|
||||||
--
|
--
|
||||||
|
@ -9,14 +10,18 @@ return {
|
||||||
config = function()
|
config = function()
|
||||||
require('toggleterm').setup {}
|
require('toggleterm').setup {}
|
||||||
local Terminal = require('toggleterm.terminal').Terminal
|
local Terminal = require('toggleterm.terminal').Terminal
|
||||||
local lazygit = Terminal:new { cmd = 'lazygit', hidden = true, direction = 'float' }
|
|
||||||
|
|
||||||
---@diagnostic disable-next-line: lowercase-global
|
local lazygit = Terminal:new { cmd = 'lazygit', hidden = true, direction = 'float' }
|
||||||
function _lazygit_toggle()
|
function _lazygit_toggle()
|
||||||
lazygit:toggle()
|
lazygit:toggle()
|
||||||
end
|
end
|
||||||
|
vim.api.nvim_set_keymap('n', '<leader>gg', '<cmd>lua _lazygit_toggle()<CR>', { noremap = true, silent = true })
|
||||||
|
|
||||||
vim.api.nvim_set_keymap('n', '<leader>g', '<cmd>lua _lazygit_toggle()<CR>', { noremap = true, silent = true })
|
local terminal = Terminal:new { hidden = true }
|
||||||
|
function _terminal_toggle()
|
||||||
|
terminal:toggle()
|
||||||
|
end
|
||||||
|
vim.api.nvim_set_keymap('n', '<leader>gt', '<cmd>lua _terminal_toggle()<CR>', { noremap = true, silent = true })
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue