GithubHelp home page GithubHelp logo

Collection of Syntaxes Available about bat HOT 5 CLOSED

sharkdp avatar sharkdp commented on May 2, 2024
Collection of Syntaxes Available

from bat.

Comments (5)

aatxe avatar aatxe commented on May 2, 2024 2

TOML is a must-have, but I see in #37 you already added it. :)

Otherwise, my 0.02 would be Nix (since it's an increasingly popular package manager and definitely the kind of thing where I ordinarily use cat to check out a project config). I was also able to discern that the source for the Nix one is here and converted.

Vue also probably has substantial reach as a popular JS framework.

The rest (ignoring Django) are largely "exotic" languages, and so should perhaps be left out by default. I would personally benefit from the Coq one though.

from bat.

sharkdp avatar sharkdp commented on May 2, 2024

Thank you for the feedback!

Unfortunately, we will have to take performance considerations into account when adding lots of new syntax definitions, because (at least right now) the whole SyntaxSet is loaded into memory and deserialized on every run of bat.

Every user will still have the possibility to customize/extend his own syntax set, but I'm not sure we should "blindly" add all the syntax files we can get. When having to choose, I would probably go by popularity of the language (or the corresponding Sublime Text package).

Are there any languages from your list that you think should definitely be included?

from bat.

Porkepix avatar Porkepix commented on May 2, 2024

[First of all, sorry if that's not the right place to ask]

So, how/where are defined syntax languages for bat? Just discovered the project and saw that .ini files didn't have coloration. I tried to look a bit and quickly into this repository and syntect to see where is it and where should it be signaled, I'm still unsure though.

And maybe some could be loaded optionnaly if needed, to extend the number of managed language? (lazy load?)
Especially, this could be potentially be extended with tools later on, like something doing syntaxic coloration for logs for example.

from bat.

sharkdp avatar sharkdp commented on May 2, 2024

Otherwise, my 0.02 would be Nix (since it's an increasingly popular package manager and definitely the kind of thing where I ordinarily use cat to check out a project config). I was also able to discern that the source for the Nix one is here and converted.

I'd be okay with adding Nix, but I cannot find any .sublime-syntax files in that repo. I would like to avoid having to manually add syntax files somewhere, if possible.

So, how/where are defined syntax languages for bat?

Syntaxes are stored in the bat executable itself. They are loaded in there from this binary file which is, in turn, created by the assets/create.sh script.

Just discovered the project and saw that .ini files didn't have coloration. I tried to look a bit and quickly into this repository and syntect to see where is it and where should it be signaled, I'm still unsure though.

You can list all supported languages by calling

bat --list-languages

And maybe some could be loaded optionnaly if needed, to extend the number of managed language? (lazy load?)

Yes, this would be an option. However, loading .sublime-syntax files from disk and parsing them is quite costly and would significantly affect bat's speed. Have you seen the "Customization" chapter in the README?

from bat.

sharkdp avatar sharkdp commented on May 2, 2024

I am going to close this ticket. Please feel free to open dedicated tickets for single languages that should be added to bat, preferably with a link to a repository with a .sublime-syntax file and some example source code to test it.

from bat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.