Skip to content

How to reload :FzfLua tabs with different query by an action? #1901

Answered by nyngwang
nyngwang asked this question in Q&A
Discussion options

You must be logged in to vote

I just found the answer to my 2. in the file action.lua:

M.toggle_opt = function(opts, opt_name)
-- opts.__call_opts[opt_name] = not opts[opt_name]
local o = vim.tbl_deep_extend("keep", { resume = true }, opts.__call_opts)
o[opt_name] = not opts[opt_name]
opts.__call_fn(o)
end

Still finding the answer to avoid 1.

EDIT: both 1. and 2. are solved!

EDIT2: This is the final config, tested against 494af9d :

local pos_offset = function (tabnr)
  local pos = 1
  for i, t in ipairs(vim.api.nvim_list_tabpages()) do
    if i < tabnr then pos = pos + 1 + #vim.api.nvim_tabpage_list_wins(t) end
  end
  

Replies: 3 comments 19 replies

Comment options

You must be logged in to vote
1 reply
@nyngwang
Comment options

Answer selected by nyngwang
Comment options

You must be logged in to vote
15 replies
@phanen
Comment options

@nyngwang
Comment options

@phanen
Comment options

@phanen
Comment options

@nyngwang
Comment options

Comment options

You must be logged in to vote
3 replies
@ibhagwan
Comment options

@ibhagwan
Comment options

@nyngwang
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants