Thank you for the offer, but I am currently tied up myself a lot. I was just
looking into this because the topic had popped up here.

I should have provided some context as to how the Neovim Racket client 
works.
When I'm experimenting I use the regular REPL from my terminal, not the 
client,
that's why I mentioned the REPL. In a real remote plugin it works like this:
when Neovim calls a function that's defined by a remote plugin an API client
process is started, which can then receive responses, notifications and send
back responses (using the MessagePack RPC protocol).

Let's say I have a remote plugin like this:

  #lang racket
  (require nvim)

  (nvim-function "GetTwo" (λ (args) 2))

This defines a function called `GetTwo` that can be called from Neovim. 
Neovim
then sends a request to the Racket client, the client executes the function 
`(λ
(args) 2)` and sends the result (the integer `2` in this case) back to 
Neovim.

For a completion plugin Neovim would send the current portion of the word to
complete (and if necessary other information like the current file name) and
Racket would return a list of matching symbol names. The function defined on
the Neovim side is really just an interface wrapper for sending a message to
the client, all the heavy lifting can be done in Racket.


On Thursday, February 15, 2018 at 7:52:24 PM UTC+1, Greg Hendershott wrote:
>
> I guess I'm not clear who does what, e.g. do you start a REPL for the 
> user? 
>
> If so, the `current-namespace` that's in effect when you call 
> `read-eval-print-loop` should probably come from doing 
> `(dynamic-require mp #f)` then the result of `(module->namespace mp)` 
> (where `mp` is a module path).  That same namespace is the one you'd 
> want to give to `namespace-mapped-symbols` for a list of completion 
> candidates. 
>
> p.s. Feel free to look at racket-mode code for ideas. However that's 
> accumulated a lot of moving parts; so I'm not sure if it's a great 
> example as a starting point. 
>
> p.p.s. Also see xrepl. 
>
> p.p.p.s. Although I'm tied up now through next week, I'd be happy to 
> hop on IRC or Slack or 1:1 email sometime after Feb 25, and talk 
> through ideas if that would help? 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to