coc.nvim exposes the name of the function the cursor is currently in
through b:coc_current_function.
For this to work, the key coc.preferences.currentFunctionSymbolAutoUpdate
must be set to 'true' in the coc config.
The value is only updated on CursorHold, so the value may not always be
accurate when moving around.