Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Adding support for tab drop #26

Closed
yolo2h opened this issue Nov 6, 2021 · 3 comments
Closed

Feature request: Adding support for tab drop #26

yolo2h opened this issue Nov 6, 2021 · 3 comments

Comments

@yolo2h
Copy link

yolo2h commented Nov 6, 2021

Hi,
I like your plugin, and it's very useful.
I found fzf can jump to the window/tab where the buffer is open(set ['ctrl-t'] = 'tab drop'), can nvim-lspfuzzy do this?

@yolo2h
Copy link
Author

yolo2h commented Nov 6, 2021

I write some code like:

-------------------- FZF FUNCTIONS -------------------------
local function jump(entries)
  ...
  -- A FZF action was used
  if opts.fzf_action[key] then
    if opts.fzf_action[key] == 'tab drop' then
      for _, buf_info in ipairs(vim.fn.getbufinfo()) do
        local uri = vim.uri_from_bufnr(buf_info.bufnr)
        if uri == locations[1]['uri'] then
          cmd('tab drop ' .. buf_info.name)
          break
        end
      end
    else
      cmd(opts.fzf_action[key])
    end
  end
  ...
end

It's ugly but works fine for me, could you add option(like callback) allow me rewrite that function?

@ojroques
Copy link
Owner

ojroques commented Nov 6, 2021

tab drop should work now in the latest commit (with ['ctrl-t'] = 'tab drop'). Can you try and report if it works ?

@yolo2h
Copy link
Author

yolo2h commented Nov 6, 2021

Thank you so much, it works great!

ojroques pushed a commit that referenced this issue Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants