Skip to content
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

Support Wing in GitHub syntax highlighting (linguist) #1038

Open
eladb opened this issue Jan 4, 2023 · 10 comments
Open

Support Wing in GitHub syntax highlighting (linguist) #1038

eladb opened this issue Jan 4, 2023 · 10 comments
Labels
📚 documentation Improvements or additions to documentation ✨ enhancement New feature or request

Comments

@eladb
Copy link
Contributor

eladb commented Jan 4, 2023

Community Note

Please vote by adding a 👍 reaction to the issue to help us prioritize.
If you are interested to work on this issue, please leave a comment.

Feature Spec

NOTE: This is likely not something we can do right now because GitHub are requiring "in the wild" usage of Wing backed by code search results. It's also something the we would want to do once our syntax stabilizes because it takes about 4 months for them to release an update.

GitHub now recognizes Wing files with syntax highlighting:

  1. Any .w file
  2. Markdown code blocks: ```w

Any other implications (code search etc).

Use Cases

Obvious

Implementation Notes

See adding-a-language in the contribution guide for linguist.

Component

Other

@eladb eladb added ✨ enhancement New feature or request good first issue Good for newcomers labels Jan 4, 2023
@github-actions
Copy link

github-actions bot commented Mar 6, 2023

Hi,

This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days.
Feel free to re-open this issue when there's an update or relevant information to be added.
Thanks!

@github-actions github-actions bot added the Stale label Mar 6, 2023
@eladb
Copy link
Contributor Author

eladb commented Mar 6, 2023

Keep

@github-actions github-actions bot removed the Stale label Mar 7, 2023
@MarkMcCulloh
Copy link
Contributor

The current guideline for when they would consider adding a new language is here:

  • at least 2000 files per extension indexed in the last year (the number you see at the top of the search results), unless the extension is expected to only occur once per repo, then 200 files.
  • with a reasonable distribution across unique :user/:repo combinations assessed by manually and randomly clicking through the results.

If particular users are showing a high proportion of the results, I'll manually filter out those users using -user: to reduce their impact on my assessment.

Given this, we're still a while away from being considered.

@MarkMcCulloh MarkMcCulloh removed the good first issue Good for newcomers label May 1, 2023
@Chriscbr
Copy link
Contributor

Chriscbr commented May 1, 2023

@MarkMcCulloh any idea how we could support Wing syntax highlighting in our docsite / blog posts? 🤔

@MarkMcCulloh
Copy link
Contributor

The usual solution would highlighting through a remark plugin. Ideally, we could use something we already have for highlighting (either tree-sitter grammar+query or textmate grammar).
I haven't tried it, but shiki seems like a good choice.

plugin + here's how to load our custom grammar

@Chriscbr
Copy link
Contributor

Chriscbr commented May 1, 2023

I haven't tried it, but shiki seems like a good choice.

shiki-twoslash also looks pretty cool

@MarkMcCulloh
Copy link
Contributor

MarkMcCulloh commented May 1, 2023

I haven't tried it, but shiki seems like a good choice.

shiki-twoslash also looks pretty cool

Yep it's super cool, although unfortunately not reasonably usable for wing. Maybe one day though.

In theory, it could also be possible to create an optimized version of the playground designed for embedding into docs/blogs. That would give us similar lsp powers, with the Console to boot.

@eladb
Copy link
Contributor Author

eladb commented Oct 19, 2023

Created github-linguist/linguist#6585

@eladb
Copy link
Contributor Author

eladb commented Nov 29, 2023

I think we qualify for adding Wing to GitHub (query).

@Chriscbr
Copy link
Contributor

Chriscbr commented Dec 19, 2023

To anyone looking for a workaround, you can download this Chrome extension that adds Wing syntax highlighting when you're browsing GitHub: https://chromewebstore.google.com/detail/winglang-syntax-hightligh/gjnleleianfjpmckmmdeahlklhcdlakj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 documentation Improvements or additions to documentation ✨ enhancement New feature or request
Projects
Status: 🤝 Backlog - handoff to owners
Development

No branches or pull requests

4 participants