Skip to content

Commit

Permalink
fix(preview): disable ftplugin on headless wrapper (#1089)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibhagwan committed Mar 19, 2024
1 parent d87a1e2 commit 5104ac1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lua/fzf-lua/libuv.lua
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ M.wrap_spawn_stdio = function(opts, fn_transform, fn_preprocess)
_is_win and [[set VIMRUNTIME=%s& ]] or "VIMRUNTIME=%s ",
_is_win and vim.fs.normalize(vim.env.VIMRUNTIME) or M.shellescape(vim.env.VIMRUNTIME)
)
local lua_cmd = ("lua loadfile([[%s]])().spawn_stdio(%s,%s,%s)")
local lua_cmd = ("lua vim.g.did_load_filetypes=1; loadfile([[%s]])().spawn_stdio(%s,%s,%s)")
:format(
_is_win and vim.fs.normalize(__FILE__) or __FILE__,
opts, fn_transform, fn_preprocess
Expand Down
2 changes: 1 addition & 1 deletion lua/fzf-lua/shell.lua
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function M.raw_async_action(fn, fzf_field_expression, debug)
local action_cmd = ("%s%s -n --headless --clean --cmd %s -- %s"):format(
nvim_runtime,
libuv.shellescape(path.normalize(nvim_bin)),
libuv.shellescape(("lua loadfile([[%s]])().rpc_nvim_exec_lua({%s})")
libuv.shellescape(("lua vim.g.did_load_filetypes=1; loadfile([[%s]])().rpc_nvim_exec_lua({%s})")
:format(path.join { vim.g.fzf_lua_directory, "shell_helper.lua" }, call_args)),
fzf_field_expression)

Expand Down
2 changes: 1 addition & 1 deletion scripts/headless_fd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ if [ $# -gt 0 ]; then
fi

VIMRUNTIME=/usr/share/nvim/runtime \
/usr/bin/nvim -n --headless --clean --cmd "lua loadfile(
/usr/bin/nvim -n --headless --clean --cmd "lua vim.g.did_load_filetypes=1; loadfile(
[[${BASEDIR}/../lua/fzf-lua/libuv.lua]])().spawn_stdio(
-- opts
{
Expand Down

0 comments on commit 5104ac1

Please sign in to comment.