Closed antosha417 closed 1 year ago
Another unrelated question: How do you get syntax highlighting in grpc
file? I don't get any.
I took a bit closer look at this plugin and found the problem. In read-request-args arguments are separated by space. But my argument should contain space after the word Bearer
.
I think we can use bash treesitter parcer to parce arguments. It seems to work fine for this situation
@hudclark what do you think about it? I think I can open a pr for this one
@antosha417 Sorry for my late reply!
That sounds like a great patch to make. If you put up a PR, I would be happy to review & merge it. Thank you
Another unrelated question: How do you get syntax highlighting in
grpc
file? I don't get any.
I have not written grpc-nvim specific syntax highlighting yet, but I if you set the filetype of the .grpc
file to javascript
, you can get reasonable syntax highlighting.
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.
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:
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?