Closed ve-nt closed 3 years ago
Spotted a bug. Converting this PR to draft until I fix them.
To elaborate: Neither beginning-of-defun
or end-of-defun
work for function blocks that have their opening brace on a different line from the fn
keyword.
Okay so I've been using this for a few days, and I haven't noticed any more bugs. The only issue I've noticed is that beginning-of-defun
matches on all global const
declarations, even the ones it's not really supposed to. For example, it will match on statements like this:
const maps_dir = "data/maps/";
I will work on fixing this. The rest of the functionality is working fine and is pretty handy, so it could be merged in and ironed out later, or merged after this issue has been fixed. Up to you.
Oof. Just when I'm getting confident, another bug! Marking as WIP.
This allows us to use C-M-a and C-M-e to navigate by function blocks. Also includes test, const, and export blocks that contain a brace.
Credit goes to
rust-mode
, which this code was yanked and modified from.