refactor(runtime): always use DIP_START when searching for runtime files

Now remove the addition of "start/*" packages in 'packpath' as
explicit items in 'runtimepath'. This avoids 'runtimepath' from becoming
very long when using a lot of plugins as packages.

To get the effective search path as a list, use |nvim_list_runtime_paths()|
This commit is contained in:
Björn Linse
2021-09-11 16:20:59 +02:00
parent 8ef2b56cac
commit 396280d303
11 changed files with 63 additions and 112 deletions

View File

@@ -1641,10 +1641,10 @@ void ex_compiler(exarg_T *eap)
do_unlet(S_LEN("b:current_compiler"), true);
snprintf((char *)buf, bufsize, "compiler/%s.vim", eap->arg);
if (source_in_path(p_rtp, buf, DIP_ALL) == FAIL) {
if (source_runtime(buf, DIP_ALL) == FAIL) {
// Try lua compiler
snprintf((char *)buf, bufsize, "compiler/%s.lua", eap->arg);
if (source_in_path(p_rtp, buf, DIP_ALL) == FAIL) {
if (source_runtime(buf, DIP_ALL) == FAIL) {
EMSG2(_("E666: compiler not supported: %s"), eap->arg);
}
}