From 7b7c06b6c968503ca56add7511672fac6bc512ed Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Mon, 14 Feb 2022 11:42:07 -0800 Subject: [PATCH] README: add an example showing how to configure the menu width Related-to: #142 --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index a686b74..b008d84 100644 --- a/README.md +++ b/README.md @@ -179,3 +179,16 @@ not necessarily error related. without much thinking. Some sort of middle ground between vim-test and just typing them into a terminal (configuring netflix's television project isn't quite building and there are tons of ways to configure). + +#### Use a dynamic width for the Harpoon popup menu +Sometimes the default width of `60` is not wide enough. +The following example demonstrates how to configure a custom width by setting +the menu's width relative to the current window's width. + +```lua +require("harpoon").setup({ + menu = { + width = vim.api.nvim_win_get_width(0) - 4, + } +}) +```