Skip to content

Commit b916b10

Browse files
committed
Added more vim docs
1 parent e9fdb01 commit b916b10

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

doc/vim-npr.txt

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ within 5 parent directories relative to the current file when
1616

1717
It support ES, AMD and CommonJS module import types.
1818

19-
CONFIGURATION *vim-npr-targets*
19+
CONFIGURATION *vim-npr-configuration*
2020

2121
Resolve directories are defined on a project-by-project basis,
2222
allowing you to specify custom resolution directories uniquely.
@@ -33,11 +33,40 @@ of such array is below.
3333

3434
If the resolve key does not exist in the package, vim-npr will
3535
attempt to resolve it in common directories. These are,
36-
"src", "test", "public" and "lib" by default.
36+
"src", "lib", "test", "public" and "node_modules" by default.
3737

3838
Please note, that defining any resolve key will override the
3939
defaults.
4040

41+
Max Levels g:vim_npr_max_levels
42+
43+
The maximum number of levels that the plugin will traverse
44+
upwards in an attempt to resolve the package.json file within
45+
the project. This can be overridden if your project requires
46+
larger traversal.
47+
48+
File Names g:vim_npr_file_names
49+
50+
A list of strings that will be appended to the file path for
51+
each resolution directory check. These will determine which
52+
file ultimately gets resolved, this can also help modify the
53+
path to add default file check names, e.g. index.js.
54+
55+
File Types g:vim_npr_file_types
56+
57+
A list of file extensions that the plugin will allow itself to
58+
execute on. This however won't ensure that the includeexpr
59+
variable has be set in the current buffer.
60+
61+
Default Dirs g:vim_npr_default_dirs
62+
63+
A list of default directories that the plugin will attempt
64+
resolution within if it cannot find a resolve key in the
65+
package.json file within the project. If a package.json file
66+
is not found at all however, the plugin will throw an error
67+
as it cannot be certain which directory is the top level for
68+
the project it is currently within.
69+
4170
MAPPINGS *vim-npr-mappings*
4271

4372
The plugin works by extending the original functionality of *gf*.

0 commit comments

Comments
 (0)