Closed cowile closed 5 months ago
As this is is fairly minimal implementation of beginning-of-defun-function
, perhaps it might be a better implementation to rely on the default definition for beginning-of-defun
and control its behavior with defun-prompt-regex
.
I hope we can use treesitter for this in the future.
Can you check if this works with tree sitter: https://github.com/rust-lang/rust-mode?tab=readme-ov-file#tree-sitter
treesit-beginning-of-defun
is the treesitter alternative. I can confirm that it doesn't skip async functions for me.
I'm closing this issue for now as I haven't been able to reproduce it recently using tree sitter and haven't heard back. Please feel free to reopen it if you encounter the issue again in the future.
rust-beginning-of-defun
skips async functions.The problem starts at rust-mode.el:1228
rust-top-item-beg-re
does not include theasync
keyword anywhere and therefore does not match a function with the async keyword.