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

feat: add firstMatch option for findNvim #397

Merged
merged 3 commits into from
Sep 20, 2024
Merged

feat: add firstMatch option for findNvim #397

merged 3 commits into from
Sep 20, 2024

Conversation

gjf7
Copy link
Contributor

@gjf7 gjf7 commented Sep 19, 2024

Closes #370 and #267

Introducing a new 'stopOnFirstMatch' option for the findNvim function, which helps reduce the number of system calls when the caller only need one valid match. Additionally, the search now includes common locations where Neovim might be installed.

Copy link
Member

@justinmk justinmk left a comment

Choose a reason for hiding this comment

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

LGTM after naming nit. Thanks!

Future improvement would be to add Windows paths. And to allow the caller to pass specific paths (both directories and files) to search.

justinmk added a commit that referenced this pull request Sep 20, 2024
Problem:
Code coverage is not counted for Windows. For example, in
#397 codecov flags the `if
(LOCALAPPDATA)` branches.

Solution:
Run codecov on all platforms (but only for a single node version, to
be frugal).
@justinmk
Copy link
Member

The codecov complaints about the Windows codepaths, should be fixed after #398

justinmk added a commit that referenced this pull request Sep 20, 2024
Problem:
Code coverage is not counted for Windows. For example, in
#397 codecov flags the `if
(LOCALAPPDATA)` branches.

Solution:
Run codecov on all platforms (but only for a single node version, to
be frugal).
@justinmk justinmk changed the title feat: add stopOnFirstMatch option for findNvim feat: add firstMatch option for findNvim Sep 20, 2024
@gjf7
Copy link
Contributor Author

gjf7 commented Sep 20, 2024

@justinmk Thanks for your patient review! This is my first time contributing to node-client, and I'm so excited.

@justinmk justinmk merged commit 78100f6 into neovim:master Sep 20, 2024
10 checks passed
@justinmk
Copy link
Member

It's great to have some help around here :)

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.

findNvim - Add an option to "stop searching after a match"
2 participants