mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 03:15:39 +00:00
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:
@@ -1591,7 +1591,10 @@ describe('API', function()
|
||||
eq({'a', '', 'b'}, meths.list_runtime_paths())
|
||||
meths.set_option('runtimepath', ',a,b')
|
||||
eq({'', 'a', 'b'}, meths.list_runtime_paths())
|
||||
-- trailing , is ignored, use ,, if you really really want $CWD
|
||||
meths.set_option('runtimepath', 'a,b,')
|
||||
eq({'a', 'b'}, meths.list_runtime_paths())
|
||||
meths.set_option('runtimepath', 'a,b,,')
|
||||
eq({'a', 'b', ''}, meths.list_runtime_paths())
|
||||
end)
|
||||
it('truncates too long paths', function()
|
||||
@@ -2012,8 +2015,13 @@ describe('API', function()
|
||||
ok(endswith(val[1], p"autoload/remote/define.vim")
|
||||
or endswith(val[1], p"autoload/remote/host.vim"))
|
||||
|
||||
eq({}, meths.get_runtime_file("lua", true))
|
||||
eq({}, meths.get_runtime_file("lua/vim", true))
|
||||
val = meths.get_runtime_file("lua", true)
|
||||
eq(1, #val)
|
||||
ok(endswith(val[1], p"lua"))
|
||||
|
||||
val = meths.get_runtime_file("lua/vim", true)
|
||||
eq(1, #val)
|
||||
ok(endswith(val[1], p"lua/vim"))
|
||||
end)
|
||||
|
||||
it('can find directories', function()
|
||||
|
||||
Reference in New Issue
Block a user