numToStr / FTerm.nvim

:fire: No-nonsense floating terminal plugin for neovim :fire:
MIT License
721 stars 24 forks source link

Feat: make col and row options for position depend on vim.o.col and vim.o.row #83

Closed protiumx closed 1 year ago

protiumx commented 1 year ago

Hi! Thanks for the awesome plugin. I've noticed that the row and col are calculated as

local col = math.ceil((cl - width) * opts.x)
local row = math.ceil((ln - height) * opts.y - 1)

which means the position depends on the free space. My dimensions config looks as follow

{ height = 0.3, width = 0.2, x = 0.8, y = 0 }

But the result is not the expected. If I want to place the terminal at the top right, then the x position must be 1 which feels counter intuitive.

{ height = 0.3, width = 0.2, x = 1, y = 0 }