From 33fc019e7adbfe8f3642bda5c616011916579dd0 Mon Sep 17 00:00:00 2001 From: ViViDboarder Date: Wed, 25 Sep 2024 15:56:39 -0700 Subject: [PATCH] Fix markdown textobj dependency Move it to be lazy on Pencil --- neovim/ftplugin/markdown.vim | 2 -- neovim/lua/lazy_plugins.lua | 11 +++++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/neovim/ftplugin/markdown.vim b/neovim/ftplugin/markdown.vim index bc6956e..ca1a07f 100644 --- a/neovim/ftplugin/markdown.vim +++ b/neovim/ftplugin/markdown.vim @@ -6,5 +6,3 @@ let g:vim_markdown_new_list_item_indent = 0 " Format frontmatter as YAML let g:vim_markdown_frontmatter = 1 - -call textobj#sentence#init() diff --git a/neovim/lua/lazy_plugins.lua b/neovim/lua/lazy_plugins.lua index 913996f..e0be1ad 100644 --- a/neovim/lua/lazy_plugins.lua +++ b/neovim/lua/lazy_plugins.lua @@ -339,6 +339,17 @@ return { -- abolish/pencil { "https://github.com/preservim/vim-pencil", + dependencies = { + { + "https://github.com/preservim/vim-textobj-sentence", + dependencies = { + { "https://github.com/kana/vim-textobj-user" }, + }, + config = function() + vim.fn["textobj#sentence#init"]() + end, + }, + }, cmd = { "Pencil" }, }, {