nvim-config

Log | Files | Refs | Submodules | README

commit 8fb9d4a5557390f5990950e1a8805f1bad38ed5c
parent e77a504256e67020154b791f6741bf0a95e31135
Author: Thomas Vigouroux <thomas.vigouroux@protonmail.com>
Date:   Thu, 25 Aug 2022 14:15:48 +0200

feat(status): pin things at the bottom of the screen

Diffstat:
Mlua/lsp_status.lua | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lua/lsp_status.lua b/lua/lsp_status.lua @@ -20,11 +20,12 @@ function status.create_win() border = "none", noautocmd = true, relative = "editor", - anchor = "NE", + anchor = "SE", width = status_width, height = 3, - row = 0, + row = vim.o.lines - vim.o.cmdheight - 1, col = vim.o.columns, + zindex = 10, }) end end @@ -86,6 +87,8 @@ function status.redraw() vim.api.nvim_buf_add_highlight(status.buf_nr, ns, "Comment", i - 1, 0, status_width - title_lines[i] - 1) vim.api.nvim_buf_add_highlight(status.buf_nr, ns, "Title", i - 1, status_width - title_lines[i], -1) end + + vim.api.nvim_win_set_height(status.win_nr, #lines) else status.maybe_delete_win() end