summaryrefslogtreecommitdiff
path: root/rust-prog-mode.el
AgeCommit message (Collapse)Author
2024-11-11Rename rust-doc-indent-line to rust-mode-indent-line.Benjamin Moody
2024-11-02Use rust-doc-indent-line as the indentation function.Benjamin Moody
2024-11-02rust-doc-indent-line: new function.Benjamin Moody
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.
2024-03-27Fix dependencies between rust-mode implementationsJonas Bernoulli
"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'.
2024-03-02Remove autoload for prog-mode based rust-modeSibi Prabakaran
The load of specific rust-mode now depends on the tree sitter variable that we have, so disabling autoload for this too.
2024-02-25Fix rust-mode and tree sitter integrationSibi Prabakaran
2024-02-17provide alternative rust-mode that derives from rust-ts-modebrotzeit