Add variable sizing to toggleterm, open horizontal by default. Add keymaps for using lazygit along size regular terminals
This commit is contained in:
parent
4b3277779d
commit
93eb85e5d8
|
@ -16,5 +16,5 @@ require('aerial').setup {
|
|||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '[[', '<cmd>AerialPrevUp<CR>', {})
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', ']]', '<cmd>AerialNextUp<CR>', {})
|
||||
end,
|
||||
open_automatic = true,
|
||||
open_automatic = false,
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ vim.g.loaded_netrw = 1
|
|||
vim.g.loaded_netrwPlugin = 1
|
||||
require('nvim-tree').setup {
|
||||
open_on_setup=true,
|
||||
open_on_setup_file=true,
|
||||
open_on_setup_file=false,
|
||||
hijack_cursor=true,
|
||||
sync_root_with_cwd=true,
|
||||
update_focused_file = {
|
||||
|
|
|
@ -1,7 +1,13 @@
|
|||
require('toggleterm').setup {
|
||||
direction = 'float',
|
||||
direction = 'horizontal',
|
||||
open_mapping = [[\t]],
|
||||
size = 20,
|
||||
size = function (term)
|
||||
if term.direction == "horizontal" then
|
||||
return 15
|
||||
elseif term.direction == "vertical" then
|
||||
return vim.o.columns * 0.3
|
||||
end
|
||||
end,
|
||||
hide_numbers = true, -- hide the number column in toggleterm buffers
|
||||
persist_size = false,
|
||||
}
|
||||
|
|
|
@ -13,7 +13,9 @@ end
|
|||
vim.g.mapleader = ' '
|
||||
-- Misc
|
||||
imap('jk', '<Esc>')
|
||||
nmap('<leader>gf', '<cmd>Git fetch<cr>')
|
||||
nmap('<leader>gg', '<cmd>10TermExec cmd="lazygit; exit" direction="vertical" go_back=0<cr>')
|
||||
nmap('<leader>gh', '<cmd>10TermExec cmd="lazygit; exit" direction="horizontal" go_back=0<cr>')
|
||||
nmap('<leader>gf', '<cmd>10TermExec cmd="lazygit; exit" direction="float" go_back=0<cr>')
|
||||
nmap('<leader>gp', '<cmd>Git pull<cr>')
|
||||
nmap('<leader>gP', '<cmd>Git push<cr>')
|
||||
nmap('<leader>cc', '<cmd>Git commit<cr>')
|
||||
|
@ -39,7 +41,6 @@ nmap('<leader>hw', '<cmd>HopWord<cr>')
|
|||
|
||||
-- Nvim-tree
|
||||
nmap('<leader>nt', '<cmd>NvimTreeToggle<cr>')
|
||||
nmap('<leader>nf', '<cmd>NvimTreeFindFile<cr>')
|
||||
|
||||
-- Trouble
|
||||
nmap('<leader>xx', '<cmd>TroubleToggle<cr>')
|
||||
|
@ -49,5 +50,4 @@ nmap('<leader>xq', '<cmd>TroubleToggle quickfix<cr>')
|
|||
nmap('<leader>xl', '<cmd>TroubleToggle loclist<cr>')
|
||||
|
||||
-- SnipRun
|
||||
nmap('<leader>srs', '<cmd>SnipRun<cr>')
|
||||
nmap('<leader>srr', '<cmd>%SnipRun<cr>')
|
||||
nmap('<leader>sr', '<cmd>%SnipRun<cr>')
|
||||
|
|
Loading…
Reference in a new issue