Skip to content

Environment picker telescope dialog doesn't filter by text #481

@boltlessengineer

Description

@boltlessengineer

Discussed in #474

Transferring to an issue as I can reproduce it.

Originally posted by jrebs September 28, 2024
Not putting this in as an issue unless I can confirm it isn't just me. My environment picker window is working generally. It picks up the env files in the current dir correctly and I can arrow up/down and hit enter to load and use my selected file, but when I use the text entry to try to filter the list down, it does nothing. Well, more accurately it immediately selects the bottom item in the list, no matter what I type and no matter which is currently selected when I type the keystroke.

However, if I use the command ":Telescope find_files" within the same nvim instance and same directory, the text filtering works as expected, so it seems to only be the rest.nvim telescope extension. Is anyone else having the same issue on a similar platform?

I'm using nvim 0.10.1 release on xubuntu using Lazyvim and all my plugins are up to date as of today.

Peek 2024-09-27 22-21

Oh, and I've tried a few different variations on how the select_env() method is being fired, but the current version of my rest.nvim.lua plugin loader looks like this:

return {
  'rest-nvim/rest.nvim',
  dependencies = {
    'rest-nvim/tree-sitter-http',
  },
  config = function()
    vim.keymap.set('n', '<Leader>rr', ':hor Rest run<CR>', {})
    vim.keymap.set('n', '<Leader>re', function()
      -- first load extension
      require('telescope').load_extension 'rest'
      -- then use it, you can also use the `:Telescope rest select_env` command
      require('telescope').extensions.rest.select_env()
    end, {})
  end,
  -- JSON formatting of responses would not work for me using out-of-the-box
  -- suppot as indicated in the rest.nvim readme, but in the following Github
  -- issue, the plugin author posted the following solution that fixed it for
  -- me. Create the file $NVIM/fplugin/json.lua with the following contents:
  --
  -- vim.bo.formatexpr = “”
  -- vim.bo.formatprg = “jq”
  --
  -- https://github.com/rest-nvim/rest.nvim/issues/414
}

Using the :Telescope rest select_env command to invoke the picker yields the same behaviour.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions