Skip to content

Commit

Permalink
feat: use quick_select for statusline (#129)
Browse files Browse the repository at this point in the history
* feat: use quick_select for statusline

* chore: delete unnecessary pcall lines

Co-authored-by: Calvin Bochulak <[email protected]>

* chore: refactor get tag_str logic

Co-authored-by: Calvin Bochulak <[email protected]>

* Update lua/lualine/components/grapple.lua

---------

Co-authored-by: Calvin Bochulak <[email protected]>
  • Loading branch information
letieu and cbochs authored Mar 18, 2024
1 parent 7f74e7d commit 9cb1749
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lua/lualine/components/grapple.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,16 @@ function Component:update_status()

local current = grapple.find({ buffer = 0 })

local App = require("grapple.app")
local app = App.get()
local quick_select = app.settings:quick_select()
local output = {}
for i, tag in ipairs(tags) do
local tag_str = tag.name and tag.name or i
-- stylua: ignore
local tag_str = tag.name and tag.name
or quick_select[i] and quick_select[i]
or i

local tag_fmt = self.options.inactive
if current and current.path == tag.path then
tag_fmt = self.options.active
Expand Down

0 comments on commit 9cb1749

Please sign in to comment.