Skip to content

Conversation

@saghen
Copy link
Contributor

@saghen saghen commented Mar 15, 2025

Using snacks.profile and profile.nvim, I noticed a 25ms delay when opening rust files, primarily due to the :wait() on vim.system call to get the cargo root directory. This PR changes the get_cargo_metadata call to use async instead for both the vim.system and vim.uv.fs_stat calls. Unfortunately, there's a breaking change to the config.root_dir option as a result, since the default implementation is now async.

  • Neotest .root() needs to be updated
  • No longer attaches to the first opened buffer

@github-actions
Copy link
Contributor

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.

@saghen saghen marked this pull request as draft March 15, 2025 16:23
mrcjkb pushed a commit that referenced this pull request Apr 3, 2025
@saghen
Copy link
Contributor Author

saghen commented Apr 3, 2025

Brilliant, thanks @mrcjkb! Closed by 26ba138

@saghen saghen closed this Apr 3, 2025
@mrcjkb
Copy link
Owner

mrcjkb commented Apr 3, 2025

Thanks for your work @saghen 😄

mrcjkb pushed a commit that referenced this pull request Apr 3, 2025
mrcjkb pushed a commit that referenced this pull request Apr 3, 2025
mrcjkb pushed a commit that referenced this pull request Apr 3, 2025
mrcjkb pushed a commit that referenced this pull request Apr 3, 2025
mrcjkb pushed a commit that referenced this pull request Apr 3, 2025
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