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

Doesn't work at AstronVim 3.0 with Lazy plugin manager #11

Open
alexveden opened this issue May 20, 2023 · 1 comment
Open

Doesn't work at AstronVim 3.0 with Lazy plugin manager #11

alexveden opened this issue May 20, 2023 · 1 comment

Comments

@alexveden
Copy link
Contributor

I was trying to upgrade AstronVim to new 3.0, apparently they switched from Packer to Lazy plugin manager.

My setup:

:TSConfigInfo
 pyfold = {
      custom_foldtext = true,
      disable = {},
      enable = true,
      loaded = true,
      module_path = "nvim-treesitter-pyfold.folding"
    }
:set foldmethod?
  foldmethod=expr
:set foldexpr?
  foldexpr=nvim_treesitter#foldexpr()
:set foldtext?
  foldtext=nvim_treesitter_pyfold#foldtext()

PyFold's M.attach() method is called successfully, but no folds produced by the plugin at all, also M.foldtext() has never being called.

If I disable nvim-treesitter-pyfold original TS folds are working.

p.s. With the new Lazy plugin manager there was an issue with loading folds.scm at this line, but even after patch, PyFold still doesn't work. Vim rtp pattern was not found (weird!). What do you think this could be a root cause?

Any ideas on debugging appreciated.

@alexveden
Copy link
Contributor Author

I believe I've found the issue:

fold_query = fold_query:gsub('fold', 'foldopen')

https://github.com/eddiebergman/nvim-treesitter-pyfold/blame/master/lua/nvim-treesitter-pyfold/folding.lua#L36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant