Load Possession plugin using NvChad

81 Views Asked by At

I am trying to load Possession plugin for NvChad. I have tried following this guide and I have read the docs. When doing :Lazy and after S-I to install the package, it seems to be present but when I try to use :PossessionSave I get E492: Not an editor command. I am new to both nvim and NvChad and I feel I am missing something quite obvious. Any help appreciated.

My custom/plugins.lua looks like this:

{
   'jedrzejboczar/possession.nvim',
}

because plenary.nvim is installed by default.

I have tried:

{
   'jedrzejboczar/possession.nvim',
   config = function()
      require('possession').setup()
   end,
}

but it doesn't seem to work either.

1

There are 1 best solutions below

0
fatm On

Quite embarrassing but it was a very simple solution:

{
   'jedrzejboczar/possession.nvim',
   cmd ={"SSave", "SLoad", "SShow"}
   config = function()
      require('possession').setup {
      save = "SSave",
      load = "SLoad",
      show = "SShow",
   }
   end,
}

That is, omit () after .setup; you MUST include one of ft, cmd, keys, event if you want the plugin to lazy load else you MUST include lazy=false. Or at least that's how it seems to me. I have changed the default commands.