Skip to content

Commit

Permalink
refactor: mini
Browse files Browse the repository at this point in the history
  • Loading branch information
outragedline committed Jan 18, 2025
1 parent a2febf1 commit 9d7734d
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 38 deletions.
69 changes: 38 additions & 31 deletions lua/fastvim/configs/mini.lua
Original file line number Diff line number Diff line change
@@ -1,33 +1,40 @@
require('mini.pairs').setup({
modes = { insert = true, command = false, terminal = false },
mappings = {
['('] = { action = 'open', pair = '()', neigh_pattern = '[^\\].' },
['['] = { action = 'open', pair = '[]', neigh_pattern = '[^\\].' },
['{'] = { action = 'open', pair = '{}', neigh_pattern = '[^\\].' },
[')'] = { action = 'close', pair = '()', neigh_pattern = '[^\\].' },
[']'] = { action = 'close', pair = '[]', neigh_pattern = '[^\\].' },
['}'] = { action = 'close', pair = '{}', neigh_pattern = '[^\\].' },
},
})
return {
"echasnovski/mini.nvim",
version = "*",
config = function()
require("mini.pairs").setup {

require('mini.comment').setup({
modes = { insert = true, command = false, terminal = false },
mappings = {
["("] = { action = "open", pair = "()", neigh_pattern = "[^\\]." },
["["] = { action = "open", pair = "[]", neigh_pattern = "[^\\]." },
["{"] = { action = "open", pair = "{}", neigh_pattern = "[^\\]." },
[")"] = { action = "close", pair = "()", neigh_pattern = "[^\\]." },
["]"] = { action = "close", pair = "[]", neigh_pattern = "[^\\]." },
["}"] = { action = "close", pair = "{}", neigh_pattern = "[^\\]." },
},
}

require("mini.comment").setup {
options = {
custom_commentstring = nil,

ignore_blank_line = false,
start_of_line = false,
pad_comment_parts = true,
},

mappings = {
comment = 'gc',
comment_line = 'gcc',
comment_visual = 'gc',
textobject = 'gc',
},

hooks = {
pre = function() end,
post = function() end,
},
})
custom_commentstring = nil,

ignore_blank_line = false,
start_of_line = false,
pad_comment_parts = true,
},

mappings = {
comment = "gc",
comment_line = "gcc",
comment_visual = "gc",
textobject = "gc",
},

hooks = {
pre = function() end,
post = function() end,
},
}
end,
}
8 changes: 1 addition & 7 deletions lua/fastvim/plugins/init.lua
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
return {
{
"echasnovski/mini.nvim",
version = "*",
config = function()
require("fastvim.configs.mini")
end,
},
{
"BrunoCiccarino/nekonight",
lazy = false,
otps = {},
},
require "fastvim.configs.plenary",
require "fastvim.configs.mini",

{
"akinsho/toggleterm.nvim",
Expand Down

0 comments on commit 9d7734d

Please sign in to comment.