Skip to content

Change default behaviour of text channel to match only content and not filenames #736

@Tradeylouish

Description

@Tradeylouish

The text channel is intended for fuzzy live grepping but its usefulness is limited by the fact that filenames are matched in addition to the content. This means that if you want to search your files for a text string, but that string also appears in one of your filenames, every non-whitespace line of that file will clutter the search results because of the filename match.

This is basically equivalent to this old issue in fzf.vim, where the solution was to pass --delimiter : --nth 4.. options to fzf. The newer fzf-lua seems to be configured to do something similar by default, see "picker options" in their README:

fzf_opts = {
      -- do not include bufnr in fuzzy matching
      -- tiebreak by line no.
      ["--multi"]     = true,
      ["--delimiter"] = "[\t]",
      ["--tabstop"]   = "1",
      ["--tiebreak"]  = "index",
      ["--with-nth"]  = "2..",
      ["--nth"]       = "4..",
    },

I can't see an obvious equivalent solution for television, possibly changes to Nucleo would be required since it is used in place of fzf. But if something can be figured out it would provide a nice usability boost - and help inch Zed and VS Code closer to being configurable into NeoVim haha

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions