The words Under construction in black text on a yellow background with diagonal black stipes surrounding it
I'm in the process of moving my site. It's still a work in progress. Please excuse the mess and broken links.

Create A Neovim Plugin

TODO: Pull subtitle into page object

TODO: Fix the formatting of this post that got busted during the move to nextjs

code_start_default_section code_end_default_section

Debugging Stuff

I'm moving stuff around right now. All this below is helping me figure out where to put stuff

        -- title

Create A Neovim Plugin

-- p

TODO: Fix the formatting of this post that got 
busted during the move to nextjs

-- p

-- hr

-- code/

# not sure if this needs to be installed globally or 
just in a virtual environment. 
pip install pynvim

-- hr

-- hr

setup pyenv by doing:

    pyenv install -v 2.7.18
    pyenv global 2.7.18
    pip install pynvim

    pyenv install -v 3.9.4
    pyenv global 3.9.4
    pip install pynvim
    
    # and finally:
    
    pyenv global 3.9.4 2.7.18
    
--

Put your python3 stuff in: rplugin/python3


Neovim allows Python 3 plugins to be defined by 
placing python files or packages in rplugin/python3/ 
(in a runtimepath folder). Python 2 rplugins are also 
supported and placed in rplugin/python/, but are 
considered deprecated. 

Further added library features will only be available 
on Python 3.


-- hr

echo "let &runtimepath.=','.escape(expand('<sfile>:p:h'), '\,')" > testvimrc


--- 

nvim -u testvimrc +UpdateRemotePlugins


-- hr


This wasn't great
https://dev.to/christalib/how-i-wrote-my-first-neovim-plugin-357h


This was better:
https://pynvim.readthedocs.io/en/latest/usage/remote-plugins.html

Didn't look at this one yet, but might be interesting:
https://github.com/jacobsimpson/nvim-example-python-plugin


--- 

This was in some other notes, but it's not something I had to 
mess with once I got the pyenv stuff sorted. 


#testing adding this to `./init.vim` (note, this is not:`~/.config/nvim/init.vim`)

let g:python3_host_prog = '/Users/alans/.pyenv/versions/3.9.4/bin/python'
let g:python_host_prog = '/Users/alans/.pyenv/versions/2.7.18/bin/python'

-- hr

-- /code


-- categories
-- Miscellaneous

-- metadata
-- date: 2021-05-31 18:18:08
-- id: 20eo3vly
-- status: scratch
-- type: post
-- SCRUBBED_NEO: false
-- site: aws