It's very unstable. It's not documented yet and the implementation is immature. Feel free to try it but everything is subject to change in the future.
It required Ruby 3.2 since it uses new features added to RubyVM::AbstractSyntaxTree in Ruby 3.2.
First, install neovim gem if you use Neovim. Skip this installation step if you use Vim.
gem install neovimThen install it with your favorite package manager.
After installation, two functions are available.
RSpecCurrentSubject: Returns currentsubjectas a StringRSpecCurrentContextReturns currentcontextas a String
Then you can echo it with something like:
:echo RSpecCurrentSubject()You can set these functions in your statusline plugin to track current subject/context.