vim-flog icon indicating copy to clipboard operation
vim-flog copied to clipboard

Flog doesn't output anything when using nushell

Open zDonik1 opened this issue 1 year ago • 5 comments

I have set the shell in neovim to be nushell, but in that case, running :Flog doesn't output anything.

Here is the config for the shell:

vim.opt.shell = "nu"
vim.opt.shellcmdflag = '-c'
vim.opt.shellredir = "o+e> %s"
vim.opt.shellpipe = "o+e>| tee { save %s }"
vim.opt.shellslash = true
vim.opt.shellquote = "'"
vim.opt.shellxquote = ""

zDonik1 avatar May 25 '24 11:05 zDonik1

Unfortunately I was not able to recreate this. Flog seems to work with the Nu shell for me.

You may find it works with this setting on, although it worked with it both on and off for me:

vim.g.flog_use_builtin_shellescape = 1

Otherwise, if you could provide the repository it doesn't work on and your init.lua (or preferably a minimal init.lua), please do.

Also the output of:

nvim -v
nu -v

Thanks for reporting.

rbong avatar May 25 '24 15:05 rbong

I'm new to nushell, but after installing that and configuring it for NeoVim as described, there's still no issue with :Flog - please try with nvim -u minimal_vimrc.vim, and add whatever is necessary from your vimrc until the issue is triggered.

TamaMcGlinn avatar May 25 '24 20:05 TamaMcGlinn

The issue stands with the following config. I am using Windows 11, that could be part of the issue.

> nvim -v
NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1713484068
Run "nvim -V1 -v" for more info

> nu  -v
0.93.0

> nvim -u init.lua
-- init.lua
vim.opt.shell = "nu"
vim.opt.shellcmdflag = '"--config ($env.XDG_CONFIG_HOME | path join nushell/nvim.nu)" --stdin -c'
vim.opt.shellredir = "o+e> %s"
vim.opt.shellpipe = "o+e>| tee { save %s }"
vim.opt.shellslash = true
vim.opt.shellquote = "'"
vim.opt.shellxquote = ""

vim.g.flog_use_builtin_shellescape = true

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
	vim.fn.system({
		"git",
		"clone",
		"--filter=blob:none",
		"https://github.com/folke/lazy.nvim.git",
		"--branch=stable", -- latest stable release
		lazypath,
	})
end
vim.opt.rtp:prepend(lazypath)

require("lazy").setup({
	"rbong/vim-flog",
	lazy = true,
	cmd = { "Flog", "Flogsplit", "Floggit" },
	dependencies = { "tpope/vim-fugitive" },
}, {
	change_detection = { notify = false },
})

zDonik1 avatar May 29 '24 07:05 zDonik1

I am using Windows 11

Thanks for the info. WSL or native Windows 11?

rbong avatar May 30 '24 13:05 rbong

Native Windows 11. I was actually setting up WSL but haven't checked Flog yet.

zDonik1 avatar May 31 '24 06:05 zDonik1