You'll also need to enable the code lens feature in coc (:CocConfig
):
"codeLens.enable": true
Create a channel to communicate with NeoVim and its plugins https://github.com/chemzqm/node-client.
For example, you can execute a script from the plugin using
nvim.command('vsp');
More information about the above script https://github.com/chemzqm/node-client#attach
Add:
let g:coc_node_args = ['--nolazy', '--inspect-brk=6045']
to your .vimrc and use Google Chrome extension to open it automatically. (more information)
Coc.vim is an equivalent of vscode
package and dedicated for writing NeoVim plugins.
It seems like there's already an abtraction layer for that purpose in coc.vim.
What's about vscode diagnostic? There is a lot of examples uses vscode's diagnostics. I've found one.
Call this in neovim
:call nvim_buf_set_virtual_text(0, 0, 3, [["foo"]], {})
In vscode
, there is thing called CodeLens, which uses to highlight things.
Example of import-cost
CodeLens
It's still up in the air about how to do that. Theoretically, we can use this function to clear all the stale modules and reload them.
Update: neovim-client hot reloads thing if the flag { dev: true }
is passed.
In the readme files, it states that we can pass an env variable to debug using node-inspector