to |g:clipboard|, set
|init.vim| as follows.
>vim
function! s:clipboard_changed(...) abort
if exists('g:loaded_clipboard_provider')
unlet g:loaded_clipboard_provider
endif
runtime autoload/provider/clipboard.vim
endfunction
if !exists('s:loaded")
call dictwatcheradd(g:, 'clipboard', function('s:clipboard_changed'))
endif
let s:loaded = v:true
<
==============================================================================
Build issues *faq-build*
GENERAL BUILD ISSUES ~
Run `make distclean && make` to rule out a stale build environment causing the
failure.
SETTINGS IN LOCAL.MK DON'T TAKE EFFECT ~
CMake caches build settings, so you might need to run `rm -r build && make`
after modifying `local.mk`.
CMAKE ERRORS ~
`configure_file Problem configuring file`
This is probably a permissions issue, which can happen if you run `make` as the
root user, then later run an unprivileged `make`. To fix this, run
`rm -rf build` and try again.
GENERATING HELPTAGS FAILED ~
If re-installation fails with "Generating helptags failed", try removing the
previously installed runtime directory (if `CMAKE_INSTALL_PREFIX` is not set
during building, the default is `/usr/local/share/nvim`):
>bash
rm -r /usr/local/share/nvim
<
==============================================================================
Design *faq-design*
WHY NOT USE JSON FOR RPC? ~
- JSON cannot easily/efficiently handle binary data
- JSON specification is ambiguous: https://seriot.ch/parsing_json.php
WHY EMBED LUA INSTEAD OF X? ~
- Lua is a very small language, ideal for embedding. The biggest advantage of
Python/Ruby/etc is their huge collection of libraries, but that isn't
relevant for Nvim, where Nvim is the "batteries included" library:
introducing another stdlib would be redundant.
- Lua 5.1 is a complete language: the syntax is frozen. This is great for
backwards compatibility.
- Nvim also uses Lua internally as an alternative to C. Extra performance is
useful there, as opposed to a slow language like Python or Vim9script.
- LuaJIT is one of the fastest runtimes on the planet, 10x faster than Python
and "Vim9script" https://vimhelp.org/vim9.txt.html , 100x faster than
Vimscript.
- Python/JS