Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flog doesn't output anything when using nushell #121

Open
zDonik1 opened this issue May 25, 2024 · 5 comments
Open

Flog doesn't output anything when using nushell #121

zDonik1 opened this issue May 25, 2024 · 5 comments

Comments

@zDonik1
Copy link

zDonik1 commented May 25, 2024

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 = ""
@rbong
Copy link
Owner

rbong commented May 25, 2024

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.

@TamaMcGlinn
Copy link
Contributor

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.

@zDonik1
Copy link
Author

zDonik1 commented May 29, 2024

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 },
})

@rbong
Copy link
Owner

rbong commented May 30, 2024

I am using Windows 11

Thanks for the info. WSL or native Windows 11?

@zDonik1
Copy link
Author

zDonik1 commented May 31, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants