diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-04-11 10:20:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-11 10:20:25 +0800 |
commit | 7ffe450173d2521c2d53b147e930c50767a7795a (patch) | |
tree | 947e58a0388c9112d8e6195eaf38d7725c43f30f | |
parent | c8d1d8b2546c5974f4ce75fc87f918bc8cfe8e56 (diff) | |
download | rneovim-7ffe450173d2521c2d53b147e930c50767a7795a.tar.gz rneovim-7ffe450173d2521c2d53b147e930c50767a7795a.tar.bz2 rneovim-7ffe450173d2521c2d53b147e930c50767a7795a.zip |
fix(health): check for _host_prog variables properly (#23014)
-rw-r--r-- | runtime/lua/provider/health.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/lua/provider/health.lua b/runtime/lua/provider/health.lua index 2e57b6da18..8ebc8ccb17 100644 --- a/runtime/lua/provider/health.lua +++ b/runtime/lua/provider/health.lua @@ -397,8 +397,8 @@ local function python() local pyenv = pyenv_table[1] local pyenv_root = pyenv_table[2] - if vim.g['host_prog_var'] then - local message = 'Using: g:' .. host_prog_var .. ' = "' .. vim.g['host_prog_var'] .. '"' + if vim.g[host_prog_var] then + local message = 'Using: g:' .. host_prog_var .. ' = "' .. vim.g[host_prog_var] .. '"' info(message) end @@ -411,7 +411,7 @@ local function python() 'No Python executable found that can `import neovim`. ' .. 'Using the first available executable for diagnostics.' ) - elseif vim.g['host_prog_var'] then + elseif vim.g[host_prog_var] then python_exe = pyname end @@ -422,7 +422,7 @@ local function python() 'You may disable this provider (and warning) by adding `let g:loaded_python3_provider = 0` to your init.vim', }) elseif not is_blank(pyname) and is_blank(python_exe) then - if not vim.g['host_prog_var'] then + if not vim.g[host_prog_var] then local message = '`g:' .. host_prog_var .. '` is not set. Searching for ' |