Something went wrong. Try again.
Vim/Neovim configurations just for me
neovim
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667local insx = require("insx")local standard = require("insx.preset.standard")
-- markdown `.insx.add("`", { enabled = function(ctx) return ctx.match([[`\%#`]]) and ctx.filetype == "markdown" end, action = function(ctx) ctx.send("``<Left>") ctx.send("``<Left>") end,})insx.add( "<CR>", require("insx.recipe.fast_break")({ open_pat = [[```\w*]], close_pat = "```", indent = 0, }))
-- html tag like.insx.add( "<CR>", require("insx.recipe.fast_break")({ open_pat = insx.helper.search.Tag.Open, close_pat = insx.helper.search.Tag.Close, }))
-- quotesstandard.set_quote("i", "`")standard.set_quote("i", '"', { { enabled = function(enabled, ctx) local disabled_filetypes = { sql = true, } return enabled(ctx) and disabled_filetypes[ctx.filetype] == nil end, },})standard.set_quote("i", "'", { { enabled = function(enabled, ctx) local disabled_filetypes = { rust = true, } return enabled(ctx) and disabled_filetypes[ctx.filetype] == nil end, },})for _, quote in ipairs({ '"', "'", "`" }) do standard.set_quote("c", quote)end
-- pairsfor open, close in pairs({ ["("] = ")", ["["] = "]", ["{"] = "}",}) do standard.set_pair("i", open, close) standard.set_pair("c", open, close)end