mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 10:49:08 +00:00
fix(picker.preview): preview for uris. Closes #1075
This commit is contained in:
parent
7cbecf9147
commit
c1f93e25bb
1 changed files with 3 additions and 0 deletions
|
@ -79,6 +79,9 @@ function M.file(ctx)
|
|||
-- used by some LSP servers that load buffers with custom URIs
|
||||
if ctx.item.buf and vim.uri_from_bufnr(ctx.item.buf):sub(1, 4) ~= "file" then
|
||||
vim.fn.bufload(ctx.item.buf)
|
||||
elseif ctx.item.file and ctx.item.file:find("^%w+://") then
|
||||
ctx.item.buf = vim.fn.bufadd(ctx.item.file)
|
||||
vim.fn.bufload(ctx.item.buf)
|
||||
end
|
||||
|
||||
if ctx.item.buf and vim.api.nvim_buf_is_loaded(ctx.item.buf) then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue