fix: addet keymaps for cmdline directly into the plugin file

This commit is contained in:
pika 2025-03-17 18:57:09 +01:00
parent 600a7163fa
commit d803c6ad53
2 changed files with 35 additions and 4 deletions

View file

@ -16,10 +16,6 @@ map("n", "<Esc>", "<cmd>nohlsearch<CR>")
map("n", "<S-c>", "gcc", { desc = "comment toggle", remap = true })
map("v", "<S-c>", "gc", { desc = "comment toggle", remap = true })
-- ─< cmd line >────────────────────────────────────────────────────────────────────────
vim.api.nvim_set_keymap("n", ":", "<cmd>FineCmdline<CR>", { noremap = true })
map("n", "T", "<cmd>FineCmdline<CR>")
-- ─< Terminal >────────────────────────────────────────────────────────────────────────
map("t", "<C-x>", "<C-\\><C-N>", { desc = "terminal escape terminal mode" })

View file

@ -51,6 +51,41 @@ return {
vim.keymap.set("n", "<S-Tab>", "<cmd>BufferLineCyclePrev<CR>")
end,
},
-- ╭───────────────────────────────────╮
-- │ cmdline - for nice command inputs │
-- ╰───────────────────────────────────╯
{
"VonHeikemen/fine-cmdline.nvim",
dependencies = {
{ "MunifTanjim/nui.nvim" },
},
config = function()
require("fine-cmdline").setup({
cmdline = {
enable_keymaps = true,
smart_history = true,
prompt = "",
},
popup = {
position = {
row = "10%",
col = "50%",
},
size = {
width = "60%",
},
border = {
style = "rounded",
},
win_options = {
winhighlight = "Normal:Normal,FloatBorder:FloatBorder",
},
},
})
end,
vim.api.nvim_set_keymap("n", ":", "<cmd>FineCmdline<CR>", { noremap = true }),
vim.keymap.set("n", "T", "<cmd>FineCmdline<CR>"),
},
-- ╭───────────────────────────────────────╮
-- │ barbecue - for a nice breadcrump menu │