WIP - Added toggleterm, based upon curtanips work (#237)
* Added toggleterm, based upon curtanips work Also other various term fixes & changed term mappings * new NvChad config to hide statusline by filetype
This commit is contained in:
parent
3f44f0761a
commit
91c8736146
6 changed files with 77 additions and 19 deletions
|
@ -93,6 +93,3 @@ g.nvim_tree_bindings = {
|
|||
{key = "q", cb = tree_cb("close")},
|
||||
{key = "g?", cb = tree_cb("toggle_help")}
|
||||
}
|
||||
|
||||
-- hide statusline when nvim tree is opened
|
||||
vim.cmd [[au BufEnter,BufWinEnter,WinEnter,CmdwinEnter * if bufname('%') == "NvimTree" | set laststatus=0 | else | set laststatus=2 | endif]]
|
||||
|
|
33
lua/plugins/toggleterm.lua
Normal file
33
lua/plugins/toggleterm.lua
Normal file
|
@ -0,0 +1,33 @@
|
|||
local present, toggleterm = pcall(require, "toggleterm")
|
||||
if not present then
|
||||
return
|
||||
end
|
||||
|
||||
toggleterm.setup {
|
||||
-- size can be a number or function which is passed the current terminal
|
||||
size = function(term)
|
||||
if term.direction == "horizontal" then
|
||||
return 15
|
||||
elseif term.direction == "vertical" then
|
||||
return vim.o.columns * 0.4
|
||||
end
|
||||
end,
|
||||
-- open_mapping = [[<C-\>]], -- mapping set in mappings.lua
|
||||
hide_numbers = true, -- hide the number column in toggleterm buffers
|
||||
shade_terminals = false,
|
||||
start_in_insert = true,
|
||||
-- insert_mappings = true, -- see 'open_mapping', not set on purpose
|
||||
-- whether or not the open mapping applies in insert mode
|
||||
persist_size = true,
|
||||
direction = 'vertical',
|
||||
close_on_exit = true, -- close the terminal window when the process exits
|
||||
-- This field is only relevant if direction is set to 'float'
|
||||
float_opts = {
|
||||
border = 'single',
|
||||
winblend = 0,
|
||||
highlights = {
|
||||
border = "Normal",
|
||||
background = "Normal",
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue