node-client icon indicating copy to clipboard operation
node-client copied to clipboard

Improve Readme

Open nomasprime opened this issue 3 years ago • 6 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

nomasprime avatar Jun 08 '20 22:06 nomasprime

  1. Looks like NVIM_NODE_LOG_FILE has to be set to an absolute path beginning with root, /, ie, ~ doesn't get resolved.

nomasprime avatar Jun 08 '20 23:06 nomasprime

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 avatar Jun 08 '20 23:06 nomasprime

@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 avatar Jul 08 '20 14:07 jeffwillette

@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.

nomasprime avatar Jul 08 '20 21:07 nomasprime

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

jeffwillette avatar Jul 09 '20 02:07 jeffwillette

see also https://github.com/neovim/node-client/issues/41

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

justinmk avatar Aug 30 '20 19:08 justinmk