Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Support vim mode (read from stdin) #7

Closed
chipsenkbeil opened this issue Aug 13, 2020 · 0 comments
Closed

Support vim mode (read from stdin) #7

chipsenkbeil opened this issue Aug 13, 2020 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@chipsenkbeil
Copy link
Owner

While I want to use Juniper as the library to define schema, operations, etc; I don't want vim to have to talk over web. There is no built-in HTTP requests for vimscript and calling out to curl (or equivalent) may not be ideal. Additionally, for realtime operations, HTTP may not be the best due to its overhead.

Rather, it would be nice to be able to launch a vimwiki daemon in "vim mode" similar to many LSPs where it listens on stdin for input rather than a socket. Queries, mutations, and subscriptions can still be issued and responses received. Main challenge would be that a callback id needs to be associated with requests and returned with responses so that vim can map responses async rather than blocking for a response, especially if other responses arrive inbetween.

Each request/response would be a single line of stdin/stdout. As described in GraphQL's HTTP documentation, a GraphQL query/mutation/subscription can be represented as encoded JSON. So we may be able to parse a custom id field at the top level, maintain that id through a request, and add it to the top level of a response when using stdin/stdout. For web/HTTP, there is no need to do that as the mapping information is encoded in the protocol already.

@chipsenkbeil chipsenkbeil added this to To do in vimwiki-server via automation Aug 13, 2020
@chipsenkbeil chipsenkbeil added this to the 0.1 milestone Aug 19, 2020
@chipsenkbeil chipsenkbeil modified the milestones: 0.2, 0.1 Oct 21, 2020
@chipsenkbeil chipsenkbeil added the enhancement New feature or request label Oct 21, 2020
vimwiki-server automation moved this from To do to Done Oct 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

1 participant