update:nvim11->12 config

This commit is contained in:
2026-04-13 21:38:27 +09:00
parent f6cb9e99f9
commit 50b410d323
22 changed files with 1093 additions and 1251 deletions

41
nvim/lua/plugins/mini.lua Normal file
View File

@@ -0,0 +1,41 @@
local M = {}
local pack = require("utils.pack")
function M.setup()
pack.add({ "mini.nvim" })
require("mini.comment").setup({
options = {
custom_commentstring = function()
local ft = vim.bo.filetype
if ft == "typescriptreact" then
return "{/* %s */}"
end
if ft == "htmldjango" then
return "{# %s #}"
end
if ft == "templ" then
return "// %s"
end
return nil
end,
},
})
vim.keymap.set("n", "<leader>cc", function()
require("mini.comment").toggle_lines(vim.fn.line("."), vim.fn.line("."))
end, { desc = "Toggle comment line" })
vim.keymap.set("v", "<leader>cc", function()
local s, e = vim.fn.line("v"), vim.fn.line(".")
if s > e then
s, e = e, s
end
require("mini.comment").toggle_lines(s, e)
end, { desc = "Toggle comment selection" })
require("mini.pairs").setup()
end
return M