Skip to content

Commit

Permalink
docs: add heirline integration to README (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
gbroques authored Jan 5, 2024
1 parent cabf7fd commit 509b17f
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ return require('packer').startup(function(use)
config = ...,
}

-- integrate with heirline
use {
'rebelot/heirline.nvim',
config = ...,
}
end)
```

Expand Down Expand Up @@ -202,6 +207,14 @@ require("lazy").setup({
config = ...
},

-- integrate with heirline
{
'rebelot/heirline.nvim',
dependencies = {
'linrongbin16/lsp-progress.nvim',
},
config = ...
}
})
```

Expand All @@ -217,6 +230,9 @@ Plug 'linrongbin16/lsp-progress.nvim'
" integrate with lualine
Plug 'nvim-lualine/lualine.nvim'
" integrate with heirline
Plug 'rebelot/heirline.nvim'
call plug#end()
lua require('lsp-progress').setup()
Expand All @@ -241,6 +257,8 @@ lua require('lsp-progress').setup()

### Statusline Integration

#### [lualine](https://github.com/nvim-lualine/lualine.nvim)

```lua
require("lualine").setup({
sections = {
Expand All @@ -263,6 +281,32 @@ vim.api.nvim_create_autocmd("User", {
})
```

#### [heirline](https://github.com/rebelot/heirline.nvim)

```lua
local LspProgress = {
provider = require('lsp-progress').progress,
update = {
'User',
pattern = 'LspProgressStatusUpdated',
callback = vim.schedule_wrap(function()
vim.cmd('redrawstatus')
end),
}
}

local StatusLine = {
-- Other StatusLine components
{ ... },
{ ... },
LspProgress
}

require('heirline').setup({
statusline = StatusLine
})
```

## Configuration

To configure options, please use:
Expand Down

0 comments on commit 509b17f

Please sign in to comment.