GithubHelp home page GithubHelp logo

jinzhongjia / znvim Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 1.0 153 KB

neovim remote rpc client implementation with zig

Home Page: https://jinzhongjia.github.io/znvim/

License: MIT License

Zig 100.00%
neovim neovim-remote zig zig-package

znvim's Issues

Can I send signal from Neovim to trigger action in Zig?

Hello, and thank you very much for creating this library.

I'm trying to create an application that can interact with a live Neovim instance (via unix pipe) both ways back and forth.
I saw in your test file that connecting and sending commands to a live Neovim instance via unix pipe from Zig is possible.

However, I wonder if it's possible to, let's say, I press a keymap in Neovim, and my application in Zig receives that signal, and shows up.

Is this possible? Thank you very much!

Adding LICENSE to the project

Hello and thank you for creating the library and make it open source.
I really want to start using your library but I can't find any LICENSE file in the repo.
Could you please add a LICENSE file to indicate how permissive the usage of the code in this repo is?
Thank you kindly.

Reflector

My previous implementation was a piece of shit
Now I have to implement this library completely from scratch

Feature proposal: userdata in method callbacks

Wondering what you think of change the function signatures of ReqMethodType and NotifyMethodType from:

pub const ReqMethodType = *const fn (params: Payload, allocator: Allocator) ResultType;
pub const NotifyMethodType = *const fn (params: Payload, allocator: Allocator) void;

to:

pub const ReqMethodType = struct {
    userdata: ?*anyopaque = null,
    fn: *const fn (params: Payload, allocator: Allocator, userdata: ?*anyopaque) ResultType,
};
pub const NotifyMethodType = struct {
    userdata: ?*anyopaque = null,
    fn: *const fn (params: Payload, allocator: Allocator, userdata: ?*anyopaque) void,
};

This would allow embedders to pass along arbitrary userdata through each callback, preventing the need for global variables.

I can send in a PR if you are ok with this change.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.