Nvim :help
pages, generated
from source
using the tree-sitter-vimdoc parser.
E319
Use of a feature requiring a missing provider is an error:E319: No "foo" provider found. Run ":checkhealth provider"Run the :checkhealth command, and review the sections below.
python3 -m pip install --user --upgrade pynvim
The pip --upgrade
flag ensures that you get the latest version even if
a previous version was already installed.
python -m pip uninstall neovim pynvim
python -m pip install --user --upgrade pynvim
g:python3_host_prog
Command to start Python 3 (executable, not directory). Setting this makes
startup faster. Useful for working with virtualenvs. Must be set before any
check for has("python3").let g:python3_host_prog = '/path/to/python3'
g:loaded_python3_provider
To disable Python 3 support:let g:loaded_python3_provider = 0
python-virtualenv
If you plan to use per-project virtualenvs often, you should assign one
virtualenv for Nvim and hard-code the interpreter path via
g:python3_host_prog so that the "pynvim" package is not required
for each virtualenv.
pyenv install 3.4.4
pyenv virtualenv 3.4.4 py3nvim
pyenv activate py3nvim
python3 -m pip install pynvim
pyenv which python # Note the path
The last command reports the interpreter path, add it to your init.vim:let g:python3_host_prog = '/path/to/py3nvim/bin/python'
See also: https://github.com/zchee/deoplete-jedi/wiki/Setting-up-Python-for-Neovim
gem install neovim
Run :checkhealth to see if your system is up-to-date.
g:loaded_ruby_provider
To disable Ruby support:let g:loaded_ruby_provider = 0
g:ruby_host_prog
Command to start the Ruby host. By default this is "neovim-ruby-host". With
project-local Ruby versions (via tools like RVM or rbenv) setting this can
avoid the need to install the "neovim" gem in every project.
let g:ruby_host_prog = '~/.rbenv/versions/2.4.1/bin/neovim-ruby-host'
To use the RVM "system" Ruby installation:let g:ruby_host_prog = 'rvm system do neovim-ruby-host'
cpanm -n Neovim::Ext
Run :checkhealth to see if your system is up-to-date.
g:loaded_perl_provider
To disable Perl support::let g:loaded_perl_provider = 0
g:perl_host_prog
Command to start the Perl executable. Must be set before any
check for has("perl").let g:perl_host_prog = '/path/to/perl'
npm install -g neovim
Run :checkhealth to see if your system is up-to-date.
g:loaded_node_provider
To disable Node.js support::let g:loaded_node_provider = 0
g:node_host_prog
Command to start the Node.js host. Setting this makes startup faster.
let g:node_host_prog = '/usr/local/bin/neovim-node-host'
set clipboard+=unnamedplus
See 'clipboard' for details and options.
clipboard-tool
The presence of a working clipboard tool implicitly enables the '+' and "*"
registers. Nvim looks for these clipboard tools, in order of priority:
g:clipboard
To configure a custom clipboard tool, set g:clipboard to a dictionary.
For example this configuration integrates the tmux clipboard:let g:clipboard = {
\ 'name': 'myClipboard',
\ 'copy': {
\ '+': ['tmux', 'load-buffer', '-'],
\ '*': ['tmux', 'load-buffer', '-'],
\ },
\ 'paste': {
\ '+': ['tmux', 'save-buffer', '-'],
\ '*': ['tmux', 'save-buffer', '-'],
\ },
\ 'cache_enabled': 1,
\ }
If "cache_enabled" is TRUE then when a selection is copied Nvim will cache
the selection until the copy command process dies. When pasting, if the copy
process has not died the cached selection is applied.
let g:clipboard = {
\ 'name': 'myClipboard',
\ 'copy': {
\ '+': {lines, regtype -> extend(g:, {'foo': [lines, regtype]}) },
\ '*': {lines, regtype -> extend(g:, {'foo': [lines, regtype]}) },
\ },
\ 'paste': {
\ '+': {-> get(g:, 'foo', [])},
\ '*': {-> get(g:, 'foo', [])},
\ },
\ }
The "copy" function stores a list of lines and the register type. The "paste"
function returns the clipboard as a [lines, regtype]
list, where lines
is
a list of lines and regtype
is a register type conforming to setreg().
clipboard-wsl
For Windows WSL, try this g:clipboard definition:
let g:clipboard = {
\ 'name': 'WslClipboard',
\ 'copy': {
\ '+': 'clip.exe',
\ '*': 'clip.exe',
\ },
\ 'paste': {
\ '+': 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))',
\ '*': 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))',
\ },
\ 'cache_enabled': 0,
\ }
CTRL-SHIFT-v
(macOS: CMD-v) in your terminal is "paste", not "clipboard": the terminal
application (Nvim) just gets a stream of text, it does not interact with the
clipboard directly.
bracketed-paste-mode
Pasting in the TUI depends on the "bracketed paste" terminal capability,
which allows terminal applications to distinguish between user input and
pasted text. https://cirw.in/blog/bracketed-paste
This works automatically if your terminal supports it.
ui-paste
GUIs can paste by calling nvim_paste().
<NL>
, <CR>
, and <CR>
<NL>
.
When pasting a huge amount of text, screen-updates are throttled and the
message area shows a "..." pulse.
vim.paste = (function(lines, phase)
vim.api.nvim_put(lines, 'c', true, true)
end)