refactor(nvim): simplify Neovim configuration with selene

This commit is contained in:
Prad Nukala committed 2025-10-13 13:48:20 -04:00
1 parent 9859b36075
commit e7da050111
2 files changed
+2 -9

No files matched your search

+2 -2
View File
@@ -37,7 +37,7 @@ function M.setup()
local opencode = Terminal:new { local opencode = Terminal:new {
cmd = "opencode", cmd = "opencode",
hidden = true, hidden = true,
direction = "tab", direction = "vertical",
close_on_exit = true, close_on_exit = true,
on_open = function(term) on_open = function(term)
vim.cmd "startinsert!" vim.cmd "startinsert!"
@@ -59,7 +59,7 @@ function M.setup()
local mk = Terminal:new { local mk = Terminal:new {
cmd = "mk -t", cmd = "mk -t",
hidden = true, hidden = true,
direction = "vertical", direction = "horizontal",
on_open = function(term) on_open = function(term)
vim.cmd "startinsert!" vim.cmd "startinsert!"
vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "<cmd>close<CR>", { noremap = true, silent = true }) vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "<cmd>close<CR>", { noremap = true, silent = true })
-7
View File
@@ -434,13 +434,6 @@ return {
desc = "Exit terminal and close window", desc = "Exit terminal and close window",
}, },
-- Exit terminal mode and close window -- Exit terminal mode and close window
["<C-c>"] = {
function()
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes([[<C-\><C-n>]], true, false, true), "n", false)
vim.cmd "close"
end,
desc = "Exit terminal and close window",
},
["<C-h>"] = { ["<C-h>"] = {
function() function()
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes([[<C-\><C-n><C-w>h]], true, false, true), "n", false) vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes([[<C-\><C-n><C-w>h]], true, false, true), "n", false)