Skip to content
Draft
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
5 changes: 2 additions & 3 deletions lua/fzf-lua/actions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
local uv = vim.uv or vim.loop
local utils = require "fzf-lua.utils"
local path = require "fzf-lua.path"
local libuv = require "fzf-lua.libuv"

---@class fzf-lua.actions
---@field expect fun(actions: table, opts: fzf-lua.config.Resolved|{}):string[]?, string[]?
Expand Down Expand Up @@ -627,7 +626,7 @@ M.goto_jump = function(selected, opts)
end
else
local _, lnum, col, filepath = selected[1]:match("(%d+)%s+(%d+)%s+(%d+)%s+(.*)")
local ok, res = pcall(libuv.expand, filepath)
local ok, res = pcall(require("fzf-lua.libuv").expand, filepath)
if not ok then
filepath = ""
else
Expand Down Expand Up @@ -1340,7 +1339,7 @@ M.serverlist_kill = function(sel)
end

M.serverlist_spawn = function()
libuv.uv_spawn(
require("fzf-lua.job").spawn(
vim.fn.exepath("nvim"), { args = { "--headless" }, env = { NVIM = "" }, detached = true })
end

Expand Down
9 changes: 5 additions & 4 deletions lua/fzf-lua/defaults.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ local utils = require "fzf-lua.utils"
local actions = require "fzf-lua.actions"
local previewers = require "fzf-lua.previewer"
local M = {}
local uis = #vim.api.nvim_list_uis()

function M._default_previewer_fn()
local winopts = M.globals.winopts
Expand Down Expand Up @@ -699,8 +700,8 @@ M.defaults.git = {
FzfLua.git_hunks(o)
end,
header = "git hunks",
reuse = #vim.api.nvim_list_uis() == 0,
exec_silent = #vim.api.nvim_list_uis() > 0,
reuse = uis == 0,
exec_silent = uis > 0,
field_index = "{} $FZF_POS",
},
["ctrl-q"] = {
Expand Down Expand Up @@ -769,8 +770,8 @@ M.defaults.git = {
FzfLua.git_diff(o)
end,
header = "git diff",
reuse = #vim.api.nvim_list_uis() == 0,
exec_silent = #vim.api.nvim_list_uis() > 0,
reuse = uis == 0,
exec_silent = uis > 0,
field_index = "{} $FZF_POS",
},
},
Expand Down
1 change: 1 addition & 0 deletions lua/fzf-lua/devicons.lua
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ M.plugin_load = function(provider, do_not_lazy_load)
if provider == nil and M.PLUGIN and M.PLUGIN:loaded() then
return true
end
provider = "devicons"
M.PLUGIN = provider == "srv" and M.__SRV
or provider == "mini" and M.__MINI
or provider == "devicons" and M.__DEVICONS
Expand Down
Loading
Loading