Skip to content

Add definition in the newer .sublime-syntax file#16

Open
kbjr wants to merge 4 commits intosamsalisbury:masterfrom
kbjr:sublime-syntax
Open

Add definition in the newer .sublime-syntax file#16
kbjr wants to merge 4 commits intosamsalisbury:masterfrom
kbjr:sublime-syntax

Conversation

@kbjr
Copy link
Copy Markdown
Contributor

@kbjr kbjr commented Jul 12, 2025

This PR adds a new file containing the .sublime-syntax file generated by using Sublime's built-in converter. This did require making a small change to the .tmLanguage file before the converter tool would recognize it, seen below:

diff --git a/httpspec.tmLanguage b/httpspec.tmLanguage
index 3b77816..2c07762 100644
--- a/httpspec.tmLanguage
+++ b/httpspec.tmLanguage
@@ -13,6 +13,10 @@
                <dict>
                        <key>name</key>
                        <string>meta.request.httpspec</string>
+                       <key>begin</key>
+                       <string></string>
+                       <key>end</key>
+                       <string></string>
                        <key>patterns</key>
                        <array>
                                <dict>
@@ -458,4 +462,4 @@
        <key>uuid</key>
        <string>7bb6ff35-8b8a-4480-91ec-20f2d3fcba9a</string>
 </dict>

See http://www.sublimetext.com/docs/syntax.html for details about the new .sublime-syntax format.

@kbjr kbjr force-pushed the sublime-syntax branch from 93c5353 to eca4c8c Compare July 12, 2025 02:28
Copy link
Copy Markdown
Owner

@samsalisbury samsalisbury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @kbjr, thanks for the PR, just a few things to consider:

  • Would it break things if we kept the changes made to the .tmLanguage file there as well to make future conversions easier?
  • Can we add this new file to the test workflow?
  • Could we perform the conversion in the workflow to validate that the files are equivalent?

Thanks

@kbjr
Copy link
Copy Markdown
Contributor Author

kbjr commented Sep 4, 2025

Would it break things if we kept the changes made to the .tmLanguage file there as well to make future conversions easier?

I'm not sure, so I left it out for safety. I can try loading up the updated file in Sublime and test some stuff out manually to see if it looks like its still working.

Can we add this new file to the test workflow?

Yeah, it looks like the validation tool supports the new file format too, so that should be as easy as adding it to the list.

Could we perform the conversion in the workflow to validate that the files are equivalent?

That I'm not sure. I didn't find any evidence of an easily scriptable way to do the conversion when I was first looking into this; I triggered the conversion tool from in sublime's command palette to generate this file.

Copy link
Copy Markdown
Owner

@samsalisbury samsalisbury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, thanks for adding to the workflow, this is good to merge. I added a basic readme pointing to this PR for reference on how to contribute. If you have time, it would be great to add a bit more of a stop-by-step to the readme for the process you followed here.

@kbjr
Copy link
Copy Markdown
Contributor Author

kbjr commented Sep 5, 2025

The loaded the updated .tmLanguage file into sublime and played around with it a bit, and it seemed okay, so I've included the update here.

I also added a section to the readme file with more details about how to do the conversion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants