49 lines
1.3 KiB
Lua
49 lines
1.3 KiB
Lua
return {
|
|
-- Commenting
|
|
{
|
|
"numToStr/Comment.nvim",
|
|
event = { "BufReadPre", "BufNewFile" },
|
|
opts = {},
|
|
},
|
|
|
|
-- Surround text objects
|
|
{
|
|
"kylechui/nvim-surround",
|
|
version = "*",
|
|
event = "VeryLazy",
|
|
opts = {},
|
|
},
|
|
|
|
-- Flash motions
|
|
{
|
|
"folke/flash.nvim",
|
|
event = "VeryLazy",
|
|
opts = {},
|
|
keys = {
|
|
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
|
{ "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
|
|
},
|
|
},
|
|
|
|
-- Auto-pairs
|
|
{
|
|
"windwp/nvim-autopairs",
|
|
event = "InsertEnter",
|
|
opts = {
|
|
check_ts = true,
|
|
ts_config = {
|
|
lua = { "string", "source" },
|
|
javascript = { "string", "template_string" },
|
|
typescript = { "string", "template_string" },
|
|
},
|
|
disable_filetype = { "TelescopePrompt", "spectre_panel" },
|
|
},
|
|
config = function(_, opts)
|
|
require("nvim-autopairs").setup(opts)
|
|
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
|
local cmp = require("cmp")
|
|
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
|
end,
|
|
},
|
|
}
|