-
Notifications
You must be signed in to change notification settings - Fork 589
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
Upstream official Rust package #178
Comments
(Also, in case this is accepted, how would upgrading work for people who have installed the Package Control Rust package and upgrade to a sublime containing the package by default? will the package be silently overridden, or will it cause issues?) |
Package Control installs packages as a If there is a All of that is to say, users who have installed |
If (and only if) the @rust-lang group would then stop maintaining their own package and start updating this one though, you'd be overwriting a possibly newer file here with an older one there. Not implying that would happen, simply stating what could possibly happen if that were the case. |
We would continue to maintain if necessary (perhaps just making it a simple copy), and when the sublime version with Rust is released, release a new version of the package control package with release notes mentioning that it's installed by default. |
@Manishearth I am planning on converting it to the new |
it as in the Rust package? sounds cool! I thought tmLanguage files were okay in default-packages, though? |
oh, looks like they aren't. Thanks for offering to convert it; I have no idea how to do that 😄 (though it probably isn't too hard) |
@Manishearth Yes, I spoke with Jon and we would both like to get Rust included in the default packages. There is an automated script to convert it to the new syntax. At that point I'll review the current definition and look for any features (such as lookbehinds) that aren't compatible with the newer regex engine and find an alternative way to implement them. This helps improve performance – not only the file load time, but also the speed of the indexer since it tokenizes all the files it finds. To give you a sense of the performance difference, recently I rewrote the JavaScript syntax and achieved about a 400% improvement in speed by avoiding the few regex features not available in the new engine. The only other thing I could use from the Rust community is some files that exhibit various syntax, especially edge cases. I'll then write a test file to ensure that we don't have any regressions from future pull requests. |
Ooh, nice.
https://github.com/rust-lang/rust/tree/master/src/test/run-pass contains a ton of testcase files you might want to use to check how the highlighting works. rustfmt's tests contain more specific syntax examples. If you'd like more examples of some specific syntax let me know, and I can enumerate how that syntax works. cc @nrc |
I've just added an initial version of Rust support with 58cb410. I started with https://github.com/rust-lang/sublime-rust and did the following:
Our plan is to include this in the next dev build. Anyone with the current Rust package installed via Package Control will not see this package when it is included. They would need to uninstall the version from Package Control to get all of the new features and enhancements. It may be desirable for the Rust team to make a new release of the package for ST3 that includes an upgrade message indicating future changes will be available along with Sublime Text itself. It is also possible that the name of the package could be changed from We can discuss these ideas at https://github.com/rust-lang/sublime-rust/issues if you'd like. |
Thanks for doing this! We'll coordinate further on rust-lang/rust-enhanced#72 |
Currently Rust maintains a Sublime package here which handles syntax/snippets/etc. It does not handle autocompletion, though there are packages for that.
It would be nice if it was bundled by default. Opening this bug to see if there are any objections to that before opening a PR 😄
I assume it's a straightforward matter of copying the Rust package into this folder, but of course I'll test it out first.
The text was updated successfully, but these errors were encountered: