-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Benjamin Moody
committed
Nov 3, 2024
1 parent
3bd0863
commit 3643082
Showing
1 changed file
with
117 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters