| Age | Commit message (Collapse) | Author |
|
|
|
|
|
This can be used as the indent-line-function, as an alternative to
rust-mode-indent-line.
In addition to indenting the current line as rust-mode-indent-line
does, it also checks to see whether we are editing a Markdown code
block inside a comment (either a documentation comment or a normal
comment.) If we are inside a Markdown code block, it extracts that
code block, treats it as Rust code, and indents the current line
accordingly.
Note that this behavior is only triggered if point is inside the
comment body: placing point at the start of the line and pressing tab
will only re-indent the comment line, but placing point at the end of
the line and pressing tab will re-indent the both comment line and its
contents.
|
|
"rust-prog-mode.el" and "rust-mode-treesitter.el" provide competing
implementations of `rust-mode'. Both implementations depend on code
in "rust-mode.el", and thus must require that.
Doing that is complicated by the fact that "rust-mode.el" loads one
of these libraries, depending on `rust-mode-treesitter-derive's value.
Address this conflict by:
1. Requiring feature `rust-mode' in the two libraries that implement the
`rust-mode' major-mode and that use things defined in "rust-mode.el".
2. Moving the require forms for these two libraries in "rust-mode.el",
below the `provide' form for `rust-mode'.
|
|
The load of specific rust-mode now depends on the tree sitter variable
that we have, so disabling autoload for this too.
|
|
|
|
|