Skip to content

overseer.nvim component to mini.statusline #1200

Closed Answered by echasnovski
dhruvinsh asked this question in Q&A
Discussion options

You must be logged in to vote

Taking its lualine component as a reference, here is how I'd approach this:

  • Create a file 'lua/overseer-stl.lua' inside your config directory. This will be your statusline component. Populate it with the following content:
    local constants = require('overseer.constants')
    local task_list = require('overseer.task_list')
    local util = require('overseer.util')
    local STATUS = constants.STATUS
    
    local symbols = {
      [STATUS.FAILURE] = '󰅚 ',
      [STATUS.CANCELED] = '',
      [STATUS.SUCCESS] = '󰄴 ',
      [STATUS.RUNNING] = '󰑮 ',
    }
    
    return function()
      local tasks = task_list.list_tasks()
      local tasks_by_status = util.tbl_group_by(tasks, 'status')
      local pieces = { '󰍹 ' }
      for _, status in ipairs(STATUS.v…

Replies: 3 comments 9 replies

Comment options

You must be logged in to vote
4 replies
@dhruvinsh
Comment options

@echasnovski
Comment options

@dhruvinsh
Comment options

@echasnovski
Comment options

Answer selected by dhruvinsh
Comment options

You must be logged in to vote
3 replies
@echasnovski
Comment options

@dhruvinsh
Comment options

@echasnovski
Comment options

Comment options

You must be logged in to vote
2 replies
@echasnovski
Comment options

@dhruvinsh
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants