tani / vim-jetpack

The lightning-fast plugin manager, alternative to vim-plug
https://gist.asciidoctor.org/?github-tani/vim-jetpack/main//README.adoc&source-highlighter=highlightjs
MIT License
323 stars 32 forks source link

nvim-surround does not work #119

Closed yusei-wy closed 1 year ago

yusei-wy commented 1 year ago

After installing nvim-surround with vim-jetpack, commands like cs ds did not work. (Only ci worked)

I switched the plugin manager to Packer and it worked, so it seems that vim-jetpack is affecting something. Is it possible to fix it?

vim.cmd('packadd vim-jetpack')
require('jetpack.packer').add {
    {'tani/vim-jetpack', opt = 1}, -- bootstrap

    {'cohama/lexima.vim'},
    {'airblade/vim-gitgutter'},
    {'kylechui/nvim-surround'}, -- not working
}
tani commented 1 year ago

Hello there! Thank you for using this plugin manager.

This issue usually occurs with Lua-implemented plugins, including nvim-surround and other nvim plugins. I apologize for any inconvenience this may have caused. It's possible that you might encounter a similar issue with other plugin managers, as most nvim plugins require calling the require('plugin-name').setup() method to enable them. However, no plugin manager executes this function automatically, so you need to do it separately.

For example, in vim-jetpack, you can add the following code to your configuration:

{ 'kylechui/nvim-surround',
  config = function()
    require('nvim-surround').setup({})
  end },

I hope this resolves the issue for you. Best regards.

yusei-wy commented 1 year ago

Thank you very much! I was able to get nvim-surround to work using the method you taught me!