You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inside of a path_display function, actions.state.get_current_line() returns the previous state of the prompt input rather than the current state.
Neovim version
NVIM v0.10.0-dev-2799+ge016f5bee-Homebrew
Build type: Release
LuaJIT 2.1.1710088188
Run "nvim -V1 -v" for more info
Operating system and version
macOS 14.4.1
Telescope version / branch / rev
telescope head
checkhealth telescope
telescope: health#telescope#check
Checking for required plugins
- OK plenary installed.
- WARNING nvim-treesitter not found. (Required for `:Telescope treesitter`.)
Checking external dependencies
- OK rg: found ripgrep 13.0.0
- OK fd: found fd 8.2.1
===== Installed extensions =====
Telescope Extension: `fzf`- OK lib working as expected
- OK file_sorter correctly configured
- OK generic_sorter correctly configured
Steps to reproduce
nvim -nu minimal.lua
:Telescope find_files
Type in prompt and look at the results list
Expected behavior
I would expect get_current_line() to return what's currently in the prompt input.
Actual behavior
Screen.Recording.2024-04-14.at.6.14.58.PM.mov
Minimal config
vim.cmd[[set runtimepath=$VIMRUNTIME]]vim.cmd[[set packpath=/tmp/nvim/site]]localpackage_root="/tmp/nvim/site/pack"localinstall_path=package_root.."/packer/start/packer.nvim"localfunctionload_plugins()
require("packer").startup {
{
"wbthomason/packer.nvim",
{
"nvim-telescope/telescope.nvim",
requires= {
"nvim-lua/plenary.nvim",
{ "nvim-telescope/telescope-fzf-native.nvim", run="make" },
},
},
-- 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()
require("telescope").setup {
pickers= {
find_files= {
path_display=function(opts, path)
localaction_state=require"telescope.actions.state"localcurrent_line=action_state.get_current_line()
return"(" ..current_line.."): " ..pathend,
},
},
}
require("telescope").load_extension"fzf"-- ADD INIT.LUA SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUEendifvim.fn.isdirectory(install_path) ==0thenprint"Installing Telescope and dependencies."vim.fn.system { "git", "clone", "--depth=1", "https://github.com/wbthomason/packer.nvim", install_path }
endload_plugins()
require("packer").sync()
vim.cmd[[autocmd User PackerComplete ++once echo "Ready!" | lua load_config()]]
The text was updated successfully, but these errors were encountered:
Description
Inside of a
path_display
function,actions.state.get_current_line()
returns the previous state of the prompt input rather than the current state.Neovim version
Operating system and version
macOS 14.4.1
Telescope version / branch / rev
telescope head
checkhealth telescope
Steps to reproduce
nvim -nu minimal.lua
:Telescope find_files
Expected behavior
I would expect
get_current_line()
to return what's currently in the prompt input.Actual behavior
Screen.Recording.2024-04-14.at.6.14.58.PM.mov
Minimal config
The text was updated successfully, but these errors were encountered: