-
Notifications
You must be signed in to change notification settings - Fork 13.3k
rustc compiler config for Vim #7747
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
Conversation
Note that this is not actually *used* by default; it is a matter of configuration still, because you might want to: - Compile all .rs files with `rustc %` (where each can be built itself) - Compile all .rs files with `rustc some-file.rs` (where you are editing part of a crate) - Compile with a different tool, such as `make`. (In this case you might put a `~/.vim/after/compiler/rustc.vim` to match such cases, set makeprg and extend errorformat as appropriate. That should probably go in a different compiler mode, e.g. make-rustc.) To try using it, `:compiler rustc`. Then, `:make` on a file you would run `rustc` on will work its magic, invoking rustc. To automate this, you could have something like `autocmd FileType rust compiler rustc` in your Vim config.
Suggestion: Add a |
@kballard Hmm, not sure about that. That's not the idea of a compiler plug-in. Then also: if it runs for a long time, it blocks Vim, and if it writes to stdout/stderr, you'll get lines that are unlikely to match |
@chris-morgan Fair enough. Would be nice to add a |
@kballard I could do that, but it's be equivalent to |
@chris-morgan: |
This allows to run the contents of a buffer through "rust run" and show the results in a scratch buffer. Handy for things that are just a bit too big to be done comfortably in rusti. Refs rust-lang#7747
Note that this is not actually *used* by default; it is a matter of configuration still, because you might want to: - Compile all .rs files with `rustc %` (where each can be built itself) - Compile all .rs files with `rustc some-file.rs` (where you are editing part of a crate) - Compile with a different tool, such as `make`. (In this case you might put a `~/.vim/after/compiler/rustc.vim` to match such cases, set makeprg and extend errorformat as appropriate. That should probably go in a different compiler mode, e.g. make-rustc.) To try using it, `:compiler rustc`. Then, `:make` on a file you would run `rustc` on will work its magic, invoking rustc. To automate this, you could have something like `autocmd FileType rust compiler rustc` in your Vim config.
…ednet Correctly handle signs in exponents in numeric_literal::format() Fixes rust-lang#7744 changelog: Correctly handle signs in exponents in `numeric_literal::format()`
feat: Package Windows release artifacts as ZIP and add symbols file Closes rust-lang#13872 Closes rust-lang#7747 CC rust-lang#10371 This allows us to ship a format that's easier to handle on Windows. As a bonus, we can also include the PDB, to get useful stack traces. Unfortunately, it adds a couple of dependencies to `xtask`, increasing the debug build times from 1.28 to 1.58 s (release from 1.60s to 2.20s) on my system.
Note that this is not actually used by default; it is a matter of
configuration still, because you might want to:
rustc %
(where each can be built itself)rustc some-file.rs
(where you are editingpart of a crate)
make
. (In this case you mightput a
~/.vim/after/compiler/rustc.vim
to match such cases, setmakeprg and extend errorformat as appropriate. That should probably go
in a different compiler mode, e.g. make-rustc.)
To try using it,
:compiler rustc
. Then,:make
on a file you wouldrun
rustc
on will work its magic, invoking rustc. To automate this,you could have something like
autocmd FileType rust compiler rustc
inyour Vim config.