-
-
Notifications
You must be signed in to change notification settings - Fork 910
Labels
bugSomething isn't workingSomething isn't working
Description
Description
In my use case, I use customized git_command
in git_bcommits
, and meet error
Error executing luv callback:
...repro/plugins/plenary.nvim/lua/plenary/async/control.lua:122: Oneshot channel can only send once
stack traceback:
[C]: in function 'assert'
...repro/plugins/plenary.nvim/lua/plenary/async/control.lua:122: in function 'eof_tx'
...otfile/.repro/plugins/telescope.nvim/lua/telescope/_.lua:142: in function <...otfile/.repro/plugins/telescope.nvim/lua/telescope/_.lua:136>
But if I use default command, it's ok
My customized command:
git log --date="format:%y/%m/%d" --pretty="format:%C(auto) %h %ad %s"
Default command in Telescope
git log --pretty=oneline --abbrev-commit
I think maybe my customized command missed something needed, but I can not find the difference between the results of these two command
PS. This issue can be reliably reproduced only on some files. If you cannot reproduce it in your projects or files, please try this file https://github.com/keaising/dotfile/blob/master/nvim/.config/nvim/lua/plugins/telescope.lua , the issue can be reliably reproduced on it.
Neovim version
NVIM v0.9.0
Build type: Release
LuaJIT 2.1.0-beta3
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/share/nvim"
Run :checkhealth for more info
Operating system and version
ArchLinux, latest
Telescope version / branch / rev
master branch
checkhealth telescope
telescope: require("telescope.health").check()
Checking for required plugins ~
- OK plenary installed.
- OK nvim-treesitter installed.
Checking external dependencies ~
- OK rg: found ripgrep 13.0.0
- OK fd: found fd 8.7.0
===== Installed extensions ===== ~
Steps to reproduce
git clone [email protected]:keaising/dotfile.git
- copy and paste
minimal.lua
content intominimal.lua
in dotfile folder nvim -u minimal.lua nvim/.config/nvim/lua/plugins/telescope.lua
- Wait
lazy
install all plugins needed - press
gb
can meet the error - press
gj
will not meet the error
Expected behavior
No error
Actual behavior
Error executing luv callback:
...repro/plugins/plenary.nvim/lua/plenary/async/control.lua:122: Oneshot channel can only send once
stack traceback:
[C]: in function 'assert'
...repro/plugins/plenary.nvim/lua/plenary/async/control.lua:122: in function 'eof_tx'
...otfile/.repro/plugins/telescope.nvim/lua/telescope/_.lua:142: in function <...otfile/.repro/plugins/telescope.nvim/lua/telescope/_.lua:136>
Minimal config
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"--single-branch",
"https://github.com/folke/lazy.nvim.git",
lazypath,
})
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
vim.keymap.set("n", "<Leader>e", "<Plug>(x-file-explorer)", { silent = true })
local M = {
"nvim-telescope/telescope.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
},
config = function()
local bufopts = { noremap = true, silent = true }
local builtin = require("telescope.builtin")
vim.keymap.set("n", "gb", function()
builtin.git_bcommits({
git_command = {
"git",
"log",
-- "--pretty=oneline",
-- "--abbrev-commit",
"--date=format:%y/%m/%d",
"--pretty=format:%C(auto) %h %ad %s",
"--follow",
},
})
end, bufopts)
vim.keymap.set("n", "gj", builtin.git_bcommits, bufopts)
require("telescope").setup({})
end,
}
local plugins = {
M,
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
nicos68
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working