Skip to content

Commit

Permalink
add package.json to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafael Madriz authored and airblade committed Jul 28, 2021
1 parent aef2141 commit 0415be8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/rooter.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Default: '/,*'
------------------------------------------------------------------------------
How to identify a root directory *g:rooter_patterns*

Default: ['.git', '_darcs', '.hg', '.bzr', '.svn', 'Makefile']
Default: ['.git', '_darcs', '.hg', '.bzr', '.svn', 'Makefile', 'package.json']

Set `g:rooter_patterns` to a list of identifiers. They are checked breadth-
first as Rooter walks up the directory tree and the first match is used.
Expand Down

6 comments on commit 0415be8

@Racle
Copy link

@Racle Racle commented on 0415be8 Aug 11, 2021

Choose a reason for hiding this comment

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

Oh that's why this plugin seems to be broken after update (changed root to component folder instead of parent folder).

If someone else wonders, in our react projects we use components in their own folders and each folder have small package.json file to help with import. (quick explanation here)

@airblade
Copy link
Owner

Choose a reason for hiding this comment

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

@Racle Sorry about that.

I always assume people set g:rooter_patterns to something which makes sense for them, e.g. omitting the patterns for version control systems they don't use, so I didn't think too much about updating the default. I'll be more reluctant to change the default in future.

@Racle
Copy link

@Racle Racle commented on 0415be8 Aug 11, 2021

Choose a reason for hiding this comment

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

@airblade no worries, this is an easy fix in my case :)

I personally usually go with defaults (as those are usually good as they are) and add those to config only if I need to change settings.

@daern91
Copy link

@daern91 daern91 commented on 0415be8 Nov 3, 2021

Choose a reason for hiding this comment

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

Ahhh, I also just ran into this one. Working a lot with monorepos and, after upgrading, the plugin didn't like any of my monorepos and multiple package.json files anymore.

@airblade
Copy link
Owner

Choose a reason for hiding this comment

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

@daern91 Sorry!

@daern91
Copy link

@daern91 daern91 commented on 0415be8 Nov 4, 2021

Choose a reason for hiding this comment

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

No problems, @airblade. Thanks for the work you do πŸ™‡β€β™‚οΈ

This was a good reminder for myself to actually read through the docs on the plugins I use, and not just depend on default settings πŸ˜„

Please sign in to comment.