Airline extension working with one language but not with the others

I have an airline extension that shows a string in the airline statusline.

This extension is working fine when editing Rust files, but it’s not working (not showing anything in the status line) in Dart and C, even though I have nothing in my config that is specific to Rust or the other languages.

I add the airline extension in this line:

let g:airline_extensions=[..., 'breadcrumbs']

The extension is defined as a Lua function. To keep things simple, below it just prints “???” in the status line:

function breadcrumbs()
    return "???"

When I edit a Rust file, the status line is looking like this as expected:

<branch name> <buffer name> ???

That “???” part is added by my extension.

However if I edit a Dart or C file the extension simply not added to the status line, I don’t see a “???” after the buffer name.

Anyone have any ideas on what the problem may be?

My guess is this is an interaction with coc.nvim. I have coc-rust-analyzer extension installed, which I’m guessing doing something to the status line/airline, which somehow makes it possible to run my extension. In other languages I don’t have an extension installed.

If I’m right, I need to figure out what coc.nvim/coc-rust-analyzer is doing, and do the same for other languages so that my extension will run.