From a620869a56a7d1bc9dfeabe7a8d759b0e73c76ee Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 29 Nov 2023 15:10:31 +0000 Subject: [PATCH 1/4] chore(master): release 1.0.2 --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 827fb4b..ed2bce9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.0.2](https://github.com/rebelot/heirline.nvim/compare/v1.0.1...v1.0.2) (2023-11-29) + + +### Bug Fixes + +* **winbar:** don't modify winbar for disabled buffers ([7ee3553](https://github.com/rebelot/heirline.nvim/commit/7ee355330b9c6c3d4a43c6f22bc78364ea9acac7)) + ## [1.0.1](https://github.com/rebelot/heirline.nvim/compare/v1.0.0...v1.0.1) (2023-09-03) From 512ff096d427ade3ca11e18f7b0a6f1819095a45 Mon Sep 17 00:00:00 2001 From: J <124119483+escwxyz@users.noreply.github.com> Date: Fri, 26 Jan 2024 15:40:34 +0800 Subject: [PATCH 2/4] fix(cookbook): migrate from `nvim_buf_get_option` to `nvim_get_option_value` See https://neovim.io/doc/user/deprecated.html#_api --- cookbook.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cookbook.md b/cookbook.md index ad6a51d..eabb496 100644 --- a/cookbook.md +++ b/cookbook.md @@ -1926,18 +1926,18 @@ local TablineFileName = { local TablineFileFlags = { { condition = function(self) - return vim.api.nvim_buf_get_option(self.bufnr, "modified") + return vim.api.nvim_get_option_value("modified", { buf = self.bufnr }) end, provider = "[+]", hl = { fg = "green" }, }, { condition = function(self) - return not vim.api.nvim_buf_get_option(self.bufnr, "modifiable") - or vim.api.nvim_buf_get_option(self.bufnr, "readonly") + return not vim.api.nvim_get_option_value("modifiable", { buf = self.bufnr }) + or vim.api.nvim_get_option_value("readonly", { buf = self.bufnr }) end, provider = function(self) - if vim.api.nvim_buf_get_option(self.bufnr, "buftype") == "terminal" then + if vim.api.nvim_get_option_value("buftype", { buf = self.bufnr }) == "terminal" then return "  " else return "" @@ -1986,7 +1986,7 @@ local TablineFileNameBlock = { -- a nice "x" button to close the buffer local TablineCloseButton = { condition = function(self) - return not vim.api.nvim_buf_get_option(self.bufnr, "modified") + return not vim.api.nvim_get_option_value("modified", { buf = self.bufnr }) end, { provider = " " }, { @@ -2031,7 +2031,7 @@ local BufferLine = utils.make_buflist( -- this is the default function used to retrieve buffers local get_bufs = function() return vim.tbl_filter(function(bufnr) - return vim.api.nvim_buf_get_option(bufnr, "buflisted") + return vim.api.nvim_get_option_value("buflisted", { buf = bufnr }) end, vim.api.nvim_list_bufs()) end From cce9ef1297bf46ef4611c06efb21fc3a53d268ac Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 12 Feb 2024 11:50:43 +0000 Subject: [PATCH 3/4] chore(master): release 1.0.3 --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed2bce9..3babded 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.0.3](https://github.com/rebelot/heirline.nvim/compare/v1.0.2...v1.0.3) (2024-02-12) + + +### Bug Fixes + +* **cookbook:** migrate from `nvim_buf_get_option` to `nvim_get_option_value` ([512ff09](https://github.com/rebelot/heirline.nvim/commit/512ff096d427ade3ca11e18f7b0a6f1819095a45)) + ## [1.0.2](https://github.com/rebelot/heirline.nvim/compare/v1.0.1...v1.0.2) (2023-11-29) From 2851793e567a657bc8e5671c8418a2321784c492 Mon Sep 17 00:00:00 2001 From: Axlefublr <101342105+Axlefublr@users.noreply.github.com> Date: Sun, 14 Apr 2024 12:18:47 +0800 Subject: [PATCH 4/4] fix readme --- cookbook.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/cookbook.md b/cookbook.md index eabb496..91d3a60 100644 --- a/cookbook.md +++ b/cookbook.md @@ -583,7 +583,7 @@ are absolutely free to omit that if you're not an icon person. ```lua local FileNameBlock = { - -- let's first set up some attributes needed by this component and it's children + -- let's first set up some attributes needed by this component and its children init = function(self) self.filename = vim.api.nvim_buf_get_name(0) end, @@ -730,7 +730,7 @@ Here's some classics! https://user-images.githubusercontent.com/36300441/187189451-519e5d2b-115b-4f36-bfb3-7d4ec50bec05.mov ```lua --- We're getting minimalists here! +-- We're getting minimalist here! local Ruler = { -- %l = current line number -- %L = number of lines in the buffer @@ -741,7 +741,7 @@ local Ruler = { ``` ```lua --- I take no credits for this! :lion: +-- I take no credits for this! 🦁 local ScrollBar ={ static = { sbar = { '▁', '▂', '▃', '▄', '▅', '▆', '▇', '█' } @@ -760,13 +760,12 @@ local ScrollBar ={ ### LSP -Nice work! You made it ~~jumped right~~ to the main courses! The finest rice is +Nice work! You ~~jumped right~~ made it to the main courses! The finest rice is here. heirline_lsp ```lua - local LSPActive = { condition = conditions.lsp_attached, update = {'LspAttach', 'LspDetach'}, @@ -775,7 +774,7 @@ local LSPActive = { -- provider = " [LSP]", -- Or complicate things a bit and get the servers names - provider = function() + provider = function() local names = {} for i, server in pairs(vim.lsp.get_active_clients({ bufnr = 0 })) do table.insert(names, server.name) @@ -861,7 +860,7 @@ local Navic = { dec = function(c) local line = bit.rshift(c, 16) local col = bit.band(bit.rshift(c, 6), 1023) - local winnr = bit.band(c, 63) + local winnr = bit.band(c, 63) return line, col, winnr end },