Skip to content

Commit

Permalink
Fix floating window example in README (#371)
Browse files Browse the repository at this point in the history
  • Loading branch information
SmiteshP committed May 28, 2021
1 parent a41f6ab commit a5f3d1a
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -507,28 +507,30 @@ require knowing when the operations are complete, you can use the following `Use
You can configure Packer to use a floating window for command outputs by passing a utility
function to `packer`'s config:
```lua
packer.startup(function()
packer.startup({function()
-- Your plugins here
end, {
end,
config = {
display = {
open_fn = require('packer.util').float,
}
})
}})
```

By default, this floating window will show doubled borders. If you want to customize the window
appearance, you can pass a configuration to `float`, which is the same configuration that would be
passed to `nvim_open_win`:
```lua
packer.startup(function()
packer.startup({function()
-- Your plugins here
end, {
end,
config = {
display = {
open_fn = function()
return require('packer.util').float({ border = 'single' })
end
}
})
}})
```

## Profiling
Expand Down

0 comments on commit a5f3d1a

Please sign in to comment.