AnWeber / vscode-httpyac

Quickly and easily send REST, Soap, GraphQL, GRPC, MQTT and WebSocket requests directly within Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=anweber.vscode-httpyac
MIT License
222 stars 20 forks source link

Added navigation for request Body files #250

Closed mondhs closed 5 months ago

mondhs commented 6 months ago

Request add navigation for request body files.

Idea is that if I have many request files it would be nice to jump over when ever I need for review or editing. It would like this:

test_httpyac-1703946442023

Currently it works with json extension files as I am using them most, but this filtering list might externalized to configuration in a future.

My code is based on https://github.com/abierbaum/vscode-file-peek

AnWeber commented 6 months ago

The idea is great. I'm just wondering whether it's really necessary to parse the location links separately. I already parse the file with the httpyac lib to provide the code lens. To get the needed Positions for the CodeLens I use a HttpSymbol . If we also specifically mark the links in these symbols (new SymbolKind.File), we could generalize the problem and thus also use the parsing for the import of Proto files, for example.

mondhs commented 6 months ago

I refactored code to used HttpRegions and removed bunch of redundant code and overwhelming logging.

If it would be symbol such as file for requests, imports etc, it would be possible get universal solution.

mondhs commented 5 months ago

@AnWeber Could I change my pull request to make it acceptable?

AnWeber commented 5 months ago

@mondhs Hi sorry the ball is in my court. Unfortunately, I'm really out of action at the moment due to a corona illness. I'm slowly getting back. I'll take a look at it soon. Sorry for the delay.

AnWeber commented 5 months ago

thx for your contribution. I have added support for a few more file imports (gql, proto, intellij script import) and released it now. Thanks again