Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Telescope extension doesn't work after neovim update #89

Closed
4 tasks done
ales-tsurko opened this issue Oct 22, 2023 · 4 comments
Closed
4 tasks done

[Bug]: Telescope extension doesn't work after neovim update #89

ales-tsurko opened this issue Oct 22, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@ales-tsurko
Copy link

Your Persisted.nvim config

vim.opt.sessionoptions = { -- required
    "buffers",
    "curdir",
    "folds",
    "globals",
    "resize",
    "tabpages",
    "winsize",
}

require("persisted").setup({
  follow_cwd = false, -- change session file name to match current working directory if it changes
})

require("telescope").load_extension("persisted")

-- define a command to close sesssion
function SessionClose()
    cmd[[SessionStop]]
    cmd[[%bd!]]
    cmd[[cd]]
end

cmd[[command! -nargs=0 SessionClose lua SessionClose()]]

-- auto save/load scope

require("scope").setup({})

local group = vim.api.nvim_create_augroup("PersistedHooks", {})

vim.api.nvim_create_autocmd({ "User" }, {
  pattern = "PersistedSavePost",
  group = group,
  callback = function()
    cmd[[ScopeSaveState]]
  end,
})

vim.api.nvim_create_autocmd({ "User" }, {
  pattern = "PersistedLoadPost",
  group = group,
  callback = function()
    cmd[[ScopeLoadState]]
    cmd[[e]]
  end,
})

Error messages

Error executing Lua callback: ...share/nvim/lazy/telescope.nvim/lua/telescope/pickers.lua:347: Invalid 'event': 'User TelescopeFindPre'
stack traceback:
        [C]: in function 'nvim_exec_autocmds'
        ...share/nvim/lazy/telescope.nvim/lua/telescope/pickers.lua:347: in function 'find'
        ...y/persisted.nvim/lua/telescope/_extensions/persisted.lua:40: in function <...y/persisted.nvim/lua/telescope/_extensions/persisted.lua:11>
        ...share/nvim/lazy/telescope.nvim/lua/telescope/command.lua:193: in function 'run_command'
        ...share/nvim/lazy/telescope.nvim/lua/telescope/command.lua:253: in function 'load_command'
        ...ocal/share/nvim/lazy/telescope.nvim/plugin/telescope.lua:108: in function <...ocal/share/nvim/lazy/telescope.nvim/plugin/telescope.lua:107>

Describe the bug

Calling :Telescope persisted produces an error mentioned above. Previously worked fine, but started to happen after neovim update.

Reproduce the bug

No response

Final checks

  • I have made sure this issue exists in the latest version of the plugin
  • I have tested with the minimal.lua config file above and still get the issue
  • I have used SessionSave to save the session before restarting Neovim and using SessionLoad
  • I have made sure this is not a duplicate issue
@ales-tsurko ales-tsurko added the bug Something isn't working label Oct 22, 2023
@olimorris
Copy link
Owner

Can you create a minimal.lua file for me to test please?

@ales-tsurko
Copy link
Author

Looks like it's actually an issue with Telescope

@olimorris
Copy link
Owner

Are you on Neovim 0.10?

@ales-tsurko
Copy link
Author

0.9.4

I had 0.1.1 tag specified in my config for Telescope. Switching it to branch 0.1.* fixed the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants