rest.nvim icon indicating copy to clipboard operation
rest.nvim copied to clipboard

try to use treesitter instead

Open teto opened this issue 3 years ago • 0 comments

trying to use treesitter nodes to identify the requests, method etc instead of relying on weak heuristics.

The issue I have at the moment is the root node appears as a "document" https://github.com/rest-nvim/tree-sitter-http/blob/2c6c44574031263326cb1e51658bbc0c084326e7/grammar.js#L15 but I can't find it anywhere in the treesitter playground

TODO:

  • [ ] GET remove or ditch support for this syntax ?
/api/users?page=5 HTTP/1.1
Host: reqres.in:443
  • [ ] support of curl_raw_args ?
  • [ ] parse_url had if config.get("encode_url") then target_url = utils.encode_url(target_url) end, do we still need this ?
  • [ ] check one can set http_version as in older version
  • [ ] remove regex to capture the "script" part and instead retreive the content of the "internal_payload" node (problem is that currently the "internal_payload" node is full of errors)
  • [x] support external body
  • [ ] support embedded body

we already have variables

  • [x] should be able to list requests in a file

teto avatar Jan 06 '23 13:01 teto