refactor(nvim): streamline Neovim configuration and plugin management
This commit is contained in:
1 parent
e5283a89ed
commit
963c35e67f
3 files changed
+15
-31
No files matched your search
+13
-15
@@ -33,23 +33,11 @@ function M.setup()
|
||||
end,
|
||||
}
|
||||
|
||||
-- Yazi file manager terminal
|
||||
local opencode = Terminal:new {
|
||||
cmd = "opencode",
|
||||
hidden = true,
|
||||
direction = "vertical",
|
||||
close_on_exit = true,
|
||||
on_open = function(term)
|
||||
vim.cmd "startinsert!"
|
||||
vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "<cmd>close<CR>", { noremap = true, silent = true })
|
||||
end,
|
||||
}
|
||||
|
||||
-- Scooter find and replace terminal
|
||||
local scooter = Terminal:new {
|
||||
cmd = "scooter",
|
||||
hidden = true,
|
||||
direction = "vertical",
|
||||
direction = "tab",
|
||||
on_open = function(term)
|
||||
vim.cmd "startinsert!"
|
||||
vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "<cmd>close<CR>", { noremap = true, silent = true })
|
||||
@@ -59,7 +47,17 @@ function M.setup()
|
||||
local mk = Terminal:new {
|
||||
cmd = "task",
|
||||
hidden = true,
|
||||
direction = "tab",
|
||||
direction = "horizontal",
|
||||
on_open = function(term)
|
||||
vim.cmd "startinsert!"
|
||||
vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "<cmd>close<CR>", { noremap = true, silent = true })
|
||||
end,
|
||||
}
|
||||
-- Mk (make) terminal
|
||||
local lazygit = Terminal:new {
|
||||
cmd = "lazygit",
|
||||
hidden = true,
|
||||
direction = "float",
|
||||
on_open = function(term)
|
||||
vim.cmd "startinsert!"
|
||||
vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "<cmd>close<CR>", { noremap = true, silent = true })
|
||||
@@ -68,9 +66,9 @@ function M.setup()
|
||||
|
||||
-- Export toggle functions to module instead of global namespace
|
||||
M.claude_toggle = function() claude:toggle() end
|
||||
M.opencode_toggle = function() opencode:toggle() end
|
||||
M.scooter_toggle = function() scooter:toggle() end
|
||||
M.mk_toggle = function() mk:toggle() end
|
||||
M.lazygit_toggle = function() lazygit:toggle() end
|
||||
end
|
||||
|
||||
return M
|
||||
@@ -152,14 +152,8 @@ return {
|
||||
desc = "GH Dash",
|
||||
},
|
||||
["<C-g><C-g>"] = {
|
||||
function()
|
||||
require("snacks").terminal("lazygit", {
|
||||
hidden = true,
|
||||
auto_close = true,
|
||||
interactive = true,
|
||||
})
|
||||
end,
|
||||
desc = "Lazygit",
|
||||
terminals.lazygit_toggle,
|
||||
desc = "Lazygit Toggle",
|
||||
},
|
||||
["<C-g><C-i>"] = { "<cmd>Octo issue list<CR>", desc = "List Issues" },
|
||||
["<C-g><C-l>"] = { "<cmd>Octo label<CR>", desc = "Manage Labels" },
|
||||
|
||||
@@ -201,14 +201,6 @@ return {
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- React/JSX snippets and helpers
|
||||
{
|
||||
"dsznajder/vscode-es7-react-js-snippets",
|
||||
build = "yarn install --frozen-lockfile && yarn compile",
|
||||
ft = { "javascript", "typescript", "javascriptreact", "typescriptreact" },
|
||||
},
|
||||
|
||||
-- Auto-close and auto-rename JSX tags
|
||||
{
|
||||
"windwp/nvim-ts-autotag",
|
||||
|
||||
Reference in new issue
Block a user