Skip to content

Add simple snippets support #70

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

Conversation

Kyle-Ye
Copy link
Contributor

@Kyle-Ye Kyle-Ye commented Aug 16, 2022

  • Add simple snippets support
  • Add .vscode to .gitignore file

Bug/issue #, if applicable:

Close #52

Summary

Add Swift Snippets Support for swift-markdown package

See more discussion on this forum post https://forums.swift.org/t/swift-snippets/51947

Dependencies

swiftlang/swift-package-manager#3694

Testing

  1. On VSCode

Navigate to the snippet file. Right-click to open the menu, choose Swift and then Run Swift Snippet

image

  1. On Terminal
# checkout to this branch and cd into swift-markdown repo
export SWIFTPM_ENABLE_SNIPPETS=1 
swift package learn
# swift-markdown

## Products

- Markdown (library)
- markdown-tool (executable)

## Snippets

0. Parsing (2 snippets)
   Examples on how to use Swift Markdown Framework to parse the Markdown String into Swift object

1. Visiting (1 snippet)
   Examples on how to use Swift Markdown Framework to visit the Markdown object

Choose a group by name or number.
To exit, enter 'q'.
>>> 
# Parsing

Examples on how to use Swift Markdown Framework to parse the Markdown String into Swift object

0. ParseString
   Example on how to parse Markdown from string

1. ParseFile
   Example on how to parse Markdown from file

Choose a number or a name from the list of snippets.
To go back, press ↩.
To exit, enter `q`.
>>> 

Checklist

  • Updated documentation if necessary

@Kyle-Ye
Copy link
Contributor Author

Kyle-Ye commented Sep 30, 2022

@swift-ci please test

@TimTr
Copy link
Contributor

TimTr commented Jan 25, 2023

This is a little out of date, so wanted to follow-up. This looks like some snippets added to the markdown repo, at least in part to try out another feature in VSCode's Swift plugin. I'm not really seeing that functionality in VSCode, but may be missing it.

Related to this specific PR, though, is it still relevant? There are now quite a few snippets in the repo, and they are used within the DocC catalog as well. Should we just close this PR?

@Kyle-Ye
Copy link
Contributor Author

Kyle-Ye commented Jan 29, 2023

Close since #94 is merged.

@Kyle-Ye Kyle-Ye closed this Jan 29, 2023
@Kyle-Ye Kyle-Ye deleted the snippets branch January 29, 2023 16:39
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.

Add Snippets playground support
2 participants