Does not find modules in directory "node_modules"
When I open a file in vim, vim-nodejs-complete doesn't provide any auto-completion for modules located in my 'node_modules' directory. It does provide auto-completion for all base modules. If I type in the command ":unlet b:npm_module_names", the response is: "No Such Variable: b:npm_module_names". Is there some way to get it to autocomplete my modules stored in the 'node_modules' directory?
for now, it can only complete file names in node_modules directory, and only complete require statement.
it's buggy. i will promote it later.
thanks for using it, contributing is welcomed :)
Yes, while I was waiting, I looked through your VIM script and realized that you're pulling from a precompiled completion dictionary. I don't have much experience with VIM Script, but I will fork your project and see what I can do to include autocompletion for modules in the node_modules directory.
I have one Recommendation:
In the nodejscomplete.vim script, you have the following settings on line 17:
let s:nodejs_complete_config = { \ 'js_compl_fn': 'javascriptcomplete#CompleteJS', \ 'max_node_compl_len': 15 }
Setting "the max_node_compl_len" to "15" truncates all autocomplete options to the first 15 found. Even if I continue to type (filtering the results) only the first 15 are filtered. By changing the value to "0" (unlimited), I was able to gain access to all of the completion results instead of only the first 15. This is what I changed it to:
let s:nodejs_complete_config = { \ 'js_compl_fn': 'javascriptcomplete#CompleteJS', \ 'max_node_compl_len': 0 }
Disclaimer: I'm using the "youCompleteMe" auto-completer plugin so that completion results come up automatically as I type. Your script is only called once to bring up the completion results, and then as I continue to type those results are filtered. I don't know if that's standard VIM behavior or specific to the "youCompleteMe" plugin.