no-neck-pain.nvim icon indicating copy to clipboard operation
no-neck-pain.nvim copied to clipboard

Doesn't work with persisted.nvim

Open okkdev opened this issue 9 months ago • 1 comments

Description

When I use NoNeckPain and exit neovim. Next time I open nvim, persisted.nvim should load my last session, but it instead opens the neovim start page. I'm not sure if this is an issue with NoNeckPain or Persisted. If it's something with Persisted I'll gladly report it over there. :)

Steps to reproduce

Installed persisted.nvim with autoload enabled.

  1. nvim
  2. open a file
  3. :NoNeckPain
  4. :q
  5. nvim

Expected behavior

Should open the last opened file at the same position.

Environment

  • Neovim version: Nightly v0.10.0-dev-c795835
  • no-neck-pain.nvim version: commit 34625be12649666b7ccb08761087cc97bb788552

okkdev avatar May 15 '24 08:05 okkdev

Okay seems to be more Persisted related. When I enable scratch pads, persisted reopens that.

I guess I'll have to teach persisted how to ignore them.

Tried this, but doesn't work:

vim.api.nvim_create_autocmd("User", {
  pattern = "PersistedSavePre", 
  callback = function
    require("no-neck-pain").disable()
  end
}) 

okkdev avatar May 15 '24 10:05 okkdev

I asked the question in the persisted.nvim discussions: https://github.com/olimorris/persisted.nvim/discussions/128

okkdev avatar May 15 '24 12:05 okkdev

Thanks a lot for using the plugin @okkdev and investigating the issue, if there is any help needed on my side don't hesitate to ping!

shortcuts avatar May 15 '24 21:05 shortcuts