Neovim python support

have setup neovim as

home-manager.users.madhukar.programs.neovim = {
      enable = true;
      viAlias = true;
      vimAlias = true;
      withNodeJs = true;
    };

on running checkhealth

## Python 2 provider (optional)
  - INFO: Using: g:python_host_prog = "/nix/store/fgvb3dlpkgchmid069nf7ayh1bx6il5a-neovim-0.3.8/bin/nvim-python"
  - WARNING: $VIRTUAL_ENV exists but appears to be inactive. This could lead to unexpected results.
    - ADVICE:
      - If you are using Zsh, see: http://vi.stackexchange.com/a/7654
  - INFO: Executable: /nix/store/fgvb3dlpkgchmid069nf7ayh1bx6il5a-neovim-0.3.8/bin/nvim-python
  - INFO: Python version: 2.7.16
  - INFO: pynvim version: 0.3.2
  - OK: Latest pynvim is installed.

## Python 3 provider (optional)
  - INFO: Using: g:python3_host_prog = "/nix/store/fgvb3dlpkgchmid069nf7ayh1bx6il5a-neovim-0.3.8/bin/nvim-python3"
  - WARNING: $VIRTUAL_ENV exists but appears to be inactive. This could lead to unexpected results.
    - ADVICE:
      - If you are using Zsh, see: http://vi.stackexchange.com/a/7654
  - INFO: Executable: /nix/store/fgvb3dlpkgchmid069nf7ayh1bx6il5a-neovim-0.3.8/bin/nvim-python3
  - INFO: Python version: 3.7.4
  - INFO: pynvim version: 0.3.2
  - OK: Latest pynvim is installed.

Have done the following as recommended in the stackexchange link -

home-manager.users.madhukar.programs.zsh.initExtra =  ''
            if [[ -n $VIRTUAL_ENV && -e "$VIRTUAL_ENV/bin/activate" ]]; then
              source "$VIRTUAL_ENV/bin/activate"
            fi
''

It has had no effect on the warning (though initExtra modifies .zshrc and not .zshenv)

1 Like