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

Update all the things for 0.6 #283

Merged
merged 5 commits into from
Dec 8, 2021
Merged

Conversation

ckipp01
Copy link
Member

@ckipp01 ckipp01 commented Dec 6, 2021

NOTE: That when this pr is merged, 0.6 will be the new required default for nvim-metals.

  • vim.fn.input -> vim.ui.input
  • vim.fn.inputlist -> vim.ui.select (NOTE: We won't be able to use this.)
  • Remove the handler wrapper that makes both 0.5 and 0.6 handers work
  • Update docs to make sure people know 0.6 is the new required version

So we ended up not being able to use vim.ui.select where I thought we'd be able to. It's not recommended to use it in places were a return value is needed since it's call back based. The tricky part is that the default implementation in core is blocking, so it will work here, but then when you using an async plugin like telescope, it won't work. Since it's not safe to use that there we don't use it. Same goes with vim.ui.input in places where a return values us needed, like in a LSP server request.

This is a breaking change for anyone that was overriding handlers in the
old 0.5 way of doing them. Please see this for more details:

neovim/neovim#15504

Keep in mind that the new format for hanlders is:

```
function(err, result, context, config)
```
This may be a breaking change for some.
@ckipp01 ckipp01 marked this pull request as ready for review December 8, 2021 17:45
@ckipp01 ckipp01 merged commit 0db1391 into scalameta:main Dec 8, 2021
@ckipp01 ckipp01 deleted the everyoneGetOn06 branch December 8, 2021 17:49
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.

1 participant