Skip to content

git worktree list throws error #6

@heytrav

Description

@heytrav

I've been struggling to get this to work and after spending quite a bit of time re-reading the docs here I am not sure what it is I am doing wrong.

The create_git_worktree command works ok. However when I try to run the git_worktrees() command as explained in the README I get the following stacktrace:

:lua require('telescope').extensions.git_worktree.git_worktrees()                                                                                                                                          
E5108: Error executing lua ...l/share/nvim/lazy/telescope.nvim/lua/telescope/utils.lua:226: Expected Lua number
stack traceback:
        [C]: in function 'nvim_win_get_width'
        ...l/share/nvim/lazy/telescope.nvim/lua/telescope/utils.lua:226: in function 'calc_result_length'
        ...l/share/nvim/lazy/telescope.nvim/lua/telescope/utils.lua:285: in function 'transform_path'
        ...worktree.nvim/lua/telescope/_extensions/git_worktree.lua:166: in function 'parse_line'
        ...worktree.nvim/lua/telescope/_extensions/git_worktree.lua:179: in function 'git_worktrees'
        [string ":lua"]:1: in main chunk

I'm using Lazy for my package manager and here is my configuration to install it:

  {
    url = "[email protected]:polarmutex/git-worktree.nvim.git",
    opts = {
      change_directory_command = "tcd",
    },
  },

Any suggestions would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions