this post was submitted on 29 Jun 2023
12 points (100.0% liked)

Neovim

2183 readers
1 users here now

founded 1 year ago
MODERATORS
 

Is there a simple script or plugin that uses patterns to get the root project directory path of a rust project in lua? The pattern should be to vheck for 'Cargo.lock' file

top 7 comments
sorted by: hot top controversial new old
[–] [email protected] 3 points 1 year ago (1 children)

Another good option, and the one lazyvim went with, is ahmedkhalf/project.nvim

[–] wisefoolkp 1 points 1 year ago

Ended up using nvim-rooter. I modified (copy pasted) some of its scripts into a fork of nvim-dap-projects to help setup nvim-dap for a better rust debugging experience. Thanks for the suggestion

[–] Hexarei 3 points 1 year ago (2 children)

I've had great success with https://github.com/airblade/vim-rooter, for rust projects and many others

[–] howarddo 2 points 1 year ago* (last edited 1 year ago)

Nice! Didn't know I need it

[–] wisefoolkp 2 points 1 year ago (1 children)

It works as expected, thank you

[–] Hexarei 1 points 1 year ago
[–] [email protected] 1 points 1 year ago

If it's that simple why are you not writing it yourself?