Skip to content

Commit 5d70370

Browse files
author
hoapham2k2
committed
update
1 parent cb774ca commit 5d70370

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

after/ftplugin/html.lua

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
if _G.MiniSurround ~= nil then
2+
local ts_input = require('mini.surround').gen_spec.input.treesitter
3+
vim.b.minisurround_config = {
4+
custom_surroundings = {
5+
-- Tags in html parser are
6+
t = { input = ts_input({ outer = '@function.outer', inner = '@function.inner' }) },
7+
},
8+
}
9+
end

lua/keymaps.lua

-1
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,3 @@ keymap.set("n", "<C-Up>", ":resize +2<CR>", { desc = "Increase window height" })
4444
keymap.set("n", "<C-Down>", ":resize -2<CR>", { desc = "Decrease window height" })
4545
keymap.set("n", "<C-Left>", ":vertical resize +2<CR>", { desc = "Increase window width" })
4646
keymap.set("n", "<C-Right>", ":vertical resize -2<CR>", { desc = "Decrease window width" })
47-

lua/plugins/mini.lua

+12-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ return {
33
version = false,
44
config = function()
55
require("mini.diff").setup()
6-
require("mini.surround").setup()
6+
require('mini.surround').setup({
7+
custom_surroundings = {
8+
-- The `[%p%w]` is the "punctuaion+alphanumeric` part
9+
t = { input = { '<([%p%w]-)%f[^<%w][^<>]->.-</%1>', '^<.->().*()</[^/]->$' } },
10+
},
11+
})
712
require("mini.completion").setup()
813

914
------------------------------ Highlighting ------------------------------
@@ -47,7 +52,11 @@ return {
4752
)
4853

4954
------------------------------ Text objects (ai) ------------------------------
50-
local ai = require("mini.ai")
51-
ai.setup()
55+
-- local ai = require("mini.ai")
56+
-- ai.setup({
57+
-- custom_textobjects = {
58+
-- t = false,
59+
-- },
60+
-- })
5261
end,
5362
}

0 commit comments

Comments
 (0)