-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Share sublime syntaxes #919
Comments
I've seen that quite often, |
@Keats Thank you for your suggestion. As initially discussed in trishume/syntect#287, that sounds like a good idea in principle. Before we go forward with this, I'd first like to think about the possible downsides as well. I'm only interested in following this route, if it really leads to less maintenance work overall. There are also a few questions/problems that would need to be sorted out. Pros:
Cons (some of them are specific to
Potential issues:
In summary, I would currently actually tend towards keeping things as they are. Maintaining |
Related discussion on the syntect repo: trishume/syntect#168 |
Pasting my comment from a different issue:
I understand the concerns about git submodule. I am not knowledgable about syntect, but I would like to enquire about the feasibility of doing the syntax data as a crate? That way, we can keep it in this repo (using cargo workspaces). |
Keats originally opened this up about having a central dumping ground for syntaxes which had some downsides (bloat, worse development experience for bat). We've seen though that there are cases where tools are fine "just doing whatever bat does" (broot, delta). I'm yet another person who wants to copy bat in my own tool, git-dive, a potential replacement for git-blame (so maybe #1536 won't be needed if this works out?). delta is taking the approach of depending on
These crates would reside in the There is still changelog management (I'm hopeful [cargo-changelog])https://crates.io/crates/cargo-changelog) will help) and selecting versions. For versions, I use conventional commit style so I'm less likely to miss breaking changes when choosing my version but I would even be fine if these crates bumped their major version on every release. |
@epage Thank you for your input. I'm willing to consider this now that I have some experience with cargo workspaces from another project.
I'm not sure I understand what the difference is? What would the first "syntax and theme asset crate" be? A very low-level crate that basically just includes the binary assets and one or two functions to get access to them (in a While that would allow even more flexibility, I'd still lean towards keeping the number of crates minimal. If we would have a proper cargo workspace though, we could also cleanly separate the bat crate into a library and the CLI. |
Yes, the crates would be
The reason I was thinking multiple crates
|
I'm seemingly in the same position as @epage where I just want to do whatever I'd be up for putting in the work to either provide it as a separate crate(s) in a workspace here, or just providing it as a separate crate on crates.io if it's deemed too much effort to maintain here |
I went ahead and threw together a quick crate that roughly has the core functionality that I would want. All it currently provides:
Some misc internal changes include switching the This doesn't add the asset loader logic that Re:
It would be pretty easy to switch things over and integrate some variation of my crate into |
Bat and Zola both use syntect for highlighting syntaxes and have their own folder for additional syntaxes on top of the official Sublime repo. It would be a good idea to merge so there is one known source of syntaxes that all of syntect users can contribute to.
The idea would be:
A bonus point for syntect is to have a Rust CI setup on that repo that tests every syntax for both rust-onig and fancy-regex, which can be used to report potential bugs/issues.
The text was updated successfully, but these errors were encountered: