Code Monkey home page Code Monkey logo

grpc-nvim's People

Contributors

hudclark avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

antosha417

grpc-nvim's Issues

Using variables to DRY and not clutter requests file

Hi!

Great plugin, it's very similar to this one: https://github.com/baverman/vial-http, which I use for REST APIs. Thank you for maintaining it.

I have one question though, I'm trying to figure out if I can use variables to not clutter my requests file, and to avoid hardcoding stuff. This is what I would like to do:

grpc -H "authorization: Bearer $ACCESS_TOKEN" -plaintext localhost:50051 position.Position.RecordPosition
{
    "lat": 1234,
    "long": 42
}

I tried many variants of this command with no success. ACCESS_TOKEN is an env var in this context, but I wouldn't mind if it was just one variable at the top of the file.
I really want to do that because I have many different requests using an access token, and hardcoding the token in each of them is not practical (the token changes regularly).

Is there a way to do that?

Tree sitter grammar for grpc files

Hey @hudclark! How you doing?
I created a simple tree sitter grammar for *.grpc files.
I wanted to combine bash and json treesitter grammars but didn't find a way to do it. So I extended bash grammar and copied json into it. We can now use it for syntax highlighting and arguments parsing.

What do you think about it? Should we give a link to the grammar in readme?

Support arguments with spaces

Hey! Very like idea of the plugin, great job!
I'm using https://github.com/rest-nvim/rest.nvim for the similar purpose but for http requests.

I'm trying to get it working with Authorization header and get an error.
I'm executing :Grpc command on a line that looks like:
grpc -H "Authorization:Bearer blablabla" localhost:443 com.actions.v2.Service/List

And see output:

// grpcurl -H "Authorization:Bearer blablabla" localhost:443 com.actions.v2.Service/List
Too many arguments.
Try 'grpcurl -help' for more details.

However if I copy the first commented line from output and execute it in terminal I see the response.

Can we add a support for headers such headers?

Also would be cool to somehow specify this header only once and have it on every request. Can be done per buffer variables I think. So I would not have to specify this header on each query. What do you think?

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.