mirror of
https://github.com/kogakure/dotfiles.git
synced 2026-02-03 12:15:29 +00:00
feat(nvim): replace custom text object function with plugin
This commit is contained in:
4
nvim/after/plugin/various-textobjs.lua
Normal file
4
nvim/after/plugin/various-textobjs.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
-- https://github.com/chrisgrieser/nvim-various-textobjs
|
||||
require("various-textobjs").setup({
|
||||
useDefaultKeymaps = true,
|
||||
})
|
||||
@@ -7,4 +7,3 @@ require("kogakure.plugins")
|
||||
require("kogakure.lsp")
|
||||
|
||||
require("kogakure/text-objects").basic_text_objects()
|
||||
require("kogakure/text-objects").indent_text_objects()
|
||||
|
||||
@@ -60,21 +60,6 @@ function Select_indent(around)
|
||||
end
|
||||
end
|
||||
|
||||
-- Indent Text Object
|
||||
function Indent_text_objects()
|
||||
for _, mode in ipairs({ "x", "o" }) do
|
||||
keymap(mode, "ii", ":<c-u>lua Select_indent()<cr>", {
|
||||
noremap = true,
|
||||
silent = true,
|
||||
})
|
||||
keymap(mode, "ai", ":<c-u>lua Select_indent(true)<cr>", {
|
||||
silent = true,
|
||||
noremap = true,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
return {
|
||||
basic_text_objects = Basic_text_objects,
|
||||
indent_text_objects = Indent_text_objects,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user