これはvim駅伝3/6の 記事 です
Bunsetsu-wb.nvimはBunsetsu.vimをw
,e
,b
と自然に使うためのインテグレーションプラグインです。
return {
"ryoppippi/bunsetsu-wb.nvim",
dependencies = {
{ "ryoppippi/bunsetsu.vim" },
{ "vim-denops/denops.vim" },
{ "yuki-yano/denops-lazy.nvim" },
{ "echasnovski/mini.ai", version = "*" },
{ "uga-rosa/utf8.nvim" }
},
keys = {
{ "w", function() require("bunsetsu_wb").w() end, { "n", "v" }},
{ "b", function() require("bunsetsu_wb").b() end, { "n", "v" }},
-- { "e", function() require("bunsetsu_wb").e() end, { "n", "v" }},
},
init = function()
require("mini.ai").setup({
custom_textobjects = {
["w"] = function()
local CWORD = require("bunsetsu_wb").getCWORD()
local line = vim.fn.line(".")
return { from = { line = line, col = CWORD.col }, to = { line = line, col = CWORD.colend } }
end,
},
})
end,
}
- eが動かないので修正
- Vimscript版の実装
- テストの実装
- ドキュメントの充実
MIT
Ryotaro "Justin" Kimura (a.k.a. ryoppippi)