Add ToggleTerm
This commit is contained in:
@ -1,20 +1,20 @@
|
||||
{
|
||||
"CopilotChat.nvim": { "branch": "main", "commit": "4d9256418ca276b294f3e00445aa0d6faec4c1ea" },
|
||||
"LazyVim": { "branch": "main", "commit": "a65d5d530d372b39a468dfbb2ce633f344770c5c" },
|
||||
"SchemaStore.nvim": { "branch": "main", "commit": "960a5cf992c033170499ccc7003df59734ed40a8" },
|
||||
"CopilotChat.nvim": { "branch": "main", "commit": "94dfc019f86659d3aeee54d5f1999f4c93a35aa6" },
|
||||
"LazyVim": { "branch": "main", "commit": "0329bc0e508eb48f7cee7fe57975c364584f8738" },
|
||||
"SchemaStore.nvim": { "branch": "main", "commit": "54994d58c2bc9260908a6c59e8698e9629098389" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||
"catppuccin": { "branch": "main", "commit": "af58927c55c9f3272c940ff02b3cee94a1249f26" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "bd5a7d6db125d4654b50eeae9f5217f24bb22fd3" },
|
||||
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
|
||||
"codeium.nvim": { "branch": "main", "commit": "821b570b526dbb05b57aa4ded578b709a704a38a" },
|
||||
"conform.nvim": { "branch": "master", "commit": "235dd79731c1dc51ec04abb4045cbc54727a172a" },
|
||||
"conform.nvim": { "branch": "master", "commit": "9fd3d5e0b689ec1bf400c53cbbec72c6fdf24081" },
|
||||
"flash.nvim": { "branch": "main", "commit": "3be9bf7e85550045ec576379a0c45aac144d0438" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "20ad4419564d6e22b189f6738116b38871082332" },
|
||||
"grug-far.nvim": { "branch": "main", "commit": "3e72397465f774b01aa38e4fe8e6eecf23d766d9" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "e28ce52fc7ff79fcb76f0e79ee6fb6182fca90b9" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "db067881fff0fd4be8c00e5bde7492e0e1c77a2f" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "01bc2aacd51cf9021eb19d048e70ce3dd09f7f93" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "3946f0122255bc377d14a59b27b609fb3ab25768" },
|
||||
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "2304ff65ecc8cb2afc2484de3e2ed9a407edf0b9" },
|
||||
@ -22,25 +22,26 @@
|
||||
"mini.ai": { "branch": "main", "commit": "11c57180bc9084089206e211ac7aa598bedc9673" },
|
||||
"mini.icons": { "branch": "main", "commit": "284798619aed9f4c1ac1b9417b9a5e3b4b85ef3a" },
|
||||
"mini.pairs": { "branch": "main", "commit": "b9aada8c0e59f2b938e98fbf4eae0799eba96ad9" },
|
||||
"neo-tree.nvim": { "branch": "main", "commit": "e1d464a45a2ff8328d3973e0f9737a81c3b42bf6" },
|
||||
"neo-tree.nvim": { "branch": "main", "commit": "0d0b29a529216d41173c9c5c8a8f484db5b891ba" },
|
||||
"noice.nvim": { "branch": "main", "commit": "c86aea584d98be7ee1167ce4d4ef946fbd7f3ae0" },
|
||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "a7bcf1d88069fc67c9ace8a62ba480b8fe879025" },
|
||||
"nvim-jdtls": { "branch": "master", "commit": "380ac148f989e1291aac002dc959ecc68c5243d0" },
|
||||
"nvim-lint": { "branch": "master", "commit": "9da1fb942dd0668d5182f9c8dee801b9c190e2bb" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "e5c61b02f33b5c6538be25b2696b33b4cc91e667" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "ececa531ecae813422697b5ef627a11cc964c2a7" },
|
||||
"nvim-snippets": { "branch": "main", "commit": "56b4052f71220144689caaa2e5b66222ba5661eb" },
|
||||
"nvim-treesitter": { "branch": "main", "commit": "30c466ad571b8b99fd06e3df8b2336e3ae63a53a" },
|
||||
"nvim-treesitter": { "branch": "main", "commit": "8fecb462580ec0794a803b1d6ff9e2c4896c3e6f" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "ec308c7827b5f8cb2dd0ad303a059c945dd21969" },
|
||||
"nvim-treesitter-textobjects": { "branch": "main", "commit": "1b2d85d3de6114c4bcea89ffb2cd1ce9e3a19931" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "c4ca798ab95b316a768d51eaaaee48f64a4a46bc" },
|
||||
"persistence.nvim": { "branch": "main", "commit": "51eef57272742b773468949f6bd0503ec3f83874" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"render-markdown.nvim": { "branch": "main", "commit": "475d3ad8cae486b0df6fc6050cf5b5ea1de42db8" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "471eb036c47abf9e71c33b9e01ebb1b2d464b791" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "277ba028b3b764ee49c9be8fd4d1282aff86812a" },
|
||||
"tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "3d3cd95e4a4135c250faf83dd5ed61b8e5502b86" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "19d461ddd543e938eb22505fb03fa878800270b6" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "8734a4e9a9b03549337faf5a86637abd5e16721e" },
|
||||
"toggleterm.nvim": { "branch": "main", "commit": "9a88eae817ef395952e08650b3283726786fb5fb" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "545d72cde6400835d895160ecb5853874fd5156d" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "c098362fe603d3922095e7db595961e020bdf2d0" },
|
||||
"ts-comments.nvim": { "branch": "main", "commit": "217ab9cc137fceb6659b53790bd25e608219abe1" },
|
||||
"vim-dadbod": { "branch": "master", "commit": "e95afed23712f969f83b4857a24cf9d59114c2e6" },
|
||||
|
||||
100
lua/plugins/toggleterm.lua
Normal file
100
lua/plugins/toggleterm.lua
Normal file
@ -0,0 +1,100 @@
|
||||
return {
|
||||
{
|
||||
"akinsho/toggleterm.nvim",
|
||||
lazy = true,
|
||||
cmd = { "ToggleTerm" },
|
||||
keys = {
|
||||
{
|
||||
"<leader>Tf",
|
||||
function()
|
||||
local count = vim.v.count1
|
||||
require("toggleterm").toggle(count, 0, LazyVim.root.get(), "float")
|
||||
end,
|
||||
desc = "ToggleTerm (float root_dir)",
|
||||
},
|
||||
{
|
||||
"<leader>Th",
|
||||
function()
|
||||
local count = vim.v.count1
|
||||
require("toggleterm").toggle(count, 15, LazyVim.root.get(), "horizontal")
|
||||
end,
|
||||
desc = "ToggleTerm (horizontal root_dir)",
|
||||
},
|
||||
{
|
||||
"<leader>Tv",
|
||||
function()
|
||||
local count = vim.v.count1
|
||||
require("toggleterm").toggle(count, vim.o.columns * 0.4, LazyVim.root.get(), "vertical")
|
||||
end,
|
||||
desc = "ToggleTerm (vertical root_dir)",
|
||||
},
|
||||
{
|
||||
"<leader>Tn",
|
||||
"<cmd>ToggleTermSetName<cr>",
|
||||
desc = "Set term name",
|
||||
},
|
||||
{
|
||||
"<leader>Ts",
|
||||
"<cmd>TermSelect<cr>",
|
||||
desc = "Select term",
|
||||
},
|
||||
{
|
||||
"<leader>Tt",
|
||||
function()
|
||||
require("toggleterm").toggle(1, 100, LazyVim.root.get(), "tab")
|
||||
end,
|
||||
desc = "ToggleTerm (tab root_dir)",
|
||||
},
|
||||
{
|
||||
"<leader>TT",
|
||||
function()
|
||||
require("toggleterm").toggle(1, 100, vim.loop.cwd(), "tab")
|
||||
end,
|
||||
desc = "ToggleTerm (tab cwd_dir)",
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
-- 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-\>]],
|
||||
-- on_open = fun(t: Terminal), -- function to run when the terminal opens
|
||||
-- on_close = fun(t: Terminal), -- function to run when the terminal closes
|
||||
-- on_stdout = fun(t: Terminal, job: number, data: string[], name: string) -- callback for processing output on stdout
|
||||
-- on_stderr = fun(t: Terminal, job: number, data: string[], name: string) -- callback for processing output on stderr
|
||||
-- on_exit = fun(t: Terminal, job: number, exit_code: number, name: string) -- function to run when terminal process exits
|
||||
hide_numbers = true, -- hide the number column in toggleterm buffers
|
||||
shade_filetypes = {},
|
||||
shade_terminals = true,
|
||||
-- shading_factor = '<number>', -- the degree by which to darken to terminal colour, default: 1 for dark backgrounds, 3 for light
|
||||
start_in_insert = true,
|
||||
insert_mappings = true, -- whether or not the open mapping applies in insert mode
|
||||
terminal_mappings = true, -- whether or not the open mapping applies in the opened terminals
|
||||
persist_size = true,
|
||||
direction = "horizontal" or "vertical" or "window" or "float",
|
||||
-- direction = "vertical",
|
||||
close_on_exit = true, -- close the terminal window when the process exits
|
||||
-- shell = vim.o.shell, -- change the default shell
|
||||
-- This field is only relevant if direction is set to 'float'
|
||||
-- float_opts = {
|
||||
-- -- The border key is *almost* the same as 'nvim_open_win'
|
||||
-- -- see :h nvim_open_win for details on borders however
|
||||
-- -- the 'curved' border is a custom border type
|
||||
-- -- not natively supported but implemented in this plugin.
|
||||
-- border = 'single' or 'double' or 'shadow' or 'curved',
|
||||
-- width = <value>,
|
||||
-- height = <value>,
|
||||
-- winblend = 3,
|
||||
-- highlights = {
|
||||
-- border = "Normal",
|
||||
-- background = "Normal",
|
||||
-- }
|
||||
-- }
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user