git-worktree.nvim icon indicating copy to clipboard operation
git-worktree.nvim copied to clipboard

Telescope git_worktrees error (Expected lua number parse_line)

Open perseoGI opened this issue 1 year ago • 7 comments

Hi Prime, love your work! Huge fan from Spain :3

I'm trying to use the Telescope git_worktrees functionality but I'm getting this error: image

FYI git-worktree-nvim.log is empty.

I'm trying to figure out if is something wrong with my telescope config but the create_git_worktree extension works perfectly.

Any tip? Thanks in advance.

Pd. Im using NvChad so pasting my config could be confusing. Just want to know if this error is known by you or if not, will talk with NvChad community.

perseoGI avatar Sep 07 '22 14:09 perseoGI

I am also getting same exact error. I use astronvim

jay-babu avatar Sep 10 '22 19:09 jay-babu

image

Screenshot for reference

jay-babu avatar Sep 10 '22 19:09 jay-babu

A hotfix I use at the moment: Note: It seems to work but I have not really looked into the issue, seems like telescope.state#get_status (used in calc_result_length) always outputs an empty table, so maybe this a telescope issue and not an issue of this plugin?

-> Comment out the following lines https://github.com/ThePrimeagen/git-worktree.nvim/blob/d7f4e2584e81670154f07ca9fa5dd791d9c1b458/lua/telescope/_extensions/git_worktree.lua#L165

                -- if key == 'path' then
                --     local new_path = utils.transform_path(opts, entry[key])
                --     local path_len = strings.strdisplaywidth(new_path or "")
                --     widths[key] = math.max(val, path_len)
                -- else
                    widths[key] = math.max(val, strings.strdisplaywidth(entry[key] or ""))
                -- end

aaronhallaert avatar Sep 15 '22 15:09 aaronhallaert

Thank you @aaronhallaert, this temp fix is now working! @ThePrimeagen take a look into it

perseoGI avatar Sep 19 '22 13:09 perseoGI

@ThePrimeagen would appreciate you taking a look at this!

cytommi avatar Oct 12 '22 14:10 cytommi

@ThePrimeagen Here's a second reminder to take a look at this 🙂

mawkler avatar Nov 09 '22 09:11 mawkler

I put up a fix PR #106

brandoncc avatar Feb 08 '23 06:02 brandoncc