airblade / vim-rooter

Changes Vim working directory to project root.
MIT License
1.21k stars 71 forks source link

Custom root detection for NPM workspaces #135

Open codeinabox opened 5 months ago

codeinabox commented 5 months ago

Thank you for this plug-in! I've been using it to detect the project root using a package.json pattern, which works great. However, I've discovered when working with a project with NPM workspaces I need more sophisticated root detection, and to inspect if the package.json contains a workspaces key - is this possible?

airblade commented 5 months ago

The code isn't capable at the moment of inspecting the contents of files.

Perhaps you could give a specific example of a rooter situation with a workspace? (In #124 we came up with a pattern that worked with Rust workspaces, so maybe we could do the same here.)