Skip to content

Conversation

@jesseleite
Copy link

@jesseleite jesseleite commented Jan 11, 2026

Looking at how the get_status_text function was rendering in the prompt, it was counting #is_added records. This must have broke when the table switched to tracking non-numeric indices at some point (I assume). This PR fixes that, and also improves it to show showing_results / total_indexed style output, much like Telescope's stock finders...

Before
CleanShot 2026-01-10 at 23 51 56

After
CleanShot 2026-01-10 at 23 53 04

The first showing_results number will always be limited to how many results are actually showing (limited by your result_limit config), but I think this explicit clarity will actually be helpful for people who arrow through results. If the number shows less than the total, it's clear that there's more results found, but their prompt may not be specific enough.

I've also fixed the ability for users to override get_status_text via opts. This looked like it was possible, but never worked. For example...

require('telescope').extensions.smart_open.smart_open({
  get_status_text = function (self)
    local results = self.finder.results or {}
    local total = self.finder.total_indexed or 0

    -- Pad the right side of the string
    return string.format("showing %s / indexed %s ", #results, total)
  end,
})
CleanShot 2026-01-10 at 23 58 34

Signed-off-by: Jesse Leite <git@jesseleite.com>
…elescope finders

Signed-off-by: Jesse Leite <git@jesseleite.com>
Signed-off-by: Jesse Leite <git@jesseleite.com>
Signed-off-by: Jesse Leite <git@jesseleite.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant