Skip to content

Conversation

@tomtomjhj
Copy link
Contributor

Problem:
Error when stopping the server:
"E5560: nvim_del_user_command must not be called in a lua loop callback"

on_exit runs in :h lua-loop-callbacks and thus most vim.api functions can't be run in it.

Solution:
vim.schedule() the api calls.

Problem:
Error when stopping the server:
"E5560: nvim_del_user_command must not be called in a lua loop callback"
`on_exit` runs in `:h lua-loop-callbacks` and thus most `vim.api`
functions can't be run in it.

Solution:
`vim.schedule()` the api calls.
@github-actions
Copy link
Contributor

github-actions bot commented Mar 1, 2024

Review Checklist

Does this PR follow the Contribution Guidelines? Following is a partial checklist:

Proper conventional commit scoping:

  • For example, fix(lsp): some lsp-related bugfix

  • Pull request title has the appropriate conventional commit prefix.

If applicable:

  • Tested
    • Tests have been added.
    • Tested manually (Steps to reproduce in PR description).
  • Updated documentation.
  • Updated CHANGELOG.md

Copy link
Owner

@mrcjkb mrcjkb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Strange that I haven't encountered this myself, but lgtm 😃

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.

2 participants