From 509b17fb21455fadc4702c991d411739c593c0d2 Mon Sep 17 00:00:00 2001 From: G Roques Date: Fri, 5 Jan 2024 13:40:45 -0600 Subject: [PATCH] docs: add heirline integration to README (#114) --- README.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/README.md b/README.md index efc4c05..92b636c 100644 --- a/README.md +++ b/README.md @@ -175,6 +175,11 @@ return require('packer').startup(function(use) config = ..., } + -- integrate with heirline + use { + 'rebelot/heirline.nvim', + config = ..., + } end) ``` @@ -202,6 +207,14 @@ require("lazy").setup({ config = ... }, + -- integrate with heirline + { + 'rebelot/heirline.nvim', + dependencies = { + 'linrongbin16/lsp-progress.nvim', + }, + config = ... + } }) ``` @@ -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() @@ -241,6 +257,8 @@ lua require('lsp-progress').setup() ### Statusline Integration +#### [lualine](https://github.com/nvim-lualine/lualine.nvim) + ```lua require("lualine").setup({ sections = { @@ -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: