diff options
author | dundargoc <gocdundar@gmail.com> | 2024-01-07 13:05:03 +0100 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2024-01-22 22:36:40 +0100 |
commit | eb5d15e3838f53e2fcd25989c88db87458e9f984 (patch) | |
tree | de13432021adb8632ed61cd9bbe4270eaec0674c /test/functional/helpers.lua | |
parent | 13d50c3b13fb6f2bba948e50fefee451e0a90487 (diff) | |
download | rneovim-eb5d15e3838f53e2fcd25989c88db87458e9f984.tar.gz rneovim-eb5d15e3838f53e2fcd25989c88db87458e9f984.tar.bz2 rneovim-eb5d15e3838f53e2fcd25989c88db87458e9f984.zip |
refactor: rewrite python provider in lua
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r-- | test/functional/helpers.lua | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index eddf336b6f..159016b484 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -932,17 +932,14 @@ function module.new_pipename() end --- @param provider string ---- @return string|false? +--- @return string|boolean? function module.missing_provider(provider) if provider == 'ruby' or provider == 'node' or provider == 'perl' then --- @type string? local e = module.fn['provider#' .. provider .. '#Detect']()[2] return e ~= '' and e or false - elseif provider == 'python' or provider == 'python3' then - local py_major_version = (provider == 'python3' and 3 or 2) - --- @type string? - local e = module.fn['provider#pythonx#Detect'](py_major_version)[2] - return e ~= '' and e or false + elseif provider == 'python' then + return module.exec_lua([[return {require('vim.provider.python').detect_by_module('neovim')}]])[2] end assert(false, 'Unknown provider: ' .. provider) end |