How to Load Vim Plugins in Nvim #1184
-
Can anyone provide some guidance on how to load a vim plugin installed with packer in Neovim? Up till now, I've only ever used plugins written in Lua in Nvim but, I'm trying to install vim-expand-region which is written in Vim Script. I added My current config is organized like this:
As described in the nanotee guide, to load a .lua plugin, I run local status_ok, plugin = pcall(require, "plugin")
if not status_ok then
vim.notify("WARNING: plugin.lua failed to load.")
return
end As I understand it, the require function searches the runtime path looking for a file called "plugin.lua" to load. In my case, my runtime path includes However, the vim plugin vim-expand-region has this structure:
Vim configs that use the Plug package manager load the plugin with a line like From some of the instructions listed here it seems like the expand_region.vim file needs to be sourced. For vim it seems like the plugin should be added to What is the best way to load vim plugins that have been installed with Packer? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Note to self, any Vim plugins installed with Packer should be sourced automatically. As I discovered in this thread the plugin itself seems to be broken. |
Beta Was this translation helpful? Give feedback.
Note to self, any Vim plugins installed with Packer should be sourced automatically. As I discovered in this thread the plugin itself seems to be broken.