linguist icon indicating copy to clipboard operation
linguist copied to clipboard

Add SurrealQL language

Open kearfy opened this issue 1 year ago • 2 comments

Implements grammar for SurrealDB's query language, SurrealQL.

Description

Adds grammar for the SurrealQL language

Checklist:

  • [x] I am adding a new language.
    • [x] The extension of the new language is used in hundreds of repositories on GitHub.com.
      • Search results for each extension:
        • https://github.com/search?q=path:*.surql&type=code
        • https://github.com/search?q=path:*.surrealql&type=code
        • https://github.com/search?type=repositories&q=NOT+is:fork+path:*.surql+surrealql+surrealdb
        • I'd like to note that many people in the past have simply been using .sql as a file extension for SurrealQL. We started pushing for .surql (along with .surrealql as it's the full name) since a short while, and our community has been adopting it since. Additionally, people also tend to use SurrealQL within their code too, and we plan on adding more injection grammars in the future (not sure if this is accepted in Linguist, but I left it in for the moment).
    • [x] I have included a real-world usage sample for all extensions added in this PR:
      • Sample source(s):
        • Samples grabbed from our features page: https://surrealdb.com/features
      • Sample license(s):
        • Apache 2.0
    • [x] I have included a syntax highlighting grammar: https://github.com/surrealdb/surrealql-grammar
    • [x] I have added a color
      • Hex value: #ff00a0
      • Rationale: This is our brand color
    • [ ] I have updated the heuristics to distinguish my language from others using the same extension.

kearfy avatar Dec 19 '23 08:12 kearfy

Hi @lildude, I noticed you added the "Pending Popularity" label to the PR.

I previously figured we met that requirement as we there are over 500 SurrealQL files on GitHub, excluding possible inline SurrealQL queries. The PR template mentions that a language needs to be used across hundreds of repositories on GitHub. I added another link to the PR which shows that there are over 500 repositories related to surql/surrealql/surrealdb.

Could you possibly clarify these requirements? Thank you! 😃

kearfy avatar Dec 20 '23 11:12 kearfy

I previously figured we met that requirement as we there are over 500 SurrealQL files on GitHub, excluding possible inline SurrealQL queries.

Our current assessment guidelines are detailed in https://github.com/github-linguist/linguist/issues/5756 (this is linked in the CONTRIBUTING.md doc too). Your query also doesn't exclude forks. Doing so brings things down to 292 files.

I did a very quick check for 2000 files as I assumed a repo would have multiple .surql files.

lildude avatar Dec 21 '23 10:12 lildude