Closed kareem-abdul closed 6 months ago
I just found out about this when searching for running functions for a specific buffer.
Neovim's API has a function called vim.api.nvim_buf_call(bufnr, func)
which makes the current buffer as bufnr
for all the calls that happens inside the func.
i.e
vim.api.nvim_buf_call(bufnr, function()
require("jdtls").open_classfile(filename)
end)
This works for me, let me know if this is the right approach.
Workaround
I just found out about this when searching for running functions for a specific buffer.
Neovim's API has a function called
vim.api.nvim_buf_call(bufnr, func)
which makes the current buffer asbufnr
for all the calls that happens inside the func. i.evim.api.nvim_buf_call(bufnr, function() require("jdtls").open_classfile(filename) end)
This works for me, let me know if this is the right approach.
I've seen the same snippet being done in other repos, and doing it this way does not introduce any problems (I think). And since the snippet does what I originally intended, I'm closing this pr.
Hi, This adds an optional parameter in the function
open_classfile
, to show decompiled class files to another buffer As per the docs, there is no need to call this function manually, but there are a few cases where we might need to do so. An example is a custom previewer intelescope
where the current buffer and the preview buffer are not the same. usage: