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

[ new ] Add support for Idris 2 programming language #3150

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

buzden
Copy link
Contributor

@buzden buzden commented Dec 24, 2024

Idris 2 is a pretty big and well-known programming language among purely functional languages supporting dependent types. But it still lacks support by bat, and thus by other tools like delta and typst. I suggest to add support for it with this PR.

@buzden buzden force-pushed the add-idris-syntax branch 3 times, most recently from 0c76381 to 12c583b Compare January 20, 2025 14:06
@keith-hall
Copy link
Collaborator

Hi, thanks for this. It would be nice to get some indication of how popular Idris 2 is, to help us decide whether it meets our criteria for inclusion by default.
Otherwise the next step could be to try get a curated list of packages going and add it there: trishume/syntect#168

@buzden
Copy link
Contributor Author

buzden commented Jan 27, 2025

It would be nice to get some indication of how popular Idris 2 is

Well, maybe some statistics from GitHub may help.

There are ~1600 repositories using this language solely on GitHub, around 10000 issues and PRs in these projects, GitHub has its syntax highlighting for its comments (it also has strong requirements on language popularity).

criteria for inclusion by default.

Well, this criterion is valid for popular languages in Sublime text editor, as far as I understand. Sublime is not supported by Idris (Idris language has interactive compiler and closely works with the editor, supporting only vim, emacs and vscode). Thus, sublime highlighting was created specially to be supported by bat/syntect from scratch based on ideas from existing highlighting, e.g. for Haskell, with which Idris shares a lot of common syntax, but still differs significantly.

Additionally, I dared to suggest to include Idris while formally not meeting this criterion because I checked some already added languages and they also did not meet it formally, thus I thought that it is not valid anymore.

Otherwise the next step could be to try get a curated list of packages going and add it there: trishume/syntect#168

Am I right that you suggest adding my syntax definitions here and here (interestingly, the second one seems to use tmLanguage formal instead of sublime-syntax)? It looks feasible, at least the first onem since it uses the same format of config files.

Copy link
Collaborator

@keith-hall keith-hall left a comment

Choose a reason for hiding this comment

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

Idris (Idris language has interactive compiler and closely works with the editor, supporting only vim, emacs and vscode). Thus, sublime highlighting was created specially to be supported by bat/syntect from scratch based on ideas from existing highlighting

Ah, good to know, thanks for the context.

Additionally, I dared to suggest to include Idris while formally not meeting this criterion because I checked some already added languages and they also did not meet it formally, thus I thought that it is not valid anymore.

We have indeed unofficially relaxed the requirements a bit since lazy loading of syntaxes was implemented, to reduce the startup cost of having many languages. (#2181)

Considering this, and that it was written especially for bat and friends, then let's merge it 🎉

CHANGELOG.md Outdated Show resolved Hide resolved
auto-merge was automatically disabled January 27, 2025 20:47

Head branch was pushed to by a user without write access

@buzden
Copy link
Contributor Author

buzden commented Jan 27, 2025

Oh, seems I have unintentnially broken the merge process. I saw that auto-merge was not working seemingly because master branch has already moved forward, I rebased it, and this has disabled auto-merge.

@keith-hall keith-hall enabled auto-merge January 27, 2025 20:56
@keith-hall keith-hall merged commit 487ac3b into sharkdp:master Jan 27, 2025
24 checks passed
@buzden buzden deleted the add-idris-syntax branch January 27, 2025 21:01
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.

2 participants