kevinhwang91 / rnvimr

Make Ranger running in a floating window to communicate with Neovim via RPC
BSD 3-Clause "New" or "Revised" License
800 stars 17 forks source link

Setting "g:python3_host_prog" not respected. #137

Open cwaldbieser opened 1 year ago

cwaldbieser commented 1 year ago

rnvimr: health#rnvimr#check

OS

Ranger

Python

Pynvim

Ueberzug (optional)

RPC

**Describe the bug**

`nvim +'checkhealth rnvimr'` (see above) does not detect "pynvim" which is installed in a Python virtual environment referenced by `g:python3_host_prog`.  The "Python3 Provider (optional)" section of `checkhealth` does detect pynvim:

Python 3 provider (optional)

To Reproduce using nvim -u mini.vim

Example: cat mini.vim

let g:python3_host_prog = "/full/path/to/python3/env/with/pynvim/installed"

" use your plugin manager, here is `vim-plug`
call plug#begin('~/.config/nvim/plugged')
Plug 'kevinhwang91/rnvimr'
let g:rnvimr_vanilla = 1
tnoremap <silent> <M-i> <C-\><C-n>:RnvimrResize<CR>
nnoremap <silent> <M-o> :RnvimrToggle<CR>
tnoremap <silent> <M-o> <C-\><C-n>:RnvimrToggle<CR>
call plug#end()

Steps to reproduce the behavior:

  1. In nvim, run the :checkhealth command.

Expected behavior I expect that "pynvim" would be detected.

kevinhwang91 commented 1 year ago

Is your ranger installed under your sys py?

cwaldbieser commented 1 year ago

No, I installed ranger-fm with pipx in its own virtual environment.

On Tue, Jan 10, 2023, 9:27 AM Kevin Hwang @.***> wrote:

Is your ranger installed under your sys py?

— Reply to this email directly, view it on GitHub https://github.com/kevinhwang91/rnvimr/issues/137#issuecomment-1377362143, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADCZLM6K6U5OHW6LX7Y53DWRVWULANCNFSM6AAAAAATVX5FRQ . You are receiving this because you authored the thread.Message ID: @.***>

kevinhwang91 commented 1 year ago

https://github.com/kevinhwang91/rnvimr/issues/88 should work for you.

cwaldbieser commented 1 year ago

Actually, as long as I inject the "pynvim" package into the ranger-fm virtualenv, the plugin works: $ pipx inject ranger-fm pynvim

I don't need to set the ranger command because it's already in my path. Making sure "pynvim" is in the same virtualenv as "ranger-fm" causes :checkhealth to show:

## RPC
  - OK: RPC echo: Neovim send "Give me five!" and receive "Give me five!"

However, the "PyNvim" section still reports an error.

The plugin still works, the ":checkhealth" status is just a bit misleading in this case.