Search results aren't displayed unless I press up or down arrow key #341
-
This is definitely an issue with my config because I cannot reproduce with the minimal I'm using
GIFs showcasing the two different behaviors
minimal init.lua:vim.cmd([[set runtimepath=$VIMRUNTIME]])
vim.cmd([[set packpath=/tmp/nvim/site]])
local package_root = "/tmp/nvim/site/pack"
local install_path = package_root .. "/packer/start/packer.nvim"
vim.g.loaded_remote_plugins = ""
local function load_plugins()
require("packer").startup({
{
"wbthomason/packer.nvim",
{
"mrjones2014/legendary.nvim",
requires = {
-- place your `vim.ui.select()` handler here
-- for example:
{
"nvim-telescope/telescope.nvim",
requires = "nvim-lua/plenary.nvim",
},
"stevearc/dressing.nvim",
},
},
-- ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
},
config = {
package_root = package_root,
compile_path = install_path .. "/plugin/packer_compiled.lua",
display = { non_interactive = true },
},
})
end
_G.load_config = function()
-- setup your `vim.ui.select()` handler here
-- for example:
require("telescope").setup()
require("dressing").setup()
require("legendary").setup()
-- ADD INIT.LUA SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
end
if vim.fn.isdirectory(install_path) == 0 then
print("Installing legendary.nvim and dependencies.")
vim.fn.system({ "git", "clone", "--depth=1", "https://github.com/wbthomason/packer.nvim", install_path })
end
load_plugins()
require("packer").sync()
vim.cmd([[autocmd User PackerComplete ++once echo "Ready!" | lua load_config()]]) relevant parts of my main config (I'm using lazy.nvim) {
"mrjones2014/legendary.nvim",
config = true,
},
{
"nvim-telescope/telescope.nvim",
cmd = "Telescope",
dependencies = {
{
"nvim-lua/plenary.nvim",
lazy = true,
},
{
"nvim-lua/popup.nvim",
lazy = true,
},
"tsakirist/telescope-lazy.nvim",
{
"jvgrootveld/telescope-zoxide",
},
},
config = function()
require("telescope").setup({
defaults = {
find_command = {
"rg",
"--files",
"--hidden",
"--ignore",
"--line-number",
"--smart-case",
},
prompt_prefix = "🔍 ",
selection_caret = " ",
vimgrep_arguments = {
"rg",
"--color=auto",
"--column",
"--hidden",
"--line-number",
"--no-heading",
"--smart-case",
"--with-filename",
},
},
require("telescope").load_extension("lazy"),
extensions = {
zoxide = {
prompt_title = "Zoxide",
mappings = {
default = {
after_action = function(selection)
print("Directory changed to (" .. selection.z_score .. ") " .. selection.path)
end,
},
["<CR>"] = {
action = require("telescope._extensions.zoxide.utils").create_basic_command("cd"),
},
},
},
},
})
end,
},
{
"stevearc/dressing.nvim",
lazy = true,
init = function()
vim.ui.select = function(...)
require("lazy").load({ plugins = { "dressing.nvim" } })
return vim.ui.select(...)
end
vim.ui.input = function(...)
require("lazy").load({ plugins = { "dressing.nvim" } })
return vim.ui.input(...)
end
end,
}, Other information about my setup: ❯ nvim --version
NVIM v0.8.3
Build type: Release
LuaJIT 2.1.0-beta3
❯ kitty --version
kitty 0.27.1 created by Kovid Goyal Any idea what could be causing this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Taking a brief look, the only thing that stands out is that |
Beta Was this translation helpful? Give feedback.
Taking a brief look, the only thing that stands out is that
require("telescope").load_extension("lazy")
is in the middle of the telescope config table? Shouldn't that be outside of therequire("telescope").setup()
table?