A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/roxma/vim-hug-neovim-rpc below:

GitHub - roxma/vim-hug-neovim-rpc: EXPERIMENTAL

This is an experimental project, trying to build a compatibility layer for neovim rpc client working on vim8. I started this project because I want to fix the vim8 support issue for nvim-completion-manager.

Since this is a general purpose module, other plugins needing rpc support may benefit from this project. However, there're many neovim rpc methods I haven't implemented yet, which make this an experimental plugin. Please fork and open a PR if you get any idea on improving it.

Tip: for porting neovim rplugin to vim8, you might need roxma/nvim-yarp

  1. vim8
  2. If has('pythonx') and set pyxversion=3
  3. Else if has('pythonx') and set pyxversion=2
  4. Else if has('python3')
  5. Else if has('python')
  6. set encoding=utf-8 in your vimrc.

Use :echo neovim_rpc#serveraddr() to test the installation. It should print something like 127.0.0.1:51359 or /tmp/vmrUX9X/2.

Function Similar to neovim's neovim_rpc#serveraddr() v:servername neovim_rpc#jobstart(cmd,...) jobstart({cmd}[, {opts}]) neovim_rpc#jobstop(jobid) jobstop({job}) neovim_rpc#rpcnotify(channel,event,...) rpcnotify({channel}, {event}[, {args}...]) neovim_rpc#rpcrequest(channel, event, ...) rpcrequest({channel}, {method}[, {args}...])

Note that neovim_rpc#jobstart only support these options:

   "vim-hug-neovim-rpc - Sequence Diagram"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


┌───┐            ┌──────────┐                  ┌───────────┐                    ┌──────┐
│VIM│            │VIM Server│                  │NVIM Server│                    │Client│
└─┬─┘            └────┬─────┘                  └─────┬─────┘                    └──┬───┘
  │   Launch thread   │                              │                             │
  │───────────────────>                              │                             │
  │                   │                              │                             │
  │                  Launch thread                   │                             │
  │─────────────────────────────────────────────────>│                             │
  │                   │                              │                             │
  │ `ch_open` connect │                              │                             │
  │───────────────────>                              │                             │
  │                   │                              │                             │
  │                   │────┐                         │                             │
  │                   │    │ Launch VimHandler thread│                             │
  │                   │<───┘                         │                             │
  │                   │                              │                             │
  │                   │                              │           Connect           │
  │                   │                              │<─────────────────────────────
  │                   │                              │                             │
  │                   │                              ────┐
  │                   │                                  │ Launch NvimHandler thread
  │                   │                              <───┘
  │                   │                              │                             │
  │                   │                              │    Request (msgpack rpc)    │
  │                   │                              │<─────────────────────────────
  │                   │                              │                             │
  │                   │                              ────┐                         │
  │                   │                                  │ Request enqueue         │
  │                   │                              <───┘                         │
  │                   │                              │                             │
  │                   │     notify (method call)     │                             │
  │                   │ <────────────────────────────│                             │
  │                   │                              │                             │
  │ notify (json rpc) │                              │                             │
  │<───────────────────                              │                             │
  │                   │                              │                             │
  ────┐                                              │                             │
      │ Request dequeue                              │                             │
  <───┘                                              │                             │
  │                   │                              │                             │
  ────┐               │                              │                             │
      │ Process       │                              │                             │
  <───┘               │                              │                             │
  │                   │                              │                             │
  │                   │      Send response (msgpack rpc)                           │
  │────────────────────────────────────────────────────────────────────────────────>
┌─┴─┐            ┌────┴─────┐                  ┌─────┴─────┐                    ┌──┴───┐
│VIM│            │VIM Server│                  │NVIM Server│                    │Client│
└───┘            └──────────┘                  └───────────┘                    └──────┘

Add logging settigns to your vimrc. Log files will be generated with prefix /tmp/nvim_log. An alternative is to export environment variables before starting vim/nvim.

let $NVIM_PYTHON_LOG_FILE="/tmp/nvim_log"
let $NVIM_PYTHON_LOG_LEVEL="DEBUG"

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4