| Age | Commit message (Collapse) | Author | Lines |
|
As we grow, these don't belong in-tree.
http://internals.rust-lang.org/t/moving-editor-highlighting-into-their-own-repos/1395
* https://github.com/rust-lang/rust.vim
* https://github.com/rust-lang/rust-mode
* https://github.com/rust-lang/gedit-config
* https://github.com/rust-lang/kate-config
* https://github.com/rust-lang/nano-config
* https://github.com/rust-lang/zsh-config
|
|
I added an option to auto-indent method chains to line up along their '.' operators. Like so:
```
let input = io::stdin().readline()
.ok()
.expect("Failed to read line");
```
The old default would indent like so:
```
let input = io::stdin().readme()
.ok()
.expect("Failed to read line");
```
The Rust guide explicitly condones the former, so I thought it would be nice for the emacs mode to support it. It's off by default, you have to set ```rust-indent-method-chain``` to ```t``` via your .emacs or the customize menu
|
|
|
|
keywords
|
|
Yay, syntax highlighting.
|
|
|
|
|
|
"_" should keep the default syntax class (symbol, not word). This
allows, e.g., `forward-word' to behave in the familiar way, jumping to
underscores within a function or variable name.
|
|
|
|
|
|
closes #17478
|
|
|
|
|
|
|
|
This addresses the font lock regression introduced by the earlier pull
request #14818 - attributes are no longer be highligted inside of comments
and strings.
Also add some font lock test infrastructure and some tests for attribute
font locking.
|
|
This addresses two problems noted in #14347: the highlight of `#foo]` as an attribute, and the non-highlight of `#[foo = "bar"]`.
|
|
|
|
Setting `OVERRIDE` to `t` overrides the conflicting highlight Emacs
places on string literals.
Fix #14347
|
|
part of #14347
|
|
|
|
Since rust-top-item-beg-re hasn't been defined yet, using defvar instead of
setq is more appropriate here (and also silences compilation warnings).
|
|
Lazy loading with autoload will result in faster startup time for Emacs
users and is generally the recommended approach for major modes.
|
|
Since rust-top-item-beg-re hasn't been defined yet, using defvar instead of
setq is more appropriate here (and also silences compilation warnings).
|
|
|
|
* Use `setq-local' instead of (set (make-local-variable ...) value).
Provides a version for older Emacsen.
* Remove use of `cl.el'.
* Use \' in file regexp instead of line end match $.
* Use type for defcustom and add parent group.
|
|
|
|
|
|
The rust-mode-indent-line function had a check, which ran after all the
calculations for how to indent had already happened, that skipped
actually performing the indent if the line was already at the right
indentation.
Because of that, the cursor did not jump to the indentation if the line
wasn't changing. This was particularly annoying if there was nothing
but spaces on the line and you were at the beginning of it--it looked
like the indent just wasn't working.
This removes the check and adds test cases to cover this.
|
|
The incompatibility of rust-mode with global-whitespace-mode warned
about in the README was actually fixed by commit 581b3db3b3. Remove the
warning from the README and close #3994.
|
|
|
|
This changes the indent to calculate positions relative to the enclosing
block (or braced/parenthesized expression), rather than by an absolute
nesting level within the whole file. This allows things like this to
work:
let x =
match expr {
Pattern => ...
}
With the old method, only one level of nesting would be added within the
match braces, so "Pattern" would have ended up aligned with the match.
The other change is that multiple parens/braces on the same line only
increase the indent once. This is a very common case for passing
closures/procs. The absolute nesting method would do this:
spawn(proc() {
// Indented out two indent levels...
})
whereas the code in this commit does this:
spawn(proc() {
// Indented out only one level...
})
|
|
When indenting a non-blank line, stay at the same cursor position
relative to the content after indenting.
|
|
Aligns to the same column if the previous line ends in a single '|' (but
not a '||').
|
|
|
|
This was previously implemented, and it just needed a snapshot to go through
|
|
|
|
forward-to-word is undefined, and so Emacs would throw errors in
rust-align-to-expr-after-brace. This change yields the expected
behavior discussed in the issue.
|
|
|
|
Specifically, we can now use:
+ beginning-of-defun
+ end-of-defun
+ mark-defun
where "defun" means a Rust item.
+ Add tests in rust-mode-tests.el
+ Fix indentation in rust-mode-tests.el
+ Add support for trait to Imenu
|
|
+ Delete trailing whitespace.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|