ofseed / copilot-status.nvim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

copilot-status.nvim

A lualine component to show github copilot status, you can toggle the enabled state by clicking

Screenshots

Copilot enabled image

Copilot disabled image

Installation

lazy.nvim

-- lua
{ "ofseed/copilot-status.nvim" }
-- lua
use { "ofseed/copilot-status" }
" vimscript
Plug 'ofseed/copilot-status'

Usage

Default values for lualine configuration is

lualine_x = {
  'encoding',
  'fileformat',
  'filetype'
}

So I recommend that you can add it to this table and arrange them in a reasonable order. My configuration is

lualine_x = {
  "copilot",
  "filetype",
  "fileformat",
  "encoding",
},

Or you can custom icons.

-- lua
require("lualine").setup {
  sections = {
    lualine_x = {
      -- Options with default values
      {
        "copilot",
        show_running = true,
        symbols = {
          status = {
            enabled = "",
            disabled = "",
          },
          spinners = require("copilot-status.spinners").dots,
        },
      },
    }
  }
}

TODO

  • Add different highlights
  • Show offline status

About

License:MIT License


Languages

Language:Lua 100.0%