Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ Using [lazy.nvim](https://github.com/folke/lazy.nvim)
name = "tmux",
-- default options
opts = {
-- suggest completions from all tmux panes
all_panes = false,
-- suggest completions from current tmux session panes only
session_panes = false,
capture_history = false,
-- only suggest completions from `tmux` if the `trigger_chars` are
-- used
Expand Down
6 changes: 5 additions & 1 deletion lua/blink-cmp-tmux/init.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
---@class blink-cmp-tmux.Opts
---@field all_panes boolean
---@field session_panes boolean
---@field capture_history boolean
---@field triggered_only boolean
---@field trigger_chars string[]

---@type blink-cmp-tmux.Opts
local default_opts = {
all_panes = false,
session_panes = false,
capture_history = false,
triggered_only = false,
trigger_chars = { "." },
Expand Down Expand Up @@ -75,7 +77,9 @@ function tmux:get_pane_ids()

if self.opts.all_panes then
table.insert(cmd, "-a")
end
elseif self.opts.session_panes then
table.insert(cmd, "-s")
end
vim.system(cmd, {
stdout = function(_, data)
if not data then
Expand Down