neovim/node-client

docs: Improve Readme

nomasprime opened this issue · 8 comments

Currently piecemeal and vague. Would be great if everything was properly documented:

  1. What are sync, range, and nargs parameters? They're mentioned repeatedly but what are they?
  2. NVIM_NODE_HOST_DEBUG=1? This causes NeoVim to become unresponsive
  3. Installed NIM, now what?
  4. NVIM_NODE_LOG_LEVEL and FILE set but still no debug. Is the file path absolute/relative/both?
  5. In short, how does debugging work?
  6. Would also be nice to get fuller examples
  1. Looks like NVIM_NODE_LOG_FILE has to be set to an absolute path beginning with root, /, ie, ~ doesn't get resolved.

self._addDefaultMeta is not a function eh?

Not sure what the problem is and there's not a single mention of my code in the stack trace—special.

@nomasprime I am suddenly getting this self._addDefaultMeta error as well from plugins, but I can't figure out what is going on. I have tried reinstalling and updating everything but I can't get to the bottom of it.

@jeffwillette think I gave up on this in the end. Currently doing noob debugging, eg, nvim.outWrite(…).

Only used Node because I was writing a plug-in and wanted to leverage a particular Node module. When I have more time I'll port the bits I need to Lua and remove the dependency.

Unless you're in a similar situation, I'd checkout Lua: it's natively supported and has much better documentation and support.

Oh thanks for the reply. I need other plugins which rely on this node host so I cannot switch.

see also #41

would really like a self-contained example that users can paste and immediately have a working plugin.

would really like a self-contained example that users can paste and immediately have a working plugin.

#309 provides a fully working self-contained example (not a "remote plugin" example though).

What are sync, range, and nargs parameters? They're mentioned repeatedly but what are they?

Those are explained the readme now.

Installed NIM, now what?

https://github.com/neovim/node-client?tab=readme-ov-file#quickstart-connect-to-nvim