Skip to content
Λlisue (Ali sue・ありすえ) edited this page Apr 24, 2023 · 4 revisions

Start

sequenceDiagram
participant vim as Vim
participant denopsvim as denops (Vim)
participant denopsdeno as denops (Deno)
vim -->> denopsvim: Notify VimEnter
denopsvim ->> denopsdeno: Start Denops server
denopsdeno ->> denopsdeno: Listen for available local TCP address
denopsdeno ->> denopsvim: Tell local TCP address through stdout
denopsvim -) vim: Fire User DenopsProcessListen:{addr}
Loading

Connect

sequenceDiagram
participant vim as Vim
participant denopsvim as denops (Vim)
participant denopsdeno as denops (Deno)
vim -->> denopsvim: Notify User DenopsProcessListen:{addr}
denopsvim ->> denopsdeno: Establish denops channel through TCP
Note over denopsvim,denopsdeno: Vim: JSON channel<br>Neovim: RPC channel
denopsdeno -->> denopsvim: Ack
denopsvim -) vim: Fire User DenopsReady
Loading

Register

sequenceDiagram
participant vim as Vim
participant denopsvim as denops (Vim)
participant denopsdeno as denops (Deno)
participant denopsworker as denops (Worker)

vim -->> denopsvim: Notify User DenopsReady
denopsvim ->> denopsvim: denops plugin discovery
loop plugins
denopsvim ->> denopsdeno: Register plugin
denopsdeno ->> denopsworker: Spawn worker thread
denopsdeno ->> denopsworker: Tell plugin script URL and meta
denopsworker ->> denopsworker: Initialize denops session
denopsworker -) vim: Fire User DenopsSystemPluginPre:{plugin}
vim -->> denopsvim: Notify User DenopsSystemPluginPre:{plugin}
denopsvim -) vim: Fire User DenopsPluginPre:{plugin}
denopsworker ->> denopsworker: Call "main" function of the script
denopsworker -) vim: Fire User DenopsSystemPluginPost:{plugin}
vim -->> denopsvim: Notify User DenopsSystemPluginPost:{plugin}
denopsvim -) vim: Fire User DenopsPluginPost:{plugin}
end
Loading