Merge pull request #163 from davvid/document-width

README: add an example showing how to configure the menu width
This commit is contained in:
ThePrimeagen 2022-02-16 12:41:58 -07:00 committed by GitHub
commit 4e6362e57d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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