Skip to content

Commit 509b17f

Browse files
authored
docs: add heirline integration to README (#114)
1 parent cabf7fd commit 509b17f

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@ return require('packer').startup(function(use)
175175
config = ...,
176176
}
177177

178+
-- integrate with heirline
179+
use {
180+
'rebelot/heirline.nvim',
181+
config = ...,
182+
}
178183
end)
179184
```
180185

@@ -202,6 +207,14 @@ require("lazy").setup({
202207
config = ...
203208
},
204209

210+
-- integrate with heirline
211+
{
212+
'rebelot/heirline.nvim',
213+
dependencies = {
214+
'linrongbin16/lsp-progress.nvim',
215+
},
216+
config = ...
217+
}
205218
})
206219
```
207220

@@ -217,6 +230,9 @@ Plug 'linrongbin16/lsp-progress.nvim'
217230
" integrate with lualine
218231
Plug 'nvim-lualine/lualine.nvim'
219232
233+
" integrate with heirline
234+
Plug 'rebelot/heirline.nvim'
235+
220236
call plug#end()
221237
222238
lua require('lsp-progress').setup()
@@ -241,6 +257,8 @@ lua require('lsp-progress').setup()
241257

242258
### Statusline Integration
243259

260+
#### [lualine](https://github.com/nvim-lualine/lualine.nvim)
261+
244262
```lua
245263
require("lualine").setup({
246264
sections = {
@@ -263,6 +281,32 @@ vim.api.nvim_create_autocmd("User", {
263281
})
264282
```
265283

284+
#### [heirline](https://github.com/rebelot/heirline.nvim)
285+
286+
```lua
287+
local LspProgress = {
288+
provider = require('lsp-progress').progress,
289+
update = {
290+
'User',
291+
pattern = 'LspProgressStatusUpdated',
292+
callback = vim.schedule_wrap(function()
293+
vim.cmd('redrawstatus')
294+
end),
295+
}
296+
}
297+
298+
local StatusLine = {
299+
-- Other StatusLine components
300+
{ ... },
301+
{ ... },
302+
LspProgress
303+
}
304+
305+
require('heirline').setup({
306+
statusline = StatusLine
307+
})
308+
```
309+
266310
## Configuration
267311

268312
To configure options, please use:

0 commit comments

Comments
 (0)