diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2021-09-11 16:20:59 +0200 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2021-09-18 13:53:50 +0200 |
commit | 396280d3030685c6b7c4d962f24bb5171a735b47 (patch) | |
tree | 08b04faa0d1fd328f0e89e8541b444c229633cd9 /test/functional/api/vim_spec.lua | |
parent | 8ef2b56cac895c151345cf0ff0a97456c0a7fdd2 (diff) | |
download | rneovim-396280d3030685c6b7c4d962f24bb5171a735b47.tar.gz rneovim-396280d3030685c6b7c4d962f24bb5171a735b47.tar.bz2 rneovim-396280d3030685c6b7c4d962f24bb5171a735b47.zip |
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()|
Diffstat (limited to 'test/functional/api/vim_spec.lua')
-rw-r--r-- | test/functional/api/vim_spec.lua | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua index 83b256e935..ffef6a6066 100644 --- a/test/functional/api/vim_spec.lua +++ b/test/functional/api/vim_spec.lua @@ -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() |