NeoVim

hyperextensible Vim-based text editor

have decided to switch from Bram's vim to neovim.


Operation

leader   : ,
<F2>     : NerdTree on/off
leader 2 : next buffer
leader 1 : previous buffer

Summary of installs

CAUTION: install on home laptop (wwtlaptop) has issues; nvim seems to run, but installation of plugins was challenging.

nvim (nvim-qt.exe) runs, but has issues. Don't depend on it for serious work (e.g. syntax checking) nvim happens to run on work laptop, I don't know why it does.

code: at the bottom of NVIM v0.6.0 (both are from tar/zip, not from packages)

    cygwin:  nvim-win64.zip
    linux:   nvim-linux64.tar.gz

exe locs:

    piedmont:    /home/wendell/nvim/local/nvim-linux64/bin/nvim
    home lap:    alias nvim="SHELL=/cygwin64/bin/bash ~/pkgs/Neovim/bin/nvim-qt.exe"
    opalstack:   alias nvim='/home/wendell/pkgs/nvim-linux64/bin/nvim'

    work lap:    alias nvim="~/pkgs/Neovim/bin/nvim.exe"
    work svr:    ???

init locs:

    piedmont:  ~/.config/nvim/init.vim
    home lap:    /cygdrive/c/Users/wendell/AppData/Local/nvim

    work lap:  C:\\Users\\Public\\cygwin\\home\\WENDEL~1\\nvim_config\\

configuration check:

    nvim +checkhealth
    nvim
        :python3 print('yipee!')

autoload:

    adjacent to init.vim?

swap files:

    ???

environ vars:

    cygwin home (note: uses linux-style config location):
        export XDG_CONFIG_HOME="C:\\cygwin64\\home\\wendell\\.config\\"
        export   XDG_DATA_HOME="C:\\cygwin64\\home\\wendell\\.config\\"
        alias nvim=<see above>

    cygwin work (note: uses windows-style config location):
        export XDG_CONFIG_HOME="C:\\Users\\Public\\cygwin\\home\\WENDEL~1\\nvim_config\\"
        export   XDG_DATA_HOME="C:\\Users\\Public\\cygwin\\home\\WENDEL~1\\nvim_config\\"
        alias nvim="~/pkgs/Neovim/bin/nvim.exe"
    linux:
        nothing in particular

plugins & config:

    syntax checking: ale [flake8]
    color scheme:    gruvbox

python pkgs:

    pip3 install neovim
    pip3 install pynvim          # already installed???
    pip3 install pylint
    pip3 install flake8          # syntax checker
    pip3 install python3-neovim  # not sure

status:

installations completed:

    piedmont:   done
    home lap:   had issues, but -qt version runs somewhat
    opalstack:  done

    work lap:   same as home lap
    work svr:   done

TODO:


And finally, after 3 or 4 days of flailing:

Cygwin install

1) executable

d/l nvim-win64.zip from <???> and unzip

this seems to help:

    chmod a+rx *.dll
    find . -name "*.dll" -exec chmod a+x {} \; -print

and setup .bashrc:

    export XDG_CONFIG_HOME="C:\\Users\\Public\\cygwin\\home\\WENDEL~1\\nvim_config\\"
    export   XDG_DATA_HOME="C:\\Users\\Public\\cygwin\\home\\WENDEL~1\\nvim_config\\"
    alias nvim="~/pkgs/Neovim/bin/nvim.exe"

2) using Cygwin's setup.exe, install this:

    python3.8-devel

3) install python's package:

    05:12:34 ~ $ pip3.8 install neovim

    Collecting neovim
      Using cached neovim-0.3.1.tar.gz (804 bytes)
      Preparing metadata (setup.py) ... done
    Collecting pynvim>=0.3.1
      Using cached pynvim-0.4.3.tar.gz (56 kB)
      Preparing metadata (setup.py) ... done
    Requirement already satisfied: msgpack>=0.5.0 in /usr/local/lib/python3.8/site-packages (from pynvim>=0.3.1->neovim) (1.0.3)
    Collecting greenlet
      Using cached greenlet-1.1.2.tar.gz (91 kB)
      Preparing metadata (setup.py) ... done
    Using legacy 'setup.py install' for neovim, since package 'wheel' is not installed.
    Using legacy 'setup.py install' for pynvim, since package 'wheel' is not installed.
    Using legacy 'setup.py install' for greenlet, since package 'wheel' is not installed.
    Installing collected packages: greenlet, pynvim, neovim
        Running setup.py install for greenlet ... done
        Running setup.py install for pynvim ... done
        Running setup.py install for neovim ... done
    Successfully installed greenlet-1.1.2 neovim-0.3.1 pynvim-0.4.3

4) nvim +checkhealth

finally found a useful parameter!!!:

    nvim +checkhealth

Examine that output, and adjust accordingly...

put this in the init.vim:

    let g:python3_host_prog="C:/Users/Public/cygwin/bin/python3.8"

and finally, +checkhealth looks mostly good:

    05:30:35 ~ $ nvim +checkhealth

    nvim: health#nvim#check
    ========================================================================
    ## Configuration
      - OK: no issues found

    ## Performance
      - OK: Build type: RelWithDebInfo

    ## Remote Plugins
      - OK: Up to date

    ## terminal
      - ERROR: command failed: infocmp -L

      - INFO: $TERM_PROGRAM='mintty'

have no idea about the terminal error, or what to do about it

5) test python

    nvim
    :python3 print('yipee!')

and the output shows up in the command/status line!

6) install (the first) plugin

    nvim
    :PlugInstall

and the split-screen shows up, and it appears that the plugin installs(!!!).

Cygwin on home laptop:

nvim-qt.exe +checkhealth opens a window, but then freezes

nvim.exe +checkhealth freezes

    ERROR: Failed to run healthcheck for "provider" plugin.  Exception:
    ...
    Vim(let):E903: Process failed to start: no such file or directory: "/bin/bash"

TRY THIS:

    export XDG_CONFIG_HOME="C:\\Users\\wendell\\AppData\\Local\\"
    export XDG_DATA_HOME="C:\\Users\\wendell\\AppData\\Local\\"
    alias nvim="~/pkgs/Neovim/bin/nvim.exe"

PROBLEM is discussed here: Neovim :checkhealth problems

SOLUTION:

    export SHELL=/cygwin64/bin/bash

(but just for the -qt version, terminal one still freezes)

HOWEVER, still issues abound...

    cd /
    mkdir cygwin64
    cd cygwin64
    ln -s /bin bin

Linux

    > sudo yum install neovim python3-neovim

using:

    ~/.config/nvim/init.vim

    stdpath('data') == ~/.local/share/nvim/

and:

    cd ~/.local/share/nvim
    mkdir vimplug

and:

> pip3.9 install neovim

Manually:

    cd .config/nvim
    mkdir autoload
    cd autoload
    vim plug.vim
    <contents of https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim>

CRAP:

    > nvim --version
    NVIM v0.3.8
    Build type: RelWithDebInfo
    LuaJIT 2.1.0-beta3

Nope, couldn't find and rpm that worked, so just d/l this and extract as necessary:

nvim-linux64.tar.gz

putty notes

To use with ssh via putty:

1) use putty 0.76 release

2) check all boxes on putty color tab:

3) export TERM=xterm-256color

dec 30

Am starting over again with a new .config/nvim/init.vim based on the youtube video from Red Eye Coder Club.

    config file:  ~/.config/nvim/init.vim
    plugin dir:   plug#begin(stdpath('data') . 'vimplug')

I think the plugin dir is::

    ~/.local/share/nvim/vimplug

plugins:

little help from here: A Complete Guide to Neovim Configuration for Python Development the code checker part

AND from: Setup Neovim for Python

use ale. sudo pip3.9 install flake8

YIPEE!


some pages

Setting Up Neovim for Web Development in 2020 Switching from VS Code to Neovim for React and TypeScript development

Neovim Remote Plugins: NodeJS Strikes Back

Setting custom node version (path) for Neovim lame

How to set up Neovim 0.5 + Modern plugins (LSP, Treesitter, Fuzzy finder, etc) IDE-like features based on LSP and Treesitter, fuzzy finder, and status

Why I switched to Neovim several videos in this blog; possibly good

Neovim (0.5) Is Overpowering

How to Set Up Neovim for JavaScript

A Complete Guide to Neovim Configuration for Python Development 2018

My ultimate Neovim configuration for Python development 2021

How to set up Neovim 0.5 + Modern plugins (LSP, Treesitter, Fuzzy finder, etc)

use

have turned off lua for now, as it doesn't load/init properly...

sample configs:

Neovim configuration for beginners

jdhao github config

nidvdp's github Neovim with LSP and tree-sitter

treesitter

todo.

telescope

todo.

debuggers:

a note in reddit:

try vimspector or nvim-dap, I use the latter

airline

themes

these look nice:

    :AirlineTheme: serene
    :AirlineTheme: luna

the end.