toggleterm执行外部exe测试。
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "ad7d9580338354ccc136e5b8f0aa4f880434dcdc" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
|
||||
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "5da1b76e64daf4c5d410f06bcb6b9cb640da7dfd" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
|
||||
"ts-comments.nvim": { "branch": "main", "commit": "123a9fb12e7229342f807ec9e6de478b1102b041" },
|
||||
|
||||
@@ -1,3 +1,24 @@
|
||||
-- Keymaps are automatically loaded on the VeryLazy event
|
||||
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
||||
-- Add any additional keymaps here
|
||||
--
|
||||
--
|
||||
--
|
||||
local Terminal = require("toggleterm.terminal").Terminal
|
||||
|
||||
-- 测试外部命令。
|
||||
local dir_term = Terminal:new({
|
||||
cmd = "cmd.exe /c dir",
|
||||
direction = "float",
|
||||
float_opts = {
|
||||
border = "rounded",
|
||||
width = 100,
|
||||
height = 30,
|
||||
},
|
||||
hidden = false,
|
||||
close_on_exit = false,
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<Leader>mt", function()
|
||||
dir_term:toggle()
|
||||
end, { desc = "List directory contents" })
|
||||
|
||||
4
lua/plugins/toggleterm.lua
Normal file
4
lua/plugins/toggleterm.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
-- amongst your other plugins
|
||||
{ "akinsho/toggleterm.nvim", version = "*", config = true },
|
||||
}
|
||||
Reference in New Issue
Block a user