VisualStudio 2022 - Syntax HIghlighting for HTTP files?

Jaeden Ruiner 126 Reputation points
2024-07-22T18:00:42.7866667+00:00

In VS 2022 it is possible to create a ".http" file.
https://learn.microsoft.com/en-us/aspnet/core/test/http-files?view=aspnetcore-8.0

It's an amazing little feature that I am building up libraries for my team to use for debugging and testing purposes.
However, I've noticed in the "Fonts and Colors" settings, there doesn't seem to be any indicators for which colors apply to which things within this file specification. How are variables and values colorized, reserved words, like GET or POST or PUT, and colorization of the xml or json content being submitted to the requests.

There is some colorization already, but no place to change the colors or enhance the syntax highlighting.

Where might I find these configuration elements?

Thanks

Jaeden "Sifo Dyas" al'Raec Ruiner

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,108 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Tianyu Sun-MSFT 30,566 Reputation points Microsoft Vendor
    2024-07-23T07:57:46.9133333+00:00

    Hello @Jaeden Ruiner ,

    You might need to take some time to find the correct item(Fonts and Colors > Display items) and change their colors.

    I list some items that you might need to check => Keyword(for example "Accept"), Markup Attribute, Markup Node(such as "GET", "POST" and "PUT"), Symbol Definition(for example @PATH),JSON Property Name, URL Hyperlink, Comment.

    User's image

    If I miss some items that you want to change in above list, please kindly let me know. By the way, it will be very useful if you also share some corresponding code snippets and screenshots with us to test and confirm.  

    Happy coding!

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.