github-linguist / linguist

Language Savant. If your repository's language is being reported incorrectly, send us a pull request!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Language: Imba

familyfriendlymikey opened this issue · comments

commented

Language name

Imba

URL of example repository

Imba.io repository

URL of syntax highlighting grammar

Imba's vscode extension

Most popular extensions

.imba

Detected language

Plain text

Popularity

Pull Request Information

  • Here's my fork, grammar compilation failed citing several PCRE errors, despite syntax highlighting working in VSCode.
  • Here's the source of the provided sample, MIT license.

Next Steps

In CONTRIBUTING.md it says

If problems are found, please report them to the grammar maintainer

I would very much appreciate some guidance on next steps. Thank you.

There are 2,864 .imba files on GitHub.

I wonder how many files would show up if private repos could be counted too.

Also, as Imba requires much less configuration, and can express styling, markup and logic in a single language (and thus, a single file), the number of Imba files will always be "artifically low".

Crossing my fingers Imba can be included soon! 🤞 🤞

And I was about to suggest Imba too. Cool!

I would very much appreciate some guidance on next steps. Thank you.

Sure...

Here's my fork, grammar compilation failed citing several PCRE errors, despite syntax highlighting working in VSCode.

If you're seeing errors it's because you're using Oniguruma-specific expressions and/or are using very long expressions. This should be clear in the errors. These work on VSCode because it uses that regex engine which isn't particularly strict, however GitHub uses PCRE for performance reasons. In order to resolve those, you'll need to switch out the Oniguruma-specific expressions for PCRE-compatible expressions and ensure your expressions aren't too long and adhere to PCRE's limits.

@familyfriendlymikey Maybe you could try pointing at

path = vendor/grammars/language-imba
url = https://github.com/somebee/language-imba

Instead of

path = vendor/grammars/vscode-imba
url = https://github.com/imba/vscode-imba.git

And see if it passes then? Would love to see imba included at some point!

commented

@lildude Thank you very much for explaining. I've fixed the expressions and submitted a PR: #6080