camgraff/telescope-tmux.nvim

Works on :Telescope tmux sessions but not when :lua require('telescope').extenions.tmux.sessions()

Closed this issue · 2 comments

When I open it with :Telescope tmux sessions it works fine, but if I add in telescope-config the keymap map("n", "<leader>ms", ':lua require("telescope").extensions.tmux.sessions()<CR>', opts) it gives me the following error

E5108: Error executing lua vim/shared.lua:260: after the second argument: expected table, got nil
stack traceback:
        [C]: in function 'error'
        vim/shared.lua:608: in function 'validate'
        vim/shared.lua:260: in function 'apply_default_layout'
        ...ope-tmux.nvim/lua/telescope/_extensions/tmux/windows.lua:27: in function 'windows'
        [string ":lua"]:1: in main chunk

System info:
neovim -v

NVIM v0.6.0
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by brew@HMBRW-A-001-M1-004.local

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.6.0/share/nvim"

Run :checkhealth for more info

You need to pass an opts table arg into sessions().

require("telescope").extensions.tmux.sessions({})

But yeah it should probably default to an empty table if you don't pass the opts arg

Can confirm it works passing an opts table arg.

Thank you