Skip to content

Add syntax highlighting for Swift DocC Tutorial files - #2320

Merged
matthewbastien merged 7 commits into
swiftlang:mainfrom
Padmashree06:docc-syntax-highlighting
Sep 3, 2026
Merged

Add syntax highlighting for Swift DocC Tutorial files#2320
matthewbastien merged 7 commits into
swiftlang:mainfrom
Padmashree06:docc-syntax-highlighting

Conversation

@Padmashree06

@Padmashree06 Padmashree06 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds:

  • Syntax highlighting for .tutorial files, including directives with and without arguments (@Step, @Tutorial(...), etc.)
  • @Comment { } blocks highlighted separately as comments
  • Auto-closing for braces, parentheses, quotes and backticks, along with corrected folding markers.

Issue: #1331

Tasks

  • Required tests have been written
  • Documentation has been updated
  • Added an entry to CHANGELOG.md if applicable

@matthewbastien

Copy link
Copy Markdown
Member

The unacceptable language check doesn't like the use of the word master in syntaxes/tutorial.tmLanguage.json. You'll have to add that file to the .unacceptablelanguageignore file.

Comment thread package.json Outdated
Comment thread syntaxes/tutorial.tmLanguage.json Outdated
Comment thread syntaxes/markdown-docc.tmLanguage.json Outdated
Comment thread package.json
Comment thread package.json Outdated
Comment thread package.json Outdated
@matthewbastien

Copy link
Copy Markdown
Member

Given that it seems like adding a Swift DocC Markdown language type is going to be more involved than we first thought, perhaps we should split this into two separate PRs. One for Swift DocC Tutorial syntax and another for Swift DocC Markdown.

@Padmashree06
Padmashree06 force-pushed the docc-syntax-highlighting branch from 1fed56c to 2c74c15 Compare August 5, 2026 20:09
@Padmashree06 Padmashree06 changed the title Add syntax highlighting for Tutorial files Add syntax highlighting for Swift DocC Tutorial files Aug 5, 2026
@Padmashree06

Copy link
Copy Markdown
Contributor Author

Given that it seems like adding a Swift DocC Markdown language type is going to be more involved than we first thought, perhaps we should split this into two separate PRs. One for Swift DocC Tutorial syntax and another for Swift DocC Markdown.

Yes the syntax highlighting for Swift DocC Markdown has been moved to a separate PR - #2327

@matthewbastien matthewbastien left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just one more thing before this is good to go: can you add an entry to the changelog for this?

@Padmashree06

Copy link
Copy Markdown
Contributor Author

Just one more thing before this is good to go: can you add an entry to the changelog for this?

I have added it to changelog!

@Padmashree06
Padmashree06 force-pushed the docc-syntax-highlighting branch from fa051a6 to f038985 Compare August 19, 2026 18:28
Comment thread CHANGELOG.md Outdated
@Padmashree06
Padmashree06 force-pushed the docc-syntax-highlighting branch from f038985 to 333c68b Compare August 19, 2026 18:56

@matthewbastien matthewbastien left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you!

@matthewbastien
matthewbastien merged commit 6a1f34f into swiftlang:main Sep 3, 2026
29 checks passed
@Padmashree06

Copy link
Copy Markdown
Contributor Author

Thank you for merging!!

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants