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

bug: cannot use toggleterm's float term #10

Closed
3 tasks done
XXiaoA opened this issue Jun 6, 2023 · 3 comments
Closed
3 tasks done

bug: cannot use toggleterm's float term #10

XXiaoA opened this issue Jun 6, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@XXiaoA
Copy link

XXiaoA commented Jun 6, 2023

Did you check docs and existing issues?

  • I have read all the edgy.nvim docs
  • I have searched the existing issues of edgy.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

NVIM v0.10.0-dev-449+gcc41697775

Operating system/version

Arch linux

Describe the bug

after using edgy, I cannot use toggleterm's float term.

simplescreenrecorder-2023-06-06_22.34.50.mp4

Steps To Reproduce

run :ToggleTerm direction=float in nvim

Expected Behavior

Use float term normally

Repro

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
	vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/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", lazypath })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
	"folke/tokyonight.nvim",
	{
		"folke/edgy.nvim",
		opts = {
			bottom = {
				{ ft = "toggleterm", size = { height = 0.4 } },
			},
		},
	},
	{ "akinsho/toggleterm.nvim", opts = {} },
}
require("lazy").setup(plugins, {
	root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
@XXiaoA XXiaoA added the bug Something isn't working label Jun 6, 2023
@folke
Copy link
Owner

folke commented Jun 6, 2023

Well yes, that's the whole idea of edgy. That you move any window in a layout you define.
If you don't want that, then don't use edgy.

If you just want to exclude the floating windows, add

{ ft = "toggleterm", size = { height = 0.4 }, filter = function(buf, win)
  return vim.api.nvim_win_get_config(win).relative == ""
end},

@folke folke closed this as not planned Won't fix, can't repro, duplicate, stale Jun 6, 2023
@XXiaoA
Copy link
Author

XXiaoA commented Jun 6, 2023

Thx! I just wanna exclude the floating term

@folke
Copy link
Owner

folke commented Jun 6, 2023

I just updated the readme and changed the toggleterm example to exclude floating windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants