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

fix(ui): check nil for buffer_state #172

Conversation

xudyang1
Copy link
Contributor

Fixes #171

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@MeanderingProgrammer
Copy link
Owner

This is a consequence of running setup in a vim.schedule.

I'll merge this in as it's straightforward but it is possible that other edge cases will arise as a result of this way of running the plugin, and I will not go out of my way to support it.

@MeanderingProgrammer MeanderingProgrammer merged commit 9f2fb6c into MeanderingProgrammer:main Sep 18, 2024
@xudyang1
Copy link
Contributor Author

This is a consequence of running setup in a vim.schedule.

I'll merge this in as it's straightforward but it is possible that other edge cases will arise as a result of this way of running the plugin, and I will not go out of my way to support it.

Thank you for the addtional information. I also tried require("redner-markdown").setup(opts) directly without vim.schedule, and it does not add any performance overhead. This plugins already does lazy loading as it wraps vim.treesitter.query.parses with vim.schedule in state.lua.

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

Successfully merging this pull request may close these issues.

bug: attempt to index local 'buffer_state' ( a nil value)
2 participants