Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andrem222/copilot-lualine
This is a component which makes a status icon for copilot.lua
https://github.com/andrem222/copilot-lualine
component copilot copilot-nvim lua lualine neovim-lua neovim-plugin neovim-statusline nvim statusline
Last synced: 1 day ago
JSON representation
This is a component which makes a status icon for copilot.lua
- Host: GitHub
- URL: https://github.com/andrem222/copilot-lualine
- Owner: AndreM222
- License: mit
- Created: 2023-11-28T13:47:07.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-07T01:50:43.000Z (7 months ago)
- Last Synced: 2024-06-07T02:53:39.398Z (7 months ago)
- Topics: component, copilot, copilot-nvim, lua, lualine, neovim-lua, neovim-plugin, neovim-statusline, nvim, statusline
- Language: Lua
- Homepage:
- Size: 107 KB
- Stars: 38
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# copilot-lualine
Component for lualine with the purpose of recieving and previewing status of [copilot.lua](https://github.com/zbirenbaum/copilot.lua)`show_colors = false` - This are the default icons (All can be changed)
`show_colors = true` - This are the default colors (All can be changed)
#### Requirements
- [x] [Neovim](https://neovim.io/)
- [x] [Lualine](https://github.com/nvim-lualine/lualine.nvim)
- [x] [Copilot.lua](https://github.com/zbirenbaum/copilot.lua)
- [x] [Nerd Fonts](https://www.nerdfonts.com/#home) *- For Default Icons*## Installation
#### Using lazy.nvim
```lua
{ 'AndreM222/copilot-lualine' }
```
#### Using packer.nvim
```lua
use 'AndreM222/copilot-lualine'
```#### Using vim-plug
```lua
Plug 'AndreM222/copilot-lualine'
```## Setup
Add the component `copilot` to one of your lualine sections.
example:
```lua
lualine.setup({
options = {
icons_enabled = true,
theme = cozynight,
component_separators = { left = '', right = '' },
section_separators = { left = '', right = '' },
disabled_filetypes = {},
always_divide_middle = true
},
sections = {
lualine_a = { 'mode' },
lualine_b = { 'branch', 'diff',
{
'diagnostics',
sources = { "nvim_diagnostic" },
symbols = { error = ' ', warn = ' ', info = ' ', hint = ' ' }
}
},
lualine_c = { 'filename' },
lualine_x = { 'copilot' ,'encoding', 'fileformat', 'filetype' }, -- I added copilot here
lualine_y = { 'progress' },
lualine_z = { 'location' }
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = { 'filename' },
lualine_x = { 'location' },
lualine_y = {},
lualine_z = {}
},
tabline = {},
extensions = {}
})
```Customization is available. For example:
```lua
sections = {
lualine_x = {
{
'copilot',
-- Default values
symbols = {
status = {
icons = {
enabled = " ",
sleep = " ", -- auto-trigger disabled
disabled = " ",
warning = " ",
unknown = " "
},
hl = {
enabled = "#50FA7B",
sleep = "#AEB7D0",
disabled = "#6272A4",
warning = "#FFB86C",
unknown = "#FF5555"
}
},
spinners = require("copilot-lualine.spinners").dots,
spinner_color = "#6272A4"
},
show_colors = false,
show_loading = true
},
'encoding',
'fileformat',
'filetype'
}
}
```If you desire to use the colors of a highlight group, there is a function
you can call for that usage:```lua
hl = {
enabled = require('copilot-lualine.colors').get_hl_value(0, "DiagnosticWarn", "fg"), -- hl value
sleep = "#AEB7D0",
disabled = "#6272A4",
warning = "#FFB86C",
unknown = "#FF5555"
}
```## Contributors
Thanks everyone for the support