Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
boltlessengineer opened this issue Sep 30, 2024 Discussed in #474 · 0 comments · Fixed by #482 or #480
Closed

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

boltlessengineer opened this issue Sep 30, 2024 Discussed in #474 · 0 comments · Fixed by #482 or #480

Comments

@boltlessengineer
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant