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: Improve nvim detection #1946
Merged
MultisampledNight
merged 5 commits into
neovide:main
from
fredizzimo:fsundvik/fix-nvim-detection
Aug 20, 2023
Merged
fix: Improve nvim detection #1946
MultisampledNight
merged 5 commits into
neovide:main
from
fredizzimo:fsundvik/fix-nvim-detection
Aug 20, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fredizzimo
force-pushed
the
fsundvik/fix-nvim-detection
branch
from
July 26, 2023 11:11
f6045c6
to
4bb4450
Compare
fredizzimo
force-pushed
the
fsundvik/fix-nvim-detection
branch
2 times, most recently
from
July 26, 2023 11:27
38f29dd
to
0c0e98a
Compare
Don't rely on the shell specific `exists", instead run `nvim -v`. Additionally, if there's unexpected output, for example if your shell is configured wrongly to output something when run in non-interactive mode, it will tell you so, instead of failing with very strange errors later. The `neovim-bin` argument has also been changed to always require the binary to exist, instead if falling back to `nvim` as that's probably not what the user wants. If `nevoim-bin` contains path separators the binary will be tried directly, otherwise `which` will be used to find the correct executable. The which command has also been changed to always use the which crate first to avoid shell specific issues (for example nushell). The output is printed directly to stderr instead of the log, for a more user friendly experience. Furthermore, the maybe disown call has been moved so that the user actually has a chance to see the errors in the console.
fredizzimo
force-pushed
the
fsundvik/fix-nvim-detection
branch
from
July 26, 2023 14:04
0c0e98a
to
1af661d
Compare
This needs testing that it still works though the macOS finder. |
This was referenced Jul 26, 2023
14 tasks
shekohex
approved these changes
Aug 4, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
LGTM |
rpanachi
approved these changes
Aug 16, 2023
This however also loses possible error messages at startup about the nvim binary not being found.
MultisampledNight
approved these changes
Aug 20, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you! Choooooooo chooooooooo! 🚂
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Don't rely on the shell specific
exists
, instead runnvim -v
. Additionally, if there's unexpected output, for example if your shell is configured wrongly to output something when run in non-interactive mode, it will tell you so, instead of failing with very strange errors later.The
neovim-bin
argument has also been changed to always require the binary to exist, instead if falling back tonvim
as that's probably not what the user wants. Ifneovim-bin
contains path separators the binary will be tried directly, otherwisewhich
will be used to find the correct executable.The which command has also been changed to always use the which crate first to avoid shell specific issues (for example nushell).
The output is printed directly to stderr instead of the log, for a more user friendly experience. Furthermore, the maybe disown call has been moved so that the user actually has a chance to see the errors in the console.
Did this PR introduce a breaking change?
A breaking change includes anything that breaks backwards compatibility either at compile or run time.
neovim-bin
it does not fallback tonvim
automaticallyFixes #1812
Fixes #1345
Fixes #1229
Fixes #1296
Fixes #1570
Fixes #1945
I think there are more issues, but I can't find any right now.