Full Code of nvim-lualine/lualine.nvim for AI

master 47f91c416dae cached
138 files
467.4 KB
137.1k tokens
1 requests
Download .txt
Showing preview only (502K chars total). Download the full file or copy to clipboard to get everything.
Repository: nvim-lualine/lualine.nvim
Branch: master
Commit: 47f91c416dae
Files: 138
Total size: 467.4 KB

Directory structure:
gitextract_a833klid/

├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.md
│   │   └── feature_request.md
│   ├── generated-files-bot.yml
│   ├── stale.yml
│   └── workflows/
│       ├── autogen.yml
│       └── ci.yml
├── .gitignore
├── .luacheckrc
├── .luacov
├── .stylua.toml
├── CONTRIBUTING.md
├── LICENSE
├── Makefile
├── README.md
├── THEMES.md
├── doc/
│   └── lualine.txt
├── examples/
│   ├── bubbles.lua
│   ├── cosmicink.lua
│   ├── evil_lualine.lua
│   └── slanted-gaps.lua
├── lua/
│   ├── lualine/
│   │   ├── component.lua
│   │   ├── components/
│   │   │   ├── branch/
│   │   │   │   ├── git_branch.lua
│   │   │   │   └── init.lua
│   │   │   ├── buffers/
│   │   │   │   ├── buffer.lua
│   │   │   │   └── init.lua
│   │   │   ├── datetime.lua
│   │   │   ├── diagnostics/
│   │   │   │   ├── config.lua
│   │   │   │   ├── init.lua
│   │   │   │   └── sources.lua
│   │   │   ├── diff/
│   │   │   │   ├── git_diff.lua
│   │   │   │   └── init.lua
│   │   │   ├── encoding.lua
│   │   │   ├── fileformat.lua
│   │   │   ├── filename.lua
│   │   │   ├── filesize.lua
│   │   │   ├── filetype.lua
│   │   │   ├── hostname.lua
│   │   │   ├── location.lua
│   │   │   ├── lsp_status.lua
│   │   │   ├── mode.lua
│   │   │   ├── progress.lua
│   │   │   ├── searchcount.lua
│   │   │   ├── selectioncount.lua
│   │   │   ├── special/
│   │   │   │   ├── eval_func_component.lua
│   │   │   │   ├── function_component.lua
│   │   │   │   └── vim_var_component.lua
│   │   │   ├── tabs/
│   │   │   │   ├── init.lua
│   │   │   │   └── tab.lua
│   │   │   └── windows/
│   │   │       ├── init.lua
│   │   │       └── window.lua
│   │   ├── config.lua
│   │   ├── extensions/
│   │   │   ├── aerial.lua
│   │   │   ├── assistant.lua
│   │   │   ├── avante.lua
│   │   │   ├── chadtree.lua
│   │   │   ├── ctrlspace.lua
│   │   │   ├── fern.lua
│   │   │   ├── fugitive.lua
│   │   │   ├── fzf.lua
│   │   │   ├── lazy.lua
│   │   │   ├── man.lua
│   │   │   ├── mason.lua
│   │   │   ├── mundo.lua
│   │   │   ├── neo-tree.lua
│   │   │   ├── nerdtree.lua
│   │   │   ├── nvim-dap-ui.lua
│   │   │   ├── nvim-tree.lua
│   │   │   ├── oil.lua
│   │   │   ├── overseer.lua
│   │   │   ├── quickfix.lua
│   │   │   ├── symbols-outline.lua
│   │   │   ├── toggleterm.lua
│   │   │   └── trouble.lua
│   │   ├── highlight.lua
│   │   ├── themes/
│   │   │   ├── 16color.lua
│   │   │   ├── OceanicNext.lua
│   │   │   ├── PaperColor.lua
│   │   │   ├── Tomorrow.lua
│   │   │   ├── auto.lua
│   │   │   ├── ayu.lua
│   │   │   ├── ayu_dark.lua
│   │   │   ├── ayu_light.lua
│   │   │   ├── ayu_mirage.lua
│   │   │   ├── base16.lua
│   │   │   ├── codedark.lua
│   │   │   ├── dracula.lua
│   │   │   ├── everforest.lua
│   │   │   ├── gruvbox-material.lua
│   │   │   ├── gruvbox.lua
│   │   │   ├── gruvbox_dark.lua
│   │   │   ├── gruvbox_light.lua
│   │   │   ├── horizon.lua
│   │   │   ├── iceberg.lua
│   │   │   ├── iceberg_dark.lua
│   │   │   ├── iceberg_light.lua
│   │   │   ├── jellybeans.lua
│   │   │   ├── material.lua
│   │   │   ├── modus-vivendi.lua
│   │   │   ├── molokai.lua
│   │   │   ├── moonfly.lua
│   │   │   ├── nightfly.lua
│   │   │   ├── nord.lua
│   │   │   ├── onedark.lua
│   │   │   ├── onelight.lua
│   │   │   ├── palenight.lua
│   │   │   ├── papercolor_dark.lua
│   │   │   ├── papercolor_light.lua
│   │   │   ├── powerline.lua
│   │   │   ├── powerline_dark.lua
│   │   │   ├── pywal.lua
│   │   │   ├── seoul256.lua
│   │   │   ├── solarized.lua
│   │   │   ├── solarized_dark.lua
│   │   │   ├── solarized_light.lua
│   │   │   ├── tomorrow_night.lua
│   │   │   └── wombat.lua
│   │   └── utils/
│   │       ├── class.lua
│   │       ├── color_utils.lua
│   │       ├── fn_store.lua
│   │       ├── job.lua
│   │       ├── loader.lua
│   │       ├── mode.lua
│   │       ├── notices.lua
│   │       ├── nvim_opts.lua
│   │       ├── section.lua
│   │       └── utils.lua
│   ├── lualine.lua
│   └── lualine_require.lua
├── scripts/
│   ├── docgen.sh
│   ├── nvim_isolated_conf.sh
│   └── test_runner.sh
└── tests/
    ├── helpers.lua
    ├── minimal_init.lua
    ├── spec/
    │   ├── component_spec.lua
    │   ├── config_spec.lua
    │   ├── lualine_spec.lua
    │   └── utils_spec.lua
    └── statusline.lua

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug Report
about: Report a problem in lualine
title: 'Bug: '
labels: bug

---

<!--
  Before reporting: search existing issues and
  ensure you are running neovim >= 0.5 and the
  latest version of lualine.
-->

### Self Checks

<!-- Check these boxes by placing an X in the middle -->
- [ ] I'm using the latest lualine.
- [ ] I didn't find the issue in existing issues or PRs.

### How to reproduce the problem
<!-- Add steps to reproduce with minimal config from below -->

### Expected behaviour


### Actual behaviour


### Minimal config to reproduce the issue

<!--
  =================
  ### IMPORTANT ###
  =================

  You need to provide a way to reproduce the issue without influence
  of other plugins.

  Issues without proper format and a proper way to
  reproduce might be ignored and closed without any reply.

  This script can help you with that.
  https://github.com/nvim-lualine/lualine.nvim/blob/master/scripts/nvim_isolated_conf.sh

  Create an isolated config directory with:

    `nvim_isolated_conf.sh -c DirectoryName`

  Then modify the DirectoryName/.config/nvim/init.vim
  so you can reproduce the issue .

    `nvim_isolated_conf.sh -e DirectoryName`

  will open DirectoryName/.config/nvim/init.vim in neovim.
  the init.vim will have instructions on how and where to place
  your config don't worry if you don't know viml you can get away
  with lua even in a vim file.

  Then you can load the config in an isolated environment to see
  if the issue is occurring with

    `nvim_isolated_conf.sh -l DirectoryName`

  Paste the DirectoryName/.config/init.vim below
-->


### Additional information



================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature Request
about: Request a feature for lualine
title: "Feat: "
labels: new feature
---

<!--
  Before creating a new request: search existing issues and prs
  and ensure it hasn't been already requested.
-->

### Requested feature

<!-- Describe the feature with details. -->

### Motivation

<!-- Explain why you think it should be included in lualine.-->


================================================
FILE: .github/generated-files-bot.yml
================================================
generatedFiles:
  - path: "doc/lualine.txt"
    message: "`lualine.txt` is generated from README.md. Make changes there instead."
ignoreAuthors:
  - 'github-actions[bot]'
  - 'shadmansaleh'


================================================
FILE: .github/stale.yml
================================================
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
  - pinned
  - upstream
  - help wanted
  - wip
  - good first issue
  - discuss
  - pin
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
  This issue has been automatically marked as stale because it has not had
  recent activity. It will be closed if no further activity occurs. Thank you
  for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false


================================================
FILE: .github/workflows/autogen.yml
================================================
name: autogen
on:
  push:
    branches: [master]
    paths:
      - "lua/**.lua"
      - "examples/**.lua"
      - "tests/**.lua"
      - ".stylua.toml"
      - "README.md"

# Cancel any in-progress CI runs for a PR if it is updated
concurrency:
  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
  cancel-in-progress: true

jobs:
  autogen:
    name: "(vimdoc|formating)"
    runs-on: ubuntu-22.04
    timeout-minutes: 10
    permissions:
      contents: write
      pull-requests: write
    steps:
      - uses: actions/checkout@v2
      - name: Generate docs with panvimdoc
        uses: kdheepak/panvimdoc@v2.7.1
        with:
          vimdoc: lualine
          description: fast and easy to configure statusline plugin for neovim
      - name: Apply stylua
        uses: JohnnyMorganz/stylua-action@1.0.0
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          args: --config-path=.stylua.toml lua/ examples/ tests/
          version: 0.14.1
      - name: Push changes
        uses: stefanzweifel/git-auto-commit-action@v4
        with:
          commit_user_name: github-actions[bot]
          commit_user_email: 41898282+github-actions[bot]@users.noreply.github.com
          commit_message: "chore: autogen (vimdocs+formating)"
          branch: ${{ github.head_ref }}
          file_pattern: lua/ examples/ tests/ doc/lualine.txt


================================================
FILE: .github/workflows/ci.yml
================================================
name: Tests

on:
  push:
    branches: [master]
  pull_request:
    branches: [master]

# Cancel any in-progress CI runs for a PR if it is updated
concurrency:
  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
  cancel-in-progress: true

jobs:
  tests:
    name: ${{ matrix.os }} ${{ matrix.flavor }}
    strategy:
      fail-fast: false
      matrix:
        include:
          - flavor: nvim-0.7
            runner: ubuntu-22.04
            os: linux
            nvim_version: v0.7.0
          - flavor: nvim-0.8
            runner: ubuntu-22.04
            os: linux
            nvim_version: v0.8.0
          - flavor: nvim-0.9
            runner: ubuntu-22.04
            os: linux
            nvim_version: v0.9.0
          - flavor: nvim-0.10
            runner: ubuntu-22.04
            os: linux
            nvim_version: v0.10.0
          - flavor: nvim-0.11
            runner: ubuntu-22.04
            os: linux
            nvim_version: v0.11.0
          - flavor: nvim-nightly
            runner: ubuntu-22.04
            os: linux
            nvim_version: nightly
    runs-on: ${{ matrix.runner }}
    timeout-minutes: 10
    steps:
      - uses: actions/checkout@v2
      - name: Setup Test Environment
        run: |
          mkdir -p ./tmp_home/nvim/pack/vendor/start
          git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ./tmp_home/nvim/pack/vendor/start/plenary.nvim
          git clone --depth 1 https://github.com/nvim-tree/nvim-web-devicons ./tmp_home/nvim/pack/vendor/start/nvim-web-devicons
          ln -s $(pwd) ./tmp_home/nvim/pack/vendor/start
      - name: Setup neovim ${{matrix.nvim_version}}
        uses: rhysd/action-setup-vim@v1
        with:
          neovim: true
          version: ${{matrix.nvim_version}}
      - name: Run tests
        run: |
          make test
  lint:
    runs-on: ubuntu-22.04
    timeout-minutes: 10
    steps:
      - uses: actions/checkout@v2
      - name: Setup linters
        run: |
          sudo apt-get update
          sudo apt-get install luarocks
          sudo luarocks install luacheck
      - name: Run luacheck
        run: |
          make lint


================================================
FILE: .gitignore
================================================
# Compiled Lua sources
luac.out

# luarocks build files
*.src.rock
*.zip
*.tar.gz

# Object files
*.o
*.os
*.ko
*.obj
*.elf

# Precompiled Headers
*.gch
*.pch

# Libraries
*.lib
*.a
*.la
*.lo
*.def
*.exp

# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib

# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex

# ctags
tags

# helptags
/doc/tags

# panvimdoc
/panvimdoc/

# luacov
/luacov.report
/luacov.report.index
/luacov.stats

# tests
/tmp_home/
.luarc.json


================================================
FILE: .luacheckrc
================================================
globals = {
   "vim",
   "assert"
}

-- Don't report unused self arguments of methods.
self = false

-- Rerun tests only if their modification time changed.
cache = true

ignore = {
  "631",  -- max_line_length
  "212/_.*",  -- unused argument, for vars with "_" prefix
}


================================================
FILE: .luacov
================================================
return {
  include = {
    "lua/lualine$",
    "lua/lualine_require$",
    "lua/lualine%/.+$",
  },
  exclude = {
    "lua/lualine/themes%/.+$",
    "lua/lualine/extensions%/.+$",
  },
  modules = {
    ["lualine"] = "lua/lualine.lua",
    ["lualine_require"] = "lua/lualine_require.lua",
    ["lualine.*"] = "lua/",
  },
  statsfile = 'luacov.stats',
  reportfile = 'luacov.report',
  -- includeuntestedfiles = true,
}
-- vim:ft=lua


================================================
FILE: .stylua.toml
================================================
indent_type = "Spaces"
indent_width = 2
quote_style = "AutoPreferSingle"
call_parentheses = "NoSingleTable"
collapse_simple_statement = "Never"


================================================
FILE: CONTRIBUTING.md
================================================
# Contributing to lualine.nvim

Thanks for considering to contribute.

### Getting started

If you're not sure where to help? You can try these:

- You can look at the currently open [issues](https://github.com/nvim-lualine/lualine.nvim/issues)
  to see if some bug needs fixing or for cool feature ideas.<br>
  You should also look at currently open PRs ([Pull requests](https://github.com/nvim-lualine/lualine.nvim/pulls)) to see if some abandoned PR interests you.<br>
  *We could really use some help with tests & docs they are currently lacking :)*
- You can add an exciting new component, extension or theme.
  Note: Currently we aren't adding regular colorscheme based themes.
  We think they make more sense with colorschemes as they tend not to get
  updated once added here. But if you have some unique themes idea like [auto](https://github.com/nvim-lualine/lualine.nvim/blob/master/THEMES.md#auto) or [pywal](https://github.com/nvim-lualine/lualine.nvim/blob/master/THEMES.md#pywal) feel free to open an PR or issue.
- Feel free to open issues or unfinished PRs for help.
  I'd actually recommend you to open an issue first for bigger PRs to discuss
  the feature with a maintainer beforehand. That way you can know if the
  feature is likely to be accepted or not before you get started.
  You'll get recommendation and help with implementation specially if you show
  willingness to implement it yourself.
- Do add tests and docs for your changes.

Good luck!

### Developer tools

*Let's introduce you to the tools we use.*

- Your PR needs to pass tests & linter. We lint our codebase with [luacheck](https://github.com/mpeterv/luacheck)
  and run tests with [plenary-test][plenary.nvim] these will be run on CI. If you want you can run tests & linter
  locally with `make test` & `make lint` respectively. Or `make check` to run both linter & tests. For running
  tests you'll have to make sure lualine.nvim, [plenary.nvim][plenary.nvim] and
  [nvim-web-devicons](https://github.com/nvim-tree/nvim-web-devicons) are in same directory.
- Lua codebase gets formatted with [stylua](https://github.com/JohnnyMorganz/StyLua) in CI.
  So you can ignore formatting. But if you want to submit formatted
  PR you can run formatter locally with `make format`.
- VimDocs are auto generated with [panvimdoc](https://github.com/kdheepak/panvimdoc) from README.md.
  So don't make changes to doc/lualine.txt . Instead add your docs to README or Wiki.
  The docgen in ran by CI too. If you want to run it locally you can do so
  with `make docgen`. Note: you'll need to have [pandoc](https://github.com/jgm/pandoc) installed.
- `make precommit_check` can come quite handy it'll run all the above mentioned tools
- You can check our test coverage with `make testcov`.
  You'll need to have [luacov](https://github.com/keplerproject/luacov)
  & [luacov-console](https://github.com/spacewander/luacov-console) installed for that.
  If you want luacov's detailed report files, run the command with the `NOCLEAN` env set.
  For example `NOCLEAN=1 make testcov`

[plenary.nvim]: https://github.com/nvim-lua/plenary.nvim


================================================
FILE: LICENSE
================================================
MIT License

Copyright (c) 2020 hoob3rt

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: Makefile
================================================
.DEFAULT_GOAL = check

lint:
	@luacheck lua/lualine/
	@luacheck tests/
	@luacheck examples/

format:
	@stylua --config-path=.stylua.toml lua/ examples/ tests/

test:
	@mkdir -p tmp_home
	@export XDG_DATA_HOME='./tmp_home' && \
	export XDG_CONFIG_HOME='./tmp_home' && \
	bash ./scripts/test_runner.sh
	@rm -rf tmp_home

# Install luacov & luacov-console from luarocks
testcov:
	@mkdir -p ./tmp_home/data/nvim
	@mkdir -p ./tmp_home/config/nvim
	@export XDG_DATA_HOME=$(realpath './tmp_home/data') && \
	export XDG_CONFIG_HOME=$(realpath './tmp_home/config') && \
	export TEST_COV=true && \
	bash ./scripts/test_runner.sh
	@luacov-console lua/
	@luacov-console -s
ifeq ($(NOCLEAN), )
		@rm luacov.*
endif
	@rm -rf tmp_home

docgen:
	@sh ./scripts/docgen.sh

precommit_check: docgen format test lint

check: lint test


================================================
FILE: README.md
================================================
# lualine.nvim

<!-- panvimdoc-ignore-start -->

![code size](https://img.shields.io/github/languages/code-size/nvim-lualine/lualine.nvim?style=flat-square)
![license](https://img.shields.io/github/license/nvim-lualine/lualine.nvim?style=flat-square)

<!-- panvimdoc-ignore-end -->

A blazing fast and easy to configure Neovim statusline written in Lua.

`lualine.nvim` requires Neovim >= 0.7.

For previous versions of neovim please use compatability tags for example
compat-nvim-0.5

## Contributing

Feel free to create an issue/PR if you want to see anything else implemented.
If you have some question or need help with configuration, start a [discussion](https://github.com/nvim-lualine/lualine.nvim/discussions).

Please read [CONTRIBUTING.md](./CONTRIBUTING.md) before opening a PR.
You can also help with documentation in the [wiki](https://github.com/nvim-lualine/lualine.nvim/wiki).

<!-- panvimdoc-ignore-start -->

## Screenshots

Here is a preview of what lualine can look like.

<p>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108650373-bb025580-74bf-11eb-8682-2c09321dd18e.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108650377-bd64af80-74bf-11eb-9c55-fbfc51b39fe8.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108650378-be95dc80-74bf-11eb-9718-82b242ecdd54.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108650381-bfc70980-74bf-11eb-9245-85c48f0f154a.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/103467925-32372b00-4d54-11eb-88d6-6d39c46854d8.png'/>
</p>

Screenshots of all available themes are listed in [THEMES.md](./THEMES.md)

For those who want to break the norms, you can create custom looks for lualine.

**Example** :

- [evil_lualine](examples/evil_lualine.lua)
  <img width='700' src='https://user-images.githubusercontent.com/13149513/113875129-4453ba00-97d8-11eb-8f21-94a9ef565db3.png'/>
- [slanted-gaps](examples/slanted-gaps.lua)
  <img width='700' src='https://user-images.githubusercontent.com/13149513/143395518-f6d6f748-c1ca-491b-9dab-246d0a8cf23f.png'/>
- [bubbles](examples/bubbles.lua)
  <img width='700' src='https://user-images.githubusercontent.com/20235646/131350468-fc556196-5f46-4bfe-a72e-960f6a58db2c.png'/>
- [cosmicink](examples/cosmicink.lua)
  <img width='700' src='https://github.com/user-attachments/assets/c8d3e4ba-4997-42e9-a1bb-d5e2a444bbfd'/>

<!-- panvimdoc-ignore-end -->

## Performance compared to other plugins

Unlike other statusline plugins, lualine loads only the components you specify, and nothing else.

Startup time performance measured with an amazing plugin [dstein64/vim-startuptime](https://github.com/dstein64/vim-startuptime)

Times are measured with a clean `init.vim` with only `vim-startuptime`,
`vim-plug` and given statusline plugin installed.
In control just `vim-startuptime` and`vim-plug` is installed.
And measured time is complete startuptime of vim not time spent
on specific plugin. These numbers are the average of 20 runs.

| control | lualine | lightline | airline |
| :-----: | :-----: | :-------: | :-----: |
| 17.2 ms | 24.8 ms |  25.5 ms  | 79.9 ms |

Last Updated On: 18-04-2022

## Installation

### [vim-plug](https://github.com/junegunn/vim-plug)

```vim
Plug 'nvim-lualine/lualine.nvim'
" If you want to have icons in your statusline choose one of these
Plug 'nvim-tree/nvim-web-devicons'
```

### [packer.nvim](https://github.com/wbthomason/packer.nvim)

```lua
use {
  'nvim-lualine/lualine.nvim',
  requires = { 'nvim-tree/nvim-web-devicons', opt = true }
}
```

### [lazy.nvim](https://github.com/folke/lazy.nvim)

```lua
{
    'nvim-lualine/lualine.nvim',
    dependencies = { 'nvim-tree/nvim-web-devicons' }
}
```

You'll also need to have a patched font if you want icons.

## Usage and customization

Lualine has sections as shown below.

```text
+-------------------------------------------------+
| A | B | C                             X | Y | Z |
+-------------------------------------------------+
```

Each sections holds its components e.g. Vim's current mode.

### Configuring lualine in init.vim

All the examples below are in lua. You can use the same examples
in `.vim` files by wrapping them in lua heredoc like this:

```vim
lua << END
require('lualine').setup()
END
```

For more information, check out `:help lua-heredoc`.

#### Default configuration

```lua
require('lualine').setup {
  options = {
    icons_enabled = true,
    theme = 'auto',
    component_separators = { left = '', right = ''},
    section_separators = { left = '', right = ''},
    disabled_filetypes = {
      statusline = {},
      winbar = {},
    },
    ignore_focus = {},
    always_divide_middle = true,
    always_show_tabline = true,
    globalstatus = false,
    refresh = {
      statusline = 1000,
      tabline = 1000,
      winbar = 1000,
      refresh_time = 16, -- ~60fps
      events = {
        'WinEnter',
        'BufEnter',
        'BufWritePost',
        'SessionLoadPost',
        'FileChangedShellPost',
        'VimResized',
        'Filetype',
        'CursorMoved',
        'CursorMovedI',
        'ModeChanged',
      },
    }
  },
  sections = {
    lualine_a = {'mode'},
    lualine_b = {'branch', 'diff', 'diagnostics'},
    lualine_c = {'filename'},
    lualine_x = {'encoding', 'fileformat', 'filetype'},
    lualine_y = {'progress'},
    lualine_z = {'location'}
  },
  inactive_sections = {
    lualine_a = {},
    lualine_b = {},
    lualine_c = {'filename'},
    lualine_x = {'location'},
    lualine_y = {},
    lualine_z = {}
  },
  tabline = {},
  winbar = {},
  inactive_winbar = {},
  extensions = {}
}
```

If you want to get your current lualine config, you can
do so with:

```lua
require('lualine').get_config()

```

---

### Starting lualine

```lua
require('lualine').setup()
```

---

### Setting a theme

```lua
options = { theme = 'gruvbox' }
```

All available themes are listed in [THEMES.md](./THEMES.md).

Please create a PR if you managed to port a popular theme before us, [here is how to do it](./CONTRIBUTING.md).

#### Customizing themes

```lua
local custom_gruvbox = require'lualine.themes.gruvbox'

-- Change the background of lualine_c section for normal mode
custom_gruvbox.normal.c.bg = '#112233'

require('lualine').setup {
  options = { theme  = custom_gruvbox },
  ...
}
```

Theme structure is available [here](https://github.com/nvim-lualine/lualine.nvim/wiki/Writing-a-theme).

---

### Separators

lualine defines two kinds of separators:

- `section_separators` - separators between sections
- `component_separators` - separators between the different components in sections

**Note**: if viewing this README in a browser, chances are the characters below will not be visible.

```lua
options = {
  section_separators = { left = '', right = '' },
  component_separators = { left = '', right = '' }
}
```

Here, left refers to the left-most sections (a, b, c), and right refers
to the right-most sections (x, y, z).

#### Disabling separators

```lua
options = { section_separators = '', component_separators = '' }
```

---

### Changing components in lualine sections

```lua
sections = {lualine_a = {'mode'}}
```

#### Available components

- `branch` (git branch)
- `buffers` (shows currently available buffers)
- `diagnostics` (diagnostics count from your preferred source)
- `diff` (git diff status)
- `encoding` (file encoding)
- `fileformat` (file format)
- `filename`
- `filesize`
- `filetype`
- `hostname`
- `location` (location in file in line:column format)
- `mode` (vim mode)
- `progress` (%progress in file)
- `searchcount` (number of search matches when hlsearch is active)
- `selectioncount` (number of selected characters or lines)
- `tabs` (shows currently available tabs)
- `windows` (shows currently available windows)
- `lsp_status` (shows active LSPs in the current buffer and a progress spinner)

#### Custom components

##### Lua functions as lualine component

```lua
local function hello()
  return [[hello world]]
end
sections = { lualine_a = { hello } }
```

##### Vim functions as lualine component

```lua
sections = { lualine_a = {'FugitiveHead'} }
```

##### Vim's statusline items as lualine component

```lua
sections = { lualine_c = {'%=', '%t%m', '%3p'} }
```

##### Vim variables as lualine component

Variables from `g:`, `v:`, `t:`, `w:`, `b:`, `o:`, `to:`, `wo:`, `bo:` scopes can be used.

See `:h lua-vim-variables` and `:h lua-vim-options` if you are not sure what to use.

```lua
sections = { lualine_a = { 'g:coc_status', 'bo:filetype' } }
```

##### Lua expressions as lualine component

You can use any valid lua expression as a component including:

- oneliners
- global variables
- require statements

```lua
sections = { lualine_c = { "os.date('%a')", 'data', "require'lsp-status'.status()" } }
```

`data` is a global variable in this example.

---

### Component options

Component options can change the way a component behave.
There are two kinds of options:

- global options affecting all components
- local options affecting specific

Global options can be used as local options (can be applied to specific components)
but you cannot use local options as global.
Global option used locally overwrites the global, for example:

```lua
    require('lualine').setup {
      options = { fmt = string.lower },
      sections = { lualine_a = {
        { 'mode', fmt = function(str) return str:sub(1,1) end } },
                  lualine_b = {'branch'} }
    }
```

`mode` will be formatted with the passed function so only first char will be
shown . On the other hand branch will be formatted with global formatter
`string.lower` so it will be showed in lower case.

#### Available options

#### Global options

These are `options` that are used in options table.
They set behavior of lualine.

Values set here are treated as default for other options
that work in component level.

For example even though `icons_enabled` is a general component option.
You can set `icons_enabled` to `false` and icons will be disabled on all
component. You can still overwrite defaults set in option table by specifying
the option value in component.

```lua
options = {
  theme = 'auto', -- lualine theme
  component_separators = { left = '', right = '' },
  section_separators = { left = '', right = '' },
  disabled_filetypes = {     -- Filetypes to disable lualine for.
      statusline = {},       -- only ignores the ft for statusline.
      winbar = {},           -- only ignores the ft for winbar.
  },

  ignore_focus = {},         -- If current filetype is in this list it'll
                             -- always be drawn as inactive statusline
                             -- and the last window will be drawn as active statusline.
                             -- for example if you don't want statusline of
                             -- your file tree / sidebar window to have active
                             -- statusline you can add their filetypes here.
                             --
                             -- Can also be set to a function that takes the
                             -- currently focused window as its only argument
                             -- and returns a boolean representing whether the
                             -- window's statusline should be drawn as inactive.

  always_divide_middle = true, -- When set to true, left sections i.e. 'a','b' and 'c'
                               -- can't take over the entire statusline even
                               -- if neither of 'x', 'y' or 'z' are present.

  always_show_tabline = true -- When set to true, if you have configured lualine for displaying tabline
                          -- then tabline will always show. If set to false, then tabline will be displayed
                          -- only when there are more than 1 tab. (see :h showtabline)

  globalstatus = false,        -- enable global statusline (have a single statusline
                               -- at bottom of neovim instead of one for  every window).
                               -- This feature is only available in neovim 0.7 and higher.

  refresh = {                  -- sets how often lualine should refresh it's contents (in ms)
    statusline = 100,         -- The refresh option sets minimum time that lualine tries
    tabline = 100,            -- to maintain between refresh. It's not guarantied if situation
    winbar = 100              -- arises that lualine needs to refresh itself before this time
                              -- it'll do it.
    refresh_time = 16,        -- ~60fps the time after which refresh queue is processed. Mininum refreshtime for lualine
    events = {                -- The auto command events at which lualine refreshes
      'WinEnter',
      'BufEnter',
      'BufWritePost',
      'SessionLoadPost',
      'FileChangedShellPost',
      'VimResized',
      'Filetype',
      'CursorMoved',
      'CursorMovedI',
      'ModeChanged',
    },
                               -- Also you can force lualine's refresh by calling refresh function
                               -- like require('lualine').refresh()
  }
}
```

#### General component options

These are options that control behavior at component level
and are available for all components.

```lua
sections = {
  lualine_a = {
    {
      'mode',
      icons_enabled = true, -- Enables the display of icons alongside the component.
      -- Defines the icon to be displayed in front of the component.
      -- Can be string|table
      -- As table it must contain the icon as first entry and can use
      -- color option to custom color the icon. Example:
      -- {'branch', icon = ''} / {'branch', icon = {'', color={fg='green'}}}

      -- icon position can also be set to the right side from table. Example:
      -- {'branch', icon = {'', align='right', color={fg='green'}}}
      icon = nil,

      separator = nil,      -- Determines what separator to use for the component.
                            -- Note:
                            --  When a string is provided it's treated as component_separator.
                            --  When a table is provided it's treated as section_separator.
                            --  Passing an empty string disables the separator.
                            --
                            -- These options can be used to set colored separators
                            -- around a component.
                            --
                            -- The options need to be set as such:
                            --   separator = { left = '', right = ''}
                            --
                            -- Where left will be placed on left side of component,
                            -- and right will be placed on its right.
                            --

      cond = nil,           -- Condition function, the component is loaded when the function returns `true`.

      draw_empty = false,   -- Whether to draw component even if it's empty.
                            -- Might be useful if you want just the separator.

      -- Defines a custom color for the component:
      --
      -- 'highlight_group_name' | { fg = '#rrggbb'|cterm_value(0-255)|'color_name(red)', bg= '#rrggbb', gui='style' } | function
      -- Note:
      --  '|' is synonymous with 'or', meaning a different acceptable format for that placeholder.
      -- color function has to return one of other color types ('highlight_group_name' | { fg = '#rrggbb'|cterm_value(0-255)|'color_name(red)', bg= '#rrggbb', gui='style' })
      -- color functions can be used to have different colors based on state as shown below.
      --
      -- Examples:
      --   color = { fg = '#ffaa88', bg = 'grey', gui='italic,bold' },
      --   color = { fg = 204 }   -- When fg/bg are omitted, they default to the your theme's fg/bg.
      --   color = 'WarningMsg'   -- Highlight groups can also be used.
      --   color = function(section)
      --      return { fg = vim.bo.modified and '#aa3355' or '#33aa88' }
      --   end,
      color = nil, -- The default is your theme's color for that section and mode.

      -- Specify what type a component is, if omitted, lualine will guess it for you.
      --
      -- Available types are:
      --   [format: type_name(example)], mod(branch/filename),
      --   stl(%f/%m), var(g:coc_status/bo:modifiable),
      --   lua_expr(lua expressions), vim_fun(viml function name)
      --
      -- Note:
      -- lua_expr is short for lua-expression and vim_fun is short for vim-function.
      type = nil,

      padding = 1, -- Adds padding to the left and right of components.
                   -- Padding can be specified to left or right independently, e.g.:
                   --   padding = { left = left_padding, right = right_padding }

      fmt = nil,   -- Format function, formats the component's output.
                   -- This function receives two arguments:
                   -- - string that is going to be displayed and
                   --   that can be changed, enhanced and etc.
                   -- - context object with information you might
                   --   need. E.g. tabnr if used with tabs.
      on_click = nil, -- takes a function that is called when component is clicked with mouse.
                   -- the function receives several arguments
                   -- - number of clicks in case of multiple clicks
                   -- - mouse button used (l(left)/r(right)/m(middle)/...)
                   -- - modifiers pressed (s(shift)/c(ctrl)/a(alt)/m(meta)...)
    }
  }
}
```

#### Component specific options

These are options that are available on specific components.
For example, you have option on `diagnostics` component to
specify what your diagnostic sources will be.

#### buffers component options

```lua
sections = {
  lualine_a = {
    {
      'buffers',
      show_filename_only = true,   -- Shows shortened relative path when set to false.
      hide_filename_extension = false,   -- Hide filename extension when set to true.
      show_modified_status = true, -- Shows indicator when the buffer is modified.

      mode = 0, -- 0: Shows buffer name
                -- 1: Shows buffer index
                -- 2: Shows buffer name + buffer index
                -- 3: Shows buffer number
                -- 4: Shows buffer name + buffer number

      max_length = vim.o.columns * 2 / 3, -- Maximum width of buffers component,
                                          -- it can also be a function that returns
                                          -- the value of `max_length` dynamically.
      filetype_names = {
        TelescopePrompt = 'Telescope',
        dashboard = 'Dashboard',
        packer = 'Packer',
        fzf = 'FZF',
        alpha = 'Alpha'
      }, -- Shows specific buffer name for that filetype ( { `filetype` = `buffer_name`, ... } )

      -- Automatically updates active buffer color to match color of other components (will be overidden if buffers_color is set)
      use_mode_colors = false,

      buffers_color = {
        -- Same values as the general color option can be used here.
        active = 'lualine_{section}_normal',     -- Color for active buffer.
        inactive = 'lualine_{section}_inactive', -- Color for inactive buffer.
      },

      symbols = {
        modified = ' ●',      -- Text to show when the buffer is modified
        alternate_file = '#', -- Text to show to identify the alternate file
        directory =  '',     -- Text to show when the buffer is a directory
      },
    }
  }
}
```

#### datetime component options

```lua
sections = {
  lualine_a = {
    {
      'datetime',
      -- options: default, us, uk, iso, or your own format string ("%H:%M", etc..)
      style = 'default'
    }
  }
}
```

#### diagnostics component options

```lua
sections = {
  lualine_a = {
    {
      'diagnostics',

      -- Table of diagnostic sources, available sources are:
      --   'nvim_lsp', 'nvim_diagnostic', 'nvim_workspace_diagnostic', 'coc', 'ale', 'vim_lsp'.
      -- or a function that returns a table as such:
      --   { error=error_cnt, warn=warn_cnt, info=info_cnt, hint=hint_cnt }
      sources = { 'nvim_diagnostic', 'coc' },

      -- Displays diagnostics for the defined severity types
      sections = { 'error', 'warn', 'info', 'hint' },

      diagnostics_color = {
        -- Same values as the general color option can be used here.
        error = 'DiagnosticError', -- Changes diagnostics' error color.
        warn  = 'DiagnosticWarn',  -- Changes diagnostics' warn color.
        info  = 'DiagnosticInfo',  -- Changes diagnostics' info color.
        hint  = 'DiagnosticHint',  -- Changes diagnostics' hint color.
      },
      symbols = {error = 'E', warn = 'W', info = 'I', hint = 'H'},
      colored = true,           -- Displays diagnostics status in color if set to true.
      update_in_insert = false, -- Update diagnostics in insert mode.
      always_visible = false,   -- Show diagnostics even if there are none.
    }
  }
}
```

#### diff component options

```lua
sections = {
  lualine_a = {
    {
      'diff',
      colored = true, -- Displays a colored diff status if set to true
      diff_color = {
        -- Same color values as the general color option can be used here.
        added    = 'LuaLineDiffAdd',    -- Changes the diff's added color
        modified = 'LuaLineDiffChange', -- Changes the diff's modified color
        removed  = 'LuaLineDiffDelete', -- Changes the diff's removed color you
      },
      symbols = {added = '+', modified = '~', removed = '-'}, -- Changes the symbols used by the diff.
      source = nil, -- A function that works as a data source for diff.
                    -- It must return a table as such:
                    --   { added = add_count, modified = modified_count, removed = removed_count }
                    -- or nil on failure. count <= 0 won't be displayed.
    }
  }
}
```

#### fileformat component options

```lua
sections = {
  lualine_a = {
    {
      'fileformat',
      symbols = {
        unix = '', -- e712
        dos = '',  -- e70f
        mac = '',  -- e711
      }
    }
  }
}
```

#### filename component options

```lua
sections = {
  lualine_a = {
    {
      'filename',
      file_status = true,      -- Displays file status (readonly status, modified status)
      newfile_status = false,  -- Display new file status (new file means no write after created)
      path = 0,                -- 0: Just the filename
                               -- 1: Relative path
                               -- 2: Absolute path
                               -- 3: Absolute path, with tilde as the home directory
                               -- 4: Filename and parent dir, with tilde as the home directory

      shorting_target = 40,    -- Shortens path to leave 40 spaces in the window
                               -- for other components. (terrible name, any suggestions?)
                               -- It can also be a function that returns
                               -- the value of `shorting_target` dynamically.
      symbols = {
        modified = '[+]',      -- Text to show when the file is modified.
        readonly = '[-]',      -- Text to show when the file is non-modifiable or readonly.
        unnamed = '[No Name]', -- Text to show for unnamed buffers.
        newfile = '[New]',     -- Text to show for newly created file before first write
      }
    }
  }
}
```

#### filetype component options

```lua
sections = {
  lualine_a = {
    {
      'filetype',
      colored = true,   -- Displays filetype icon in color if set to true
      icon_only = false, -- Display only an icon for filetype
      icon = { align = 'right' }, -- Display filetype icon on the right hand side
      -- icon =    {'X', align='right'}
      -- Icon string ^ in table is ignored in filetype component
    }
  }
}
```

#### encoding component options

```lua
sections = {
  lualine_a = {
    {
      'encoding',
      -- Show '[BOM]' when the file has a byte-order mark
        show_bomb = false,
    }
  }
}
```

#### searchcount component options

```lua
sections = {
  lualine_a = {
    {
      'searchcount',
      maxcount = 999,
      timeout = 500,
    }
  }
}
```

#### tabs component options

```lua
sections = {
  lualine_a = {
    {
      'tabs',
      tab_max_length = 40,  -- Maximum width of each tab. The content will be shorten dynamically (example: apple/orange -> a/orange)
      max_length = vim.o.columns / 3, -- Maximum width of tabs component.
                                      -- Note:
                                      -- It can also be a function that returns
                                      -- the value of `max_length` dynamically.
      mode = 0, -- 0: Shows tab_nr
                -- 1: Shows tab_name
                -- 2: Shows tab_nr + tab_name

      path = 0, -- 0: just shows the filename
                -- 1: shows the relative path and shorten $HOME to ~
                -- 2: shows the full path
                -- 3: shows the full path and shorten $HOME to ~

      -- Automatically updates active tab color to match color of other components (will be overidden if buffers_color is set)
      use_mode_colors = false,

      tabs_color = {
        -- Same values as the general color option can be used here.
        active = 'lualine_{section}_normal',     -- Color for active tab.
        inactive = 'lualine_{section}_inactive', -- Color for inactive tab.
      },

      show_modified_status = true,  -- Shows a symbol next to the tab name if the file has been modified.
      symbols = {
        modified = '[+]',  -- Text to show when the file is modified.
      },

      fmt = function(name, context)
        -- Show + if buffer is modified in tab
        local buflist = vim.fn.tabpagebuflist(context.tabnr)
        local winnr = vim.fn.tabpagewinnr(context.tabnr)
        local bufnr = buflist[winnr]
        local mod = vim.fn.getbufvar(bufnr, '&mod')

        return name .. (mod == 1 and ' +' or '')
      end
    }
  }
}
```

#### windows component options

```lua
sections = {
  lualine_a = {
    {
      'windows',
      show_filename_only = true,   -- Shows shortened relative path when set to false.
      show_modified_status = true, -- Shows indicator when the window is modified.

      mode = 0, -- 0: Shows window name
                -- 1: Shows window index
                -- 2: Shows window name + window index

      max_length = vim.o.columns * 2 / 3, -- Maximum width of windows component,
                                          -- it can also be a function that returns
                                          -- the value of `max_length` dynamically.
      filetype_names = {
        TelescopePrompt = 'Telescope',
        dashboard = 'Dashboard',
        packer = 'Packer',
        fzf = 'FZF',
        alpha = 'Alpha'
      }, -- Shows specific window name for that filetype ( { `filetype` = `window_name`, ... } )

      disabled_buftypes = { 'quickfix', 'prompt' }, -- Hide a window if its buffer's type is disabled

      -- Automatically updates active window color to match color of other components (will be overidden if buffers_color is set)
      use_mode_colors = false,

      windows_color = {
        -- Same values as the general color option can be used here.
        active = 'lualine_{section}_normal',     -- Color for active window.
        inactive = 'lualine_{section}_inactive', -- Color for inactive window.
      },
    }
  }
}
```

#### lsp status component options

```lua
sections = {
  lualine_a = {
    {
      'lsp_status',
      icon = '', -- f013
      symbols = {
        -- Standard unicode symbols to cycle through for LSP progress:
        spinner = { '⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏' },
        -- Standard unicode symbol for when LSP is done:
        done = '✓',
        -- Delimiter inserted between LSP names:
        separator = ' ',
      },
      -- List of LSP names to ignore (e.g., `null-ls`):
      ignore_lsp = {},
      -- Display the LSP name
      show_name = true,
    }
  }
}
```

---

### Tabline

You can use lualine to display components in tabline.
The configuration for tabline sections is exactly the same as that of the statusline.

```lua
tabline = {
  lualine_a = {},
  lualine_b = {'branch'},
  lualine_c = {'filename'},
  lualine_x = {},
  lualine_y = {},
  lualine_z = {}
}
```

This will show the branch and filename components on top of neovim inside tabline.

lualine also provides 2 components, buffers and tabs, that you can use to get a more traditional tabline/bufferline.

```lua
tabline = {
  lualine_a = {'buffers'},
  lualine_b = {'branch'},
  lualine_c = {'filename'},
  lualine_x = {},
  lualine_y = {},
  lualine_z = {'tabs'}
}
```

### Winbar

From neovim-0.8 you can customize your winbar with lualine.
Winbar configuration is similar to statusline.

```lua
winbar = {
  lualine_a = {},
  lualine_b = {},
  lualine_c = {'filename'},
  lualine_x = {},
  lualine_y = {},
  lualine_z = {}
}

inactive_winbar = {
  lualine_a = {},
  lualine_b = {},
  lualine_c = {'filename'},
  lualine_x = {},
  lualine_y = {},
  lualine_z = {}
}
```

Just like statusline you can separately specify winbar for active and inactive
windows. Any lualine component can be placed in winbar. All kinds of custom
components supported in statusline are also supported for winbar too. In general
You can treat winbar as another lualine statusline that just appears on top
of windows instead of at bottom.

#### Buffers

Shows currently open buffers. Like bufferline . See
[buffers options](#buffers-component-options)
for all builtin behaviors of buffers component.
You can use `:LualineBuffersJump` to jump to buffer based on index
of buffer in buffers component.
Jumping to non-existent buffer indices generates an error. To avoid these errors
`LualineBuffersJump` provides `<bang>` support, meaning that you can call
`:LualineBufferJump!` to ignore these errors.

```vim
  :LualineBuffersJump 2  " Jumps to 2nd buffer in buffers component.
  :LualineBuffersJump $  " Jumps to last buffer in buffers component.
  :LualineBuffersJump! 3  " Attempts to jump to 3rd buffer, if it exists.
```

#### Tabs

Shows currently open tab. Like usual tabline. See
[tabs options](#tabs-component-options)
for all builtin behaviors of tabs component.
You can also use `:LualineRenameTab` to set a name for a tabpage.
For example:

```vim
:LualineRenameTab Project_K
```

It's useful when you're using rendering mode 2/3 in tabs.
To unname a tabpage run `:LualineRenameTab` without argument.

#### Tabline as statusline

You can also completely move your statusline to a tabline by configuring
`lualine.tabline` and disabling `lualine.sections` and `lualine.inactive_sections`:

```lua
tabline = {
......
  },
sections = {},
inactive_sections = {},
```

If you want a more sophisticated tabline you can use other
tabline plugins with lualine too, for example:

- [nvim-bufferline](https://github.com/akinsho/nvim-bufferline.lua)
- [tabline.nvim](https://github.com/kdheepak/tabline.nvim)

tabline.nvim even uses lualine's theme by default 🙌
You can find a bigger list [here](https://github.com/rockerBOO/awesome-neovim#tabline).

---

### Extensions

lualine extensions change statusline appearance for a window/buffer with
specified filetypes.

By default no extensions are loaded to improve performance.
You can load extensions with:

```lua
extensions = {'quickfix'}
```

#### Available extensions

- aerial
- assistant
- avante
- chadtree
- ctrlspace
- fern
- fugitive
- fzf
- lazy
- man
- mason
- mundo
- neo-tree
- nerdtree
- nvim-dap-ui
- nvim-tree
- oil
- overseer
- quickfix
- symbols-outline
- toggleterm
- trouble

#### Custom extensions

You can define your own extensions. If you believe an extension may be useful to others, then please submit a PR.

```lua
local my_extension = { sections = { lualine_a = {'mode'} }, filetypes = {'lua'} }
require('lualine').setup { extensions = { my_extension } }
```

---

### Refreshing lualine

By default lualine refreshes itself based on timer and some events. You can set
the interval of the timer with refresh option. However you can also force
lualine to refresh at any time by calling `lualine.refresh` function.

```lua
require('lualine').refresh({
  scope = 'tabpage',  -- scope of refresh all/tabpage/window
  place = { 'statusline', 'winbar', 'tabline' },  -- lualine segment ro refresh.
})
```

The arguments shown here are default values. So not passing any of them will be
treated as if a default value was passed.

So you can simply do

```lua
require('lualine').refresh()
```

Also, note by default when you call refresh a refresh event is queued in lualine.
It desn't refresh event immidiately. It'll refresh on next refresh check pass.
By default this time is set to 16ms to match 60fps. This duration can be configured
with `options.refresh.refresh_time` option. If you want to bypass the refresh queue
and want lualine to process the refresh immmidiately call refresh with `force=true`
parameter set like this.
```lua
require('lualine').refresh({
  force = true,       -- do an immidiate refresh
  scope = 'tabpage',  -- scope of refresh all/tabpage/window
  place = { 'statusline', 'winbar', 'tabline' },  -- lualine segment ro refresh.
})
```
Practically, speaking this is almost never needed. Also you should avoid calling
`lualine.refresh` with `force` inside components. Since components are
evaluated during refresh, calling refresh while refreshing can have undesirable
effects.


### Disabling lualine

You can disable lualine for specific filetypes:

```lua
options = { disabled_filetypes = {'lua'} }
```

You can also disable lualine completely.
Note that you need to call this after the setup

```lua
  require('lualine').hide({
    place = {'statusline', 'tabline', 'winbar'}, -- The segment this change applies to.
    unhide = false,  -- whether to re-enable lualine again/
  })
```

The arguments show for hide above are default values.
Which means even if the hide function is called without
arguments it'll work as if these were passed.

So in short to disable lualine completely you can do

```lua
require('lualine').hide()
```

To enable it again you can do

```lua
require('lualine').hide({unhide=true})
```

<!-- panvimdoc-ignore-start -->

### Contributors

Thanks to these wonderful people, we enjoy this awesome plugin.

<a href="https://github.com/nvim-lualine/lualine.nvim/graphs/contributors">
  <img src="https://contrib.rocks/image?repo=nvim-lualine/lualine.nvim" />
</a>

<!-- panvimdoc-ignore-end -->

### Wiki

Check out the [wiki](https://github.com/nvim-lualine/lualine.nvim/wiki) for more info.

You can find some useful [configuration snippets](https://github.com/nvim-lualine/lualine.nvim/wiki/Component-snippets) here. You can also share your awesome snippets with others.

If you want to extend lualine with plugins or want to know
which ones already do, [wiki/plugins](https://github.com/nvim-lualine/lualine.nvim/wiki/Plugins) is for you.


================================================
FILE: THEMES.md
================================================
# Available themes

All available themes are only best effort ports by myself/ other users. If you find a theme to be weird/ wrong please open an issue/ pr.

### auto

auto is a special theme. It will automatically load theme for your colorscheme.
If there's no theme available for your colorscheme then
it'll try it's best to generate one.

### 16color

<p>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648240-02d2ae00-74bb-11eb-9ac1-495849621366.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648219-f77f8280-74ba-11eb-84e4-978bf918c21f.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648263-141bba80-74bb-11eb-84e0-ff48ae6f927a.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648270-1a119b80-74bb-11eb-8fff-00984243846f.png'/>
</p>

### ayu_dark

<p>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648314-357ca680-74bb-11eb-83de-ec94c3a75d99.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648329-3e6d7800-74bb-11eb-901b-41e1f01315f0.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648342-44fbef80-74bb-11eb-8262-a6f615e5fcfb.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648367-52b17500-74bb-11eb-8ec5-dbb59db60d98.png'/>
</p>

### ayu_light

<p>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648508-b5a30c00-74bb-11eb-80f7-0bce969d35ea.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648511-b89dfc80-74bb-11eb-9868-f63d7752fe83.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648514-bb98ed00-74bb-11eb-87f4-6b24de56f86c.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648518-bd62b080-74bb-11eb-8cbe-869ed12d16dc.png'/>
</p>

### ayu_mirage

<p>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648535-c6538200-74bb-11eb-815b-53f4b3274602.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648537-c784af00-74bb-11eb-8da5-d91bfc61a967.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648539-ca7f9f80-74bb-11eb-840a-5e0d9ba98bb8.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648541-cbb0cc80-74bb-11eb-843f-19c4c58b1d91.png'/>
</p>

### ayu

It's a combination of ayu_light, ayu_dark & ayu_mirage. If `g:ayucolor` exists,
it loads one of these based on your `g:ayucolor` option. Otherwise, it will
load ayu_light when background=light and ayu_dark when background=dark
But if `g:ayuprefermirage` exists, it will load ayu_mirage instead when
`background=dark`.

### base16

This theme will automatically use colors defined by your colorscheme using [tinted-theming/tinted-vim](https://github.com/tinted-theming/tinted-vim) or [RRethy/nvim-base16](https://github.com/RRethy/nvim-base16)] plugin.
The following example is using the `tomorrow-night` colorscheme:

<p>
<img width='700' src='https://user-images.githubusercontent.com/11501572/156889654-3dedc9a1-e7a5-4cbe-b219-2a97499cf1d2.png'/>
<img width='700' src='https://user-images.githubusercontent.com/11501572/156889648-93bf3ce8-064d-4ac0-8415-20d6ef87c60b.png'/>
<img width='700' src='https://user-images.githubusercontent.com/11501572/156889624-c97fc3ae-d642-41ba-b39a-f9a72ff8b15e.png'/>
<img width='700' src='https://user-images.githubusercontent.com/11501572/156889566-17066e95-7f85-4bfd-8178-c4a34beab453.png'/>
</p>

### codedark

<p>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648568-dff4c980-74bb-11eb-9d16-b68ac68f2ab2.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648569-e125f680-74bb-11eb-8782-db9a6c2a3153.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648578-e6834100-74bb-11eb-819c-fb66d7d5118c.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648582-e8e59b00-74bb-11eb-9239-edcc8e9c2c18.png'/>
</p>

### dracula

<p>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648594-f0a53f80-74bb-11eb-9018-9ee12260750e.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648600-f26f0300-74bb-11eb-82a4-f732b3e7eeff.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648606-f4d15d00-74bb-11eb-8327-a35e97533617.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648619-fe5ac500-74bb-11eb-8952-cc5c81fd0b2b.png'/>
</p>

### everforest

<p>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648663-1cc0c080-74bc-11eb-8cc1-36266a0385e3.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648667-1df1ed80-74bc-11eb-9ef8-dfd2e8401f0c.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648671-21857480-74bc-11eb-996e-a5cf212e98bd.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648675-22b6a180-74bc-11eb-9b8e-45e64a03e062.png'/>
</p>

### gruvbox_dark

<p>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648685-2b0edc80-74bc-11eb-9ec9-9aac3677df43.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648693-2ea26380-74bc-11eb-831a-9ebbe4f3dd83.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648700-319d5400-74bc-11eb-90fa-72eccbda8242.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648716-382bcb80-74bc-11eb-824a-aaca67035073.png'/>
</p>

### gruvbox_light

<p>
<img width='700' src='https://user-images.githubusercontent.com/34294427/118757012-5d9b5c00-b896-11eb-8e4f-c0c28f774cf6.png'/>
<img width='700' src='https://user-images.githubusercontent.com/34294427/118757009-5bd19880-b896-11eb-9846-d02b16653ab0.png'/>
<img width='700' src='https://user-images.githubusercontent.com/34294427/118757023-612ee300-b896-11eb-8673-a39a0fbce619.png'/>
<img width='700' src='https://user-images.githubusercontent.com/34294427/118757020-5ffdb600-b896-11eb-95e7-dbf1f08e063d.png'/>
</p>

### gruvbox

It's a combination of gruvbox_light and gruvbox_dark. It loads either of
them based you your `background` option.

### gruvbox-material

<p>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648725-3f52d980-74bc-11eb-8fa5-a77b0a21cdea.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648728-41b53380-74bc-11eb-99cf-001eab6cc51b.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648742-4a0d6e80-74bc-11eb-9685-8e0cba1eb3c3.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648744-4d085f00-74bc-11eb-8aaa-05a7ca46adec.png'/>
</p>

### horizon

<p>
<img width='700' src='https://user-images.githubusercontent.com/69089176/118903813-70527700-b910-11eb-9d45-1785790ce8e8.png'/>
<img width='700' src='https://user-images.githubusercontent.com/69089176/118902058-bc9bb800-b90c-11eb-99b8-3b98cbdd01d7.png'/>
<img width='700' src='https://user-images.githubusercontent.com/69089176/118903506-dab6e780-b90f-11eb-85db-c6227a8caf0c.png'/>
<img width='700' src='https://user-images.githubusercontent.com/69089176/118902070-c2919900-b90c-11eb-9296-145a99ce52ce.png'/>
</p>

### iceberg_dark

<p>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648796-614c5c00-74bc-11eb-8398-cde120ec7746.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648813-64474c80-74bc-11eb-986b-432498dd6245.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648822-66a9a680-74bc-11eb-8b2b-416cd359c30d.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648829-6ad5c400-74bc-11eb-9af4-670968934931.png'/>
</p>

### iceberg_light

<p>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648848-71fcd200-74bc-11eb-8910-e12ae9ce619f.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648849-73c69580-74bc-11eb-93f9-d6f75a2bdd97.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648851-7628ef80-74bc-11eb-8a4b-c7f44c89ac93.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648862-7aeda380-74bc-11eb-808c-1b12dde45f3d.png'/>
</p>

### iceberg

It's a combination of iceberg_light and iceberg_dark. It loads either of
them based you your `background` option.

### jellybeans

<p>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648882-82ad4800-74bc-11eb-91e8-4d38fcdec134.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648883-850fa200-74bc-11eb-8d9b-54116accd2f8.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648900-8d67dd00-74bc-11eb-9600-13cd48fa2bde.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648902-8f31a080-74bc-11eb-9d8e-37a3f41d4c7a.png'/>
</p>

### material

<p>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648925-9e185300-74bc-11eb-9263-842fe2d56ba8.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648927-9f498000-74bc-11eb-8a15-4ba68403037a.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648930-a1134380-74bc-11eb-8a24-f203bf05cfb3.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648935-a2dd0700-74bc-11eb-9a4b-72eb1e2ab79e.png'/>
</p>

### modus-vivendi

<p>
<img width='700' src='https://user-images.githubusercontent.com/9327361/114389966-58176b80-9b9e-11eb-944e-1e0079527d74.png'/>
<img width='700' src='https://user-images.githubusercontent.com/9327361/114390000-606fa680-9b9e-11eb-97dd-ef5bbc23049a.png'/>
<img width='700' src='https://user-images.githubusercontent.com/9327361/114390024-6796b480-9b9e-11eb-8be2-ca4cc893fbb2.png'/>
<img width='700' src='https://user-images.githubusercontent.com/9327361/114390052-6d8c9580-9b9e-11eb-8dcb-469290a4c655.png'/>
</p>

### molokai

<p>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648944-ab354200-74bc-11eb-85fd-71a40102384b.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648946-acff0580-74bc-11eb-9aae-36a869b855e5.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648953-af615f80-74bc-11eb-8897-f2945fc34c09.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648958-b12b2300-74bc-11eb-8232-550949cbbfb3.png'/>
</p>

### moonfly

<p>
<img width='700' src='https://user-images.githubusercontent.com/11382509/129304429-cd2af22d-3b88-4c17-bf99-99f7608576d4.png'/>
<img width='700' src='https://user-images.githubusercontent.com/11382509/129304441-81a6c88e-364c-476a-9050-0ada4cae1e3b.png'/>
<img width='700' src='https://user-images.githubusercontent.com/11382509/129304453-2b18900a-13a9-4476-9977-3875e55aabaf.png'/>
<img width='700' src='https://user-images.githubusercontent.com/11382509/129304469-37fb0168-0484-406b-8b2e-d309232612ab.png'/>
</p>

### nightfly

<p>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648974-b9835e00-74bc-11eb-9c52-c5187aa3ff2c.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648977-bab48b00-74bc-11eb-96b3-7f51fc73d8e8.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648980-bc7e4e80-74bc-11eb-9b12-3182a112f968.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108648981-bdaf7b80-74bc-11eb-86d4-6c44c3764a70.png'/>
</p>

### nord

<p>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649007-cbfd9780-74bc-11eb-87be-a9edc714e57a.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649010-cd2ec480-74bc-11eb-9d9b-54fadee2abef.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649019-cef88800-74bc-11eb-97eb-054d78427442.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649021-cf911e80-74bc-11eb-8b4a-9f9eb61c7973.png'/>
</p>

### OceanicNext

<p>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649039-d7e95980-74bc-11eb-9a33-df413936c645.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649043-d91a8680-74bc-11eb-9b1b-9c2e88ede3aa.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649052-db7ce080-74bc-11eb-8d9b-05c4c21a7e53.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649056-dcae0d80-74bc-11eb-91a0-ee0d98f3525d.png'/>
</p>

### onedark

<p>
<img width='700' src='https://user-images.githubusercontent.com/8293386/150810955-ef6bf575-4a96-439c-a708-37dd25c63a47.png'/>
<img width='700' src='https://user-images.githubusercontent.com/8293386/150811104-31fbc04c-1500-4779-a079-98bd1e56701d.png'/>
<img width='700' src='https://user-images.githubusercontent.com/8293386/150811324-d1169232-a7b6-4f79-a104-031ea7972a32.png'/>
<img width='700' src='https://user-images.githubusercontent.com/8293386/150811517-f90a406d-a4b9-4bd5-913c-ec1ae547c400.png'/>
</p>

### onelight

<p>
<img width='700' src='https://user-images.githubusercontent.com/8293386/150809518-b596f9bc-c351-4e71-9dec-e1856efaff8a.png'/>
<img width='700' src='https://user-images.githubusercontent.com/8293386/150809979-237c6414-4278-447d-a00f-0a32e2770195.png'/>
<img width='700' src='https://user-images.githubusercontent.com/8293386/150810292-afeecfce-3b53-468d-aed9-1bb5ea9ed46f.png'/>
<img width='700' src='https://user-images.githubusercontent.com/8293386/150810514-81024b2c-3b80-466f-85ce-914e191bb4f9.png'/>
</p>

### palenight

<p>
<img width='700' src='https://user-images.githubusercontent.com/7190144/109406548-3e1d2300-797a-11eb-8fdb-c3882ae08625.png'/>
<img width='700' src='https://user-images.githubusercontent.com/7190144/109406547-3e1d2300-797a-11eb-9b72-43ba7145355d.png'/>
<img width='700' src='https://user-images.githubusercontent.com/7190144/109406545-3cebf600-797a-11eb-8e2e-992e98d8120e.png'/>
<img width='700' src='https://user-images.githubusercontent.com/7190144/109406546-3d848c80-797a-11eb-9069-04caf383275d.png'/>
</p>

### papercolor_dark

<p>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649104-fd766300-74bc-11eb-8c5c-40e7191a81f7.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649106-fe0ef980-74bc-11eb-93f7-f98e0b89d5c9.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649108-ff402680-74bc-11eb-93da-bb96d51c39f0.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649112-00715380-74bd-11eb-8125-2c108da5123e.png'/>
</p>

### papercolor_light

<p>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649126-07986180-74bd-11eb-9a25-c6ce762d37d2.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649129-08c98e80-74bd-11eb-93d4-5bc109ac9ee9.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649132-0b2be880-74bd-11eb-8ed2-afab3e974b4e.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649137-0cf5ac00-74bd-11eb-8764-765bead5de6e.png'/>
</p>

### PaperColor

It's a combination of papercolor_light and papercolor_dark. It loads either of
them based you your `background` option.

### powerline

<p>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649147-14b55080-74bd-11eb-9670-713185342eb2.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649150-15e67d80-74bd-11eb-8815-194c51d96016.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649155-17b04100-74bd-11eb-8e41-017eb9a837b5.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649158-18e16e00-74bd-11eb-8687-65b0ecbf20d2.png'/>
</p>

### powerline_dark

<p>
<img width='700' src='https://user-images.githubusercontent.com/59497618/131224416-851aedd4-27bb-47fd-a9a6-5332aa42ce60.png'/>
<img width='700' src='https://user-images.githubusercontent.com/59497618/131224418-7bec491b-1183-4ec7-8089-3dbe460cc1e4.png'/>
<img width='700' src='https://user-images.githubusercontent.com/59497618/131224419-adab4f88-aaf8-449e-9988-ae002333d131.png'/>
<img width='700' src='https://user-images.githubusercontent.com/59497618/131224421-3b175d7a-fb14-424c-ad53-03d2c3b2ab71.png'/>
</p>

### pywal

pywal is another special theme. It will load the colors from your current [pywal](https://github.com/dylanaraps/pywal) cache, specifically `~/.cache/wal/colors.sh` and generate a theme.

#### `wal --theme ashes`

<img width='700' src='https://user-images.githubusercontent.com/36740602/132101614-8aa90169-a1ed-4911-b09f-31b5bae56cbf.png'/>

#### `wal --theme -l github`

<img width='700' src='https://user-images.githubusercontent.com/36740602/132101617-f3ff65eb-8051-4294-9a55-e6caa9605006.png'/>

#### `wal --theme vscode`

<img width='700' src='https://user-images.githubusercontent.com/36740602/132101619-7d04d748-d478-45a2-983a-f2a93f3c5714.png'/>

#### `wal --theme zenburn`

<img width='700' src='https://user-images.githubusercontent.com/36740602/132101621-505e5bb6-d18a-434c-a0f8-a3904a5c71f2.png'/>

### seoul256

<p>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649194-2c8cd480-74bd-11eb-8fbc-935d7e0fe921.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649198-2d256b00-74bd-11eb-9894-7ffdead0297c.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649202-2eef2e80-74bd-11eb-9627-38f834ce4aec.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649205-2f87c500-74bd-11eb-9da6-5253dcff2c82.png'/>
</p>

### solarized_dark

<p>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649216-37476980-74bd-11eb-8f3b-2a7fc368388d.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649217-38789680-74bd-11eb-8337-5e3005c5e261.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649223-3c0c1d80-74bd-11eb-953b-72c614aa9638.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649227-3d3d4a80-74bd-11eb-8251-d7788db36060.png'/>
</p>

### solarized_light

<p>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649246-44645880-74bd-11eb-92c9-120798dc0452.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649251-462e1c00-74bd-11eb-953d-2857296997cc.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649255-475f4900-74bd-11eb-8a75-7ca266d56009.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649258-48907600-74bd-11eb-9bba-8e82b56777d9.png'/>
</p>

### Tomorrow

<p>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649275-51814780-74bd-11eb-881b-1e137a0cbfe0.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649297-59d98280-74bd-11eb-92a5-a8c4af150106.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649317-5e9e3680-74bd-11eb-95a4-fc018cb4a528.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649321-6067fa00-74bd-11eb-83bb-b1de7f5e62d6.png'/>
</p>

### tomorrow_night

<p>
<img width="700" src="https://github.com/user-attachments/assets/1d61f5b8-266b-499e-b071-da8c14c65804"/>
<img width="700" src="https://github.com/user-attachments/assets/7992fef4-4161-4e3a-a964-42bb22f77d08"/>
<img width="700" src="https://github.com/user-attachments/assets/e26fa7a6-9c27-4171-a8e7-067785ab6fee"/>
<img width="700" src="https://github.com/user-attachments/assets/b88b2767-8b93-4be6-a2f8-6528dd43089a"/>
</p>

### wombat

<p>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649337-65c54480-74bd-11eb-9ea1-fab2e679c56b.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649411-8db4a800-74bd-11eb-962a-8b73f9fb7124.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649349-6cec5280-74bd-11eb-9ada-8f1cb8b48ec1.png'/>
<img width='700' src='https://user-images.githubusercontent.com/41551030/108649358-6fe74300-74bd-11eb-9fe2-a955f964e3ce.png'/>
</p>


================================================
FILE: doc/lualine.txt
================================================
*lualine.txt*          fast and easy to configure statusline plugin for neovim

==============================================================================
Table of Contents                                  *lualine-table-of-contents*

1. lualine.nvim                                         |lualine-lualine.nvim|
  - Contributing                                        |lualine-contributing|
  - Performance compared to other plugins|lualine-performance-compared-to-other-plugins|
  - Installation                                        |lualine-installation|
  - Usage and customization                  |lualine-usage-and-customization|

==============================================================================
1. lualine.nvim                                         *lualine-lualine.nvim*

A blazing fast and easy to configure Neovim statusline written in Lua.

`lualine.nvim` requires Neovim >= 0.7.

For previous versions of neovim please use compatability tags for example
compat-nvim-0.5

CONTRIBUTING                                            *lualine-contributing*

Feel free to create an issue/PR if you want to see anything else implemented.
If you have some question or need help with configuration, start a discussion
<https://github.com/nvim-lualine/lualine.nvim/discussions>.

Please read CONTRIBUTING.md <./CONTRIBUTING.md> before opening a PR. You can
also help with documentation in the wiki
<https://github.com/nvim-lualine/lualine.nvim/wiki>.

PERFORMANCE COMPARED TO OTHER PLUGINS*lualine-performance-compared-to-other-plugins*

Unlike other statusline plugins, lualine loads only the components you specify,
and nothing else.

Startup time performance measured with an amazing plugin
dstein64/vim-startuptime <https://github.com/dstein64/vim-startuptime>

Times are measured with a clean `init.vim` with only `vim-startuptime`,
`vim-plug` and given statusline plugin installed. In control just
`vim-startuptime` and`vim-plug` is installed. And measured time is complete
startuptime of vim not time spent on specific plugin. These numbers are the
average of 20 runs.

│control│lualine│lightline│airline│
│17.2 ms│24.8 ms│ 25.5 ms │79.9 ms│


Last Updated On: 18-04-2022

INSTALLATION                                            *lualine-installation*

VIM-PLUG <HTTPS://GITHUB.COM/JUNEGUNN/VIM-PLUG> ~

>
    Plug 'nvim-lualine/lualine.nvim'
    " If you want to have icons in your statusline choose one of these
    Plug 'nvim-tree/nvim-web-devicons'
<


PACKER.NVIM <HTTPS://GITHUB.COM/WBTHOMASON/PACKER.NVIM> ~

>
    use {
      'nvim-lualine/lualine.nvim',
      requires = { 'nvim-tree/nvim-web-devicons', opt = true }
    }
<


LAZY.NVIM <HTTPS://GITHUB.COM/FOLKE/LAZY.NVIM> ~

>
    {
        'nvim-lualine/lualine.nvim',
        dependencies = { 'nvim-tree/nvim-web-devicons' }
    }
<


You’ll also need to have a patched font if you want icons.

USAGE AND CUSTOMIZATION                      *lualine-usage-and-customization*

Lualine has sections as shown below.

>
    +-------------------------------------------------+
    | A | B | C                             X | Y | Z |
    +-------------------------------------------------+
<


Each sections holds its components e.g. Vim’s current mode.

CONFIGURING LUALINE IN INIT.VIM ~

All the examples below are in lua. You can use the same examples in `.vim`
files by wrapping them in lua heredoc like this:

>
    lua << END
    require('lualine').setup()
    END
<


For more information, check out `:help lua-heredoc`.

                                               *lualine-Default-configuration*

>
    require('lualine').setup {
      options = {
        icons_enabled = true,
        theme = 'auto',
        component_separators = { left = '', right = ''},
        section_separators = { left = '', right = ''},
        disabled_filetypes = {
          statusline = {},
          winbar = {},
        },
        ignore_focus = {},
        always_divide_middle = true,
        always_show_tabline = true,
        globalstatus = false,
        refresh = {
          statusline = 1000,
          tabline = 1000,
          winbar = 1000,
          refresh_time = 16, -- ~60fps
          events = {
            'WinEnter',
            'BufEnter',
            'BufWritePost',
            'SessionLoadPost',
            'FileChangedShellPost',
            'VimResized',
            'Filetype',
            'CursorMoved',
            'CursorMovedI',
            'ModeChanged',
          },
        }
      },
      sections = {
        lualine_a = {'mode'},
        lualine_b = {'branch', 'diff', 'diagnostics'},
        lualine_c = {'filename'},
        lualine_x = {'encoding', 'fileformat', 'filetype'},
        lualine_y = {'progress'},
        lualine_z = {'location'}
      },
      inactive_sections = {
        lualine_a = {},
        lualine_b = {},
        lualine_c = {'filename'},
        lualine_x = {'location'},
        lualine_y = {},
        lualine_z = {}
      },
      tabline = {},
      winbar = {},
      inactive_winbar = {},
      extensions = {}
    }
<


Default configuration                  If you want to get your current lualine
                                       config, you can do so with:


>
    require('lualine').get_config()
<


------------------------------------------------------------------------------

STARTING LUALINE ~

>
    require('lualine').setup()
<


------------------------------------------------------------------------------

SETTING A THEME ~

>
    options = { theme = 'gruvbox' }
<


All available themes are listed in THEMES.md <./THEMES.md>.

Please create a PR if you managed to port a popular theme before us, here is
how to do it <./CONTRIBUTING.md>.

                                                  *lualine-Customizing-themes*

>
    local custom_gruvbox = require'lualine.themes.gruvbox'
    
    -- Change the background of lualine_c section for normal mode
    custom_gruvbox.normal.c.bg = '#112233'
    
    require('lualine').setup {
      options = { theme  = custom_gruvbox },
      ...
    }
<


Customizing themes                     Theme structure is available here
                                       <https://github.com/nvim-lualine/lualine.nvim/wiki/Writing-a-theme>.


------------------------------------------------------------------------------

SEPARATORS ~

lualine defines two kinds of separators:


- `section_separators` - separators between sections
- `component_separators` - separators between the different components in sections


**Note**: if viewing this README in a browser, chances are the characters below
will not be visible.

>
    options = {
      section_separators = { left = '', right = '' },
      component_separators = { left = '', right = '' }
    }
<


Here, left refers to the left-most sections (a, b, c), and right refers to the
right-most sections (x, y, z).

                                                *lualine-Disabling-separators*

>
    options = { section_separators = '', component_separators = '' }
<


------------------------------------------------------------------------------

CHANGING COMPONENTS IN LUALINE SECTIONS ~

>
    sections = {lualine_a = {'mode'}}
<


                                                *lualine-Available-components*


- `branch` (git branch)
- `buffers` (shows currently available buffers)
- `diagnostics` (diagnostics count from your preferred source)
- `diff` (git diff status)
- `encoding` (file encoding)
- `fileformat` (file format)
- `filename`
- `filesize`
- `filetype`
- `hostname`
- `location` (location in file in line:column format)
- `mode` (vim mode)
- `progress` (%progress in file)
- `searchcount` (number of search matches when hlsearch is active)
- `selectioncount` (number of selected characters or lines)
- `tabs` (shows currently available tabs)
- `windows` (shows currently available windows)
- `lsp_status` (shows active LSPs in the current buffer and a progress spinner)


                                                   *lualine-Custom-components*

LUA FUNCTIONS AS LUALINE COMPONENT

>
    local function hello()
      return [[hello world]]
    end
    sections = { lualine_a = { hello } }
<


VIM FUNCTIONS AS LUALINE COMPONENT

>
    sections = { lualine_a = {'FugitiveHead'} }
<


VIM’S STATUSLINE ITEMS AS LUALINE COMPONENT

>
    sections = { lualine_c = {'%=', '%t%m', '%3p'} }
<


VIM VARIABLES AS LUALINE COMPONENT

Variables from `g:`, `v:`, `t:`, `w:`, `b:`, `o:`, `to:`, `wo:`, `bo:` scopes
can be used.

See `:h lua-vim-variables` and `:h lua-vim-options` if you are not sure what to
use.

>
    sections = { lualine_a = { 'g:coc_status', 'bo:filetype' } }
<


LUA EXPRESSIONS AS LUALINE COMPONENT

You can use any valid lua expression as a component including:


- oneliners
- global variables
- require statements


>
    sections = { lualine_c = { "os.date('%a')", 'data', "require'lsp-status'.status()" } }
<


`data` is a global variable in this example.

------------------------------------------------------------------------------

COMPONENT OPTIONS ~

Component options can change the way a component behave. There are two kinds of
options:


- global options affecting all components
- local options affecting specific


Global options can be used as local options (can be applied to specific
components) but you cannot use local options as global. Global option used
locally overwrites the global, for example:

>
        require('lualine').setup {
          options = { fmt = string.lower },
          sections = { lualine_a = {
            { 'mode', fmt = function(str) return str:sub(1,1) end } },
                      lualine_b = {'branch'} }
        }
<


`mode` will be formatted with the passed function so only first char will be
shown. On the other hand branch will be formatted with global formatter
`string.lower` so it will be showed in lower case.

                                                   *lualine-Available-options*

                                                      *lualine-Global-options*

Global options                         These are `options` that are used in
                                       options table. They set behavior of
                                       lualine.


Values set here are treated as default for other options that work in component
level.

For example even though `icons_enabled` is a general component option. You can
set `icons_enabled` to `false` and icons will be disabled on all component. You
can still overwrite defaults set in option table by specifying the option value
in component.

>
    options = {
      theme = 'auto', -- lualine theme
      component_separators = { left = '', right = '' },
      section_separators = { left = '', right = '' },
      disabled_filetypes = {     -- Filetypes to disable lualine for.
          statusline = {},       -- only ignores the ft for statusline.
          winbar = {},           -- only ignores the ft for winbar.
      },
    
      ignore_focus = {},         -- If current filetype is in this list it'll
                                 -- always be drawn as inactive statusline
                                 -- and the last window will be drawn as active statusline.
                                 -- for example if you don't want statusline of
                                 -- your file tree / sidebar window to have active
                                 -- statusline you can add their filetypes here.
                                 --
                                 -- Can also be set to a function that takes the
                                 -- currently focused window as its only argument
                                 -- and returns a boolean representing whether the
                                 -- window's statusline should be drawn as inactive.
    
      always_divide_middle = true, -- When set to true, left sections i.e. 'a','b' and 'c'
                                   -- can't take over the entire statusline even
                                   -- if neither of 'x', 'y' or 'z' are present.
    
      always_show_tabline = true -- When set to true, if you have configured lualine for displaying tabline
                              -- then tabline will always show. If set to false, then tabline will be displayed
                              -- only when there are more than 1 tab. (see :h showtabline)
    
      globalstatus = false,        -- enable global statusline (have a single statusline
                                   -- at bottom of neovim instead of one for  every window).
                                   -- This feature is only available in neovim 0.7 and higher.
    
      refresh = {                  -- sets how often lualine should refresh it's contents (in ms)
        statusline = 100,         -- The refresh option sets minimum time that lualine tries
        tabline = 100,            -- to maintain between refresh. It's not guarantied if situation
        winbar = 100              -- arises that lualine needs to refresh itself before this time
                                  -- it'll do it.
        refresh_time = 16,        -- ~60fps the time after which refresh queue is processed. Mininum refreshtime for lualine
        events = {                -- The auto command events at which lualine refreshes
          'WinEnter',
          'BufEnter',
          'BufWritePost',
          'SessionLoadPost',
          'FileChangedShellPost',
          'VimResized',
          'Filetype',
          'CursorMoved',
          'CursorMovedI',
          'ModeChanged',
        },
                                   -- Also you can force lualine's refresh by calling refresh function
                                   -- like require('lualine').refresh()
      }
    }
<


                                           *lualine-General-component-options*

General component options              These are options that control behavior
                                       at component level and are available for
                                       all components.


>
    sections = {
      lualine_a = {
        {
          'mode',
          icons_enabled = true, -- Enables the display of icons alongside the component.
          -- Defines the icon to be displayed in front of the component.
          -- Can be string|table
          -- As table it must contain the icon as first entry and can use
          -- color option to custom color the icon. Example:
          -- {'branch', icon = ''} / {'branch', icon = {'', color={fg='green'}}}
    
          -- icon position can also be set to the right side from table. Example:
          -- {'branch', icon = {'', align='right', color={fg='green'}}}
          icon = nil,
    
          separator = nil,      -- Determines what separator to use for the component.
                                -- Note:
                                --  When a string is provided it's treated as component_separator.
                                --  When a table is provided it's treated as section_separator.
                                --  Passing an empty string disables the separator.
                                --
                                -- These options can be used to set colored separators
                                -- around a component.
                                --
                                -- The options need to be set as such:
                                --   separator = { left = '', right = ''}
                                --
                                -- Where left will be placed on left side of component,
                                -- and right will be placed on its right.
                                --
    
          cond = nil,           -- Condition function, the component is loaded when the function returns `true`.
    
          draw_empty = false,   -- Whether to draw component even if it's empty.
                                -- Might be useful if you want just the separator.
    
          -- Defines a custom color for the component:
          --
          -- 'highlight_group_name' | { fg = '#rrggbb'|cterm_value(0-255)|'color_name(red)', bg= '#rrggbb', gui='style' } | function
          -- Note:
          --  '|' is synonymous with 'or', meaning a different acceptable format for that placeholder.
          -- color function has to return one of other color types ('highlight_group_name' | { fg = '#rrggbb'|cterm_value(0-255)|'color_name(red)', bg= '#rrggbb', gui='style' })
          -- color functions can be used to have different colors based on state as shown below.
          --
          -- Examples:
          --   color = { fg = '#ffaa88', bg = 'grey', gui='italic,bold' },
          --   color = { fg = 204 }   -- When fg/bg are omitted, they default to the your theme's fg/bg.
          --   color = 'WarningMsg'   -- Highlight groups can also be used.
          --   color = function(section)
          --      return { fg = vim.bo.modified and '#aa3355' or '#33aa88' }
          --   end,
          color = nil, -- The default is your theme's color for that section and mode.
    
          -- Specify what type a component is, if omitted, lualine will guess it for you.
          --
          -- Available types are:
          --   [format: type_name(example)], mod(branch/filename),
          --   stl(%f/%m), var(g:coc_status/bo:modifiable),
          --   lua_expr(lua expressions), vim_fun(viml function name)
          --
          -- Note:
          -- lua_expr is short for lua-expression and vim_fun is short for vim-function.
          type = nil,
    
          padding = 1, -- Adds padding to the left and right of components.
                       -- Padding can be specified to left or right independently, e.g.:
                       --   padding = { left = left_padding, right = right_padding }
    
          fmt = nil,   -- Format function, formats the component's output.
                       -- This function receives two arguments:
                       -- - string that is going to be displayed and
                       --   that can be changed, enhanced and etc.
                       -- - context object with information you might
                       --   need. E.g. tabnr if used with tabs.
          on_click = nil, -- takes a function that is called when component is clicked with mouse.
                       -- the function receives several arguments
                       -- - number of clicks in case of multiple clicks
                       -- - mouse button used (l(left)/r(right)/m(middle)/...)
                       -- - modifiers pressed (s(shift)/c(ctrl)/a(alt)/m(meta)...)
        }
      }
    }
<


                                          *lualine-Component-specific-options*

Component specific options             These are options that are available on
                                       specific components. For example, you
                                       have option on `diagnostics` component
                                       to specify what your diagnostic sources
                                       will be.


                                           *lualine-buffers-component-options*

>
    sections = {
      lualine_a = {
        {
          'buffers',
          show_filename_only = true,   -- Shows shortened relative path when set to false.
          hide_filename_extension = false,   -- Hide filename extension when set to true.
          show_modified_status = true, -- Shows indicator when the buffer is modified.
    
          mode = 0, -- 0: Shows buffer name
                    -- 1: Shows buffer index
                    -- 2: Shows buffer name + buffer index
                    -- 3: Shows buffer number
                    -- 4: Shows buffer name + buffer number
    
          max_length = vim.o.columns * 2 / 3, -- Maximum width of buffers component,
                                              -- it can also be a function that returns
                                              -- the value of `max_length` dynamically.
          filetype_names = {
            TelescopePrompt = 'Telescope',
            dashboard = 'Dashboard',
            packer = 'Packer',
            fzf = 'FZF',
            alpha = 'Alpha'
          }, -- Shows specific buffer name for that filetype ( { `filetype` = `buffer_name`, ... } )
    
          -- Automatically updates active buffer color to match color of other components (will be overidden if buffers_color is set)
          use_mode_colors = false,
    
          buffers_color = {
            -- Same values as the general color option can be used here.
            active = 'lualine_{section}_normal',     -- Color for active buffer.
            inactive = 'lualine_{section}_inactive', -- Color for inactive buffer.
          },
    
          symbols = {
            modified = ' ●',      -- Text to show when the buffer is modified
            alternate_file = '#', -- Text to show to identify the alternate file
            directory =  '',     -- Text to show when the buffer is a directory
          },
        }
      }
    }
<


                                          *lualine-datetime-component-options*

>
    sections = {
      lualine_a = {
        {
          'datetime',
          -- options: default, us, uk, iso, or your own format string ("%H:%M", etc..)
          style = 'default'
        }
      }
    }
<


                                       *lualine-diagnostics-component-options*

>
    sections = {
      lualine_a = {
        {
          'diagnostics',
    
          -- Table of diagnostic sources, available sources are:
          --   'nvim_lsp', 'nvim_diagnostic', 'nvim_workspace_diagnostic', 'coc', 'ale', 'vim_lsp'.
          -- or a function that returns a table as such:
          --   { error=error_cnt, warn=warn_cnt, info=info_cnt, hint=hint_cnt }
          sources = { 'nvim_diagnostic', 'coc' },
    
          -- Displays diagnostics for the defined severity types
          sections = { 'error', 'warn', 'info', 'hint' },
    
          diagnostics_color = {
            -- Same values as the general color option can be used here.
            error = 'DiagnosticError', -- Changes diagnostics' error color.
            warn  = 'DiagnosticWarn',  -- Changes diagnostics' warn color.
            info  = 'DiagnosticInfo',  -- Changes diagnostics' info color.
            hint  = 'DiagnosticHint',  -- Changes diagnostics' hint color.
          },
          symbols = {error = 'E', warn = 'W', info = 'I', hint = 'H'},
          colored = true,           -- Displays diagnostics status in color if set to true.
          update_in_insert = false, -- Update diagnostics in insert mode.
          always_visible = false,   -- Show diagnostics even if there are none.
        }
      }
    }
<


                                              *lualine-diff-component-options*

>
    sections = {
      lualine_a = {
        {
          'diff',
          colored = true, -- Displays a colored diff status if set to true
          diff_color = {
            -- Same color values as the general color option can be used here.
            added    = 'LuaLineDiffAdd',    -- Changes the diff's added color
            modified = 'LuaLineDiffChange', -- Changes the diff's modified color
            removed  = 'LuaLineDiffDelete', -- Changes the diff's removed color you
          },
          symbols = {added = '+', modified = '~', removed = '-'}, -- Changes the symbols used by the diff.
          source = nil, -- A function that works as a data source for diff.
                        -- It must return a table as such:
                        --   { added = add_count, modified = modified_count, removed = removed_count }
                        -- or nil on failure. count <= 0 won't be displayed.
        }
      }
    }
<


                                        *lualine-fileformat-component-options*

>
    sections = {
      lualine_a = {
        {
          'fileformat',
          symbols = {
            unix = '', -- e712
            dos = '',  -- e70f
            mac = '',  -- e711
          }
        }
      }
    }
<


                                          *lualine-filename-component-options*

>
    sections = {
      lualine_a = {
        {
          'filename',
          file_status = true,      -- Displays file status (readonly status, modified status)
          newfile_status = false,  -- Display new file status (new file means no write after created)
          path = 0,                -- 0: Just the filename
                                   -- 1: Relative path
                                   -- 2: Absolute path
                                   -- 3: Absolute path, with tilde as the home directory
                                   -- 4: Filename and parent dir, with tilde as the home directory
    
          shorting_target = 40,    -- Shortens path to leave 40 spaces in the window
                                   -- for other components. (terrible name, any suggestions?)
                                   -- It can also be a function that returns
                                   -- the value of `shorting_target` dynamically.
          symbols = {
            modified = '[+]',      -- Text to show when the file is modified.
            readonly = '[-]',      -- Text to show when the file is non-modifiable or readonly.
            unnamed = '[No Name]', -- Text to show for unnamed buffers.
            newfile = '[New]',     -- Text to show for newly created file before first write
          }
        }
      }
    }
<


                                          *lualine-filetype-component-options*

>
    sections = {
      lualine_a = {
        {
          'filetype',
          colored = true,   -- Displays filetype icon in color if set to true
          icon_only = false, -- Display only an icon for filetype
          icon = { align = 'right' }, -- Display filetype icon on the right hand side
          -- icon =    {'X', align='right'}
          -- Icon string ^ in table is ignored in filetype component
        }
      }
    }
<


                                          *lualine-encoding-component-options*

>
    sections = {
      lualine_a = {
        {
          'encoding',
          -- Show '[BOM]' when the file has a byte-order mark
            show_bomb = false,
        }
      }
    }
<


                                       *lualine-searchcount-component-options*

>
    sections = {
      lualine_a = {
        {
          'searchcount',
          maxcount = 999,
          timeout = 500,
        }
      }
    }
<


                                              *lualine-tabs-component-options*

>
    sections = {
      lualine_a = {
        {
          'tabs',
          tab_max_length = 40,  -- Maximum width of each tab. The content will be shorten dynamically (example: apple/orange -> a/orange)
          max_length = vim.o.columns / 3, -- Maximum width of tabs component.
                                          -- Note:
                                          -- It can also be a function that returns
                                          -- the value of `max_length` dynamically.
          mode = 0, -- 0: Shows tab_nr
                    -- 1: Shows tab_name
                    -- 2: Shows tab_nr + tab_name
    
          path = 0, -- 0: just shows the filename
                    -- 1: shows the relative path and shorten $HOME to ~
                    -- 2: shows the full path
                    -- 3: shows the full path and shorten $HOME to ~
    
          -- Automatically updates active tab color to match color of other components (will be overidden if buffers_color is set)
          use_mode_colors = false,
    
          tabs_color = {
            -- Same values as the general color option can be used here.
            active = 'lualine_{section}_normal',     -- Color for active tab.
            inactive = 'lualine_{section}_inactive', -- Color for inactive tab.
          },
    
          show_modified_status = true,  -- Shows a symbol next to the tab name if the file has been modified.
          symbols = {
            modified = '[+]',  -- Text to show when the file is modified.
          },
    
          fmt = function(name, context)
            -- Show + if buffer is modified in tab
            local buflist = vim.fn.tabpagebuflist(context.tabnr)
            local winnr = vim.fn.tabpagewinnr(context.tabnr)
            local bufnr = buflist[winnr]
            local mod = vim.fn.getbufvar(bufnr, '&mod')
    
            return name .. (mod == 1 and ' +' or '')
          end
        }
      }
    }
<


                                           *lualine-windows-component-options*

>
    sections = {
      lualine_a = {
        {
          'windows',
          show_filename_only = true,   -- Shows shortened relative path when set to false.
          show_modified_status = true, -- Shows indicator when the window is modified.
    
          mode = 0, -- 0: Shows window name
                    -- 1: Shows window index
                    -- 2: Shows window name + window index
    
          max_length = vim.o.columns * 2 / 3, -- Maximum width of windows component,
                                              -- it can also be a function that returns
                                              -- the value of `max_length` dynamically.
          filetype_names = {
            TelescopePrompt = 'Telescope',
            dashboard = 'Dashboard',
            packer = 'Packer',
            fzf = 'FZF',
            alpha = 'Alpha'
          }, -- Shows specific window name for that filetype ( { `filetype` = `window_name`, ... } )
    
          disabled_buftypes = { 'quickfix', 'prompt' }, -- Hide a window if its buffer's type is disabled
    
          -- Automatically updates active window color to match color of other components (will be overidden if buffers_color is set)
          use_mode_colors = false,
    
          windows_color = {
            -- Same values as the general color option can be used here.
            active = 'lualine_{section}_normal',     -- Color for active window.
            inactive = 'lualine_{section}_inactive', -- Color for inactive window.
          },
        }
      }
    }
<


                                        *lualine-lsp-status-component-options*

>
    sections = {
      lualine_a = {
        {
          'lsp_status',
          icon = '', -- f013
          symbols = {
            -- Standard unicode symbols to cycle through for LSP progress:
            spinner = { '⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏' },
            -- Standard unicode symbol for when LSP is done:
            done = '✓',
            -- Delimiter inserted between LSP names:
            separator = ' ',
          },
          -- List of LSP names to ignore (e.g., `null-ls`):
          ignore_lsp = {},
          -- Display the LSP name
          show_name = true,
        }
      }
    }
<


------------------------------------------------------------------------------

TABLINE ~

You can use lualine to display components in tabline. The configuration for
tabline sections is exactly the same as that of the statusline.

>
    tabline = {
      lualine_a = {},
      lualine_b = {'branch'},
      lualine_c = {'filename'},
      lualine_x = {},
      lualine_y = {},
      lualine_z = {}
    }
<


This will show the branch and filename components on top of neovim inside
tabline.

lualine also provides 2 components, buffers and tabs, that you can use to get a
more traditional tabline/bufferline.

>
    tabline = {
      lualine_a = {'buffers'},
      lualine_b = {'branch'},
      lualine_c = {'filename'},
      lualine_x = {},
      lualine_y = {},
      lualine_z = {'tabs'}
    }
<


WINBAR ~

From neovim-0.8 you can customize your winbar with lualine. Winbar
configuration is similar to statusline.

>
    winbar = {
      lualine_a = {},
      lualine_b = {},
      lualine_c = {'filename'},
      lualine_x = {},
      lualine_y = {},
      lualine_z = {}
    }
    
    inactive_winbar = {
      lualine_a = {},
      lualine_b = {},
      lualine_c = {'filename'},
      lualine_x = {},
      lualine_y = {},
      lualine_z = {}
    }
<


Just like statusline you can separately specify winbar for active and inactive
windows. Any lualine component can be placed in winbar. All kinds of custom
components supported in statusline are also supported for winbar too. In
general You can treat winbar as another lualine statusline that just appears on
top of windows instead of at bottom.

                                                             *lualine-Buffers*

Buffers                                Shows currently open buffers. Like
                                       bufferline. See
                                       |lualine-buffers-options| for all
                                       builtin behaviors of buffers component.
                                       You can use `:LualineBuffersJump` to
                                       jump to buffer based on index of buffer
                                       in buffers component. Jumping to
                                       non-existent buffer indices generates an
                                       error. To avoid these errors
                                       `LualineBuffersJump` provides `<bang>`
                                       support, meaning that you can call
                                       `:LualineBufferJump!` to ignore these
                                       errors.


>
      :LualineBuffersJump 2  " Jumps to 2nd buffer in buffers component.
      :LualineBuffersJump $  " Jumps to last buffer in buffers component.
      :LualineBuffersJump! 3  " Attempts to jump to 3rd buffer, if it exists.
<


                                                                *lualine-Tabs*

Tabs                                   Shows currently open tab. Like usual
                                       tabline. See |lualine-tabs-options| for
                                       all builtin behaviors of tabs component.
                                       You can also use `:LualineRenameTab` to
                                       set a name for a tabpage. For example:


>
    :LualineRenameTab Project_K
<


It’s useful when you’re using rendering mode 2/3 in tabs. To unname a
tabpage run `:LualineRenameTab` without argument.

                                               *lualine-Tabline-as-statusline*

Tabline as statusline                  You can also completely move your
                                       statusline to a tabline by configuring
                                       `lualine.tabline` and disabling
                                       `lualine.sections` and
                                       `lualine.inactive_sections`:


>
    tabline = {
    ......
      },
    sections = {},
    inactive_sections = {},
<


If you want a more sophisticated tabline you can use other tabline plugins with
lualine too, for example:


- nvim-bufferline <https://github.com/akinsho/nvim-bufferline.lua>
- tabline.nvim <https://github.com/kdheepak/tabline.nvim>


tabline.nvim even uses lualine’s theme by default 🙌 You can find a bigger
list here <https://github.com/rockerBOO/awesome-neovim#tabline>.

------------------------------------------------------------------------------

EXTENSIONS ~

lualine extensions change statusline appearance for a window/buffer with
specified filetypes.

By default no extensions are loaded to improve performance. You can load
extensions with:

>
    extensions = {'quickfix'}
<


                                                *lualine-Available-extensions*


- aerial
- assistant
- avante
- chadtree
- ctrlspace
- fern
- fugitive
- fzf
- lazy
- man
- mason
- mundo
- neo-tree
- nerdtree
- nvim-dap-ui
- nvim-tree
- oil
- overseer
- quickfix
- symbols-outline
- toggleterm
- trouble


                                                   *lualine-Custom-extensions*

Custom extensions                      You can define your own extensions. If
                                       you believe an extension may be useful
                                       to others, then please submit a PR.


>
    local my_extension = { sections = { lualine_a = {'mode'} }, filetypes = {'lua'} }
    require('lualine').setup { extensions = { my_extension } }
<


------------------------------------------------------------------------------

REFRESHING LUALINE ~

By default lualine refreshes itself based on timer and some events. You can set
the interval of the timer with refresh option. However you can also force
lualine to refresh at any time by calling `lualine.refresh` function.

>
    require('lualine').refresh({
      scope = 'tabpage',  -- scope of refresh all/tabpage/window
      place = { 'statusline', 'winbar', 'tabline' },  -- lualine segment ro refresh.
    })
<


The arguments shown here are default values. So not passing any of them will be
treated as if a default value was passed.

So you can simply do

>
    require('lualine').refresh()
<


Also, note by default when you call refresh a refresh event is queued in
lualine. It desn’t refresh event immidiately. It’ll refresh on next refresh
check pass. By default this time is set to 16ms to match 60fps. This duration
can be configured with `options.refresh.refresh_time` option. If you want to
bypass the refresh queue and want lualine to process the refresh immmidiately
call refresh with `force=true` parameter set like this.

>
    require('lualine').refresh({
      force = true,       -- do an immidiate refresh
      scope = 'tabpage',  -- scope of refresh all/tabpage/window
      place = { 'statusline', 'winbar', 'tabline' },  -- lualine segment ro refresh.
    })
<


Practically, speaking this is almost never needed. Also you should avoid
calling `lualine.refresh` with `force` inside components. Since components are
evaluated during refresh, calling refresh while refreshing can have undesirable
effects.

DISABLING LUALINE ~

You can disable lualine for specific filetypes:

>
    options = { disabled_filetypes = {'lua'} }
<


You can also disable lualine completely. Note that you need to call this after
the setup

>
      require('lualine').hide({
        place = {'statusline', 'tabline', 'winbar'}, -- The segment this change applies to.
        unhide = false,  -- whether to re-enable lualine again/
      })
<


The arguments show for hide above are default values. Which means even if the
hide function is called without arguments it’ll work as if these were passed.

So in short to disable lualine completely you can do

>
    require('lualine').hide()
<


To enable it again you can do

>
    require('lualine').hide({unhide=true})
<


WIKI ~

Check out the wiki <https://github.com/nvim-lualine/lualine.nvim/wiki> for more
info.

You can find some useful configuration snippets
<https://github.com/nvim-lualine/lualine.nvim/wiki/Component-snippets> here.
You can also share your awesome snippets with others.

If you want to extend lualine with plugins or want to know which ones already
do, wiki/plugins <https://github.com/nvim-lualine/lualine.nvim/wiki/Plugins> is
for you.

Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>

vim:tw=78:ts=8:noet:ft=help:norl:


================================================
FILE: examples/bubbles.lua
================================================
-- Bubbles config for lualine
-- Author: lokesh-krishna
-- MIT license, see LICENSE for more details.

-- stylua: ignore
local colors = {
  blue   = '#80a0ff',
  cyan   = '#79dac8',
  black  = '#080808',
  white  = '#c6c6c6',
  red    = '#ff5189',
  violet = '#d183e8',
  grey   = '#303030',
}

local bubbles_theme = {
  normal = {
    a = { fg = colors.black, bg = colors.violet },
    b = { fg = colors.white, bg = colors.grey },
    c = { fg = colors.white },
  },

  insert = { a = { fg = colors.black, bg = colors.blue } },
  visual = { a = { fg = colors.black, bg = colors.cyan } },
  replace = { a = { fg = colors.black, bg = colors.red } },

  inactive = {
    a = { fg = colors.white, bg = colors.black },
    b = { fg = colors.white, bg = colors.black },
    c = { fg = colors.white },
  },
}

require('lualine').setup {
  options = {
    theme = bubbles_theme,
    component_separators = '',
    section_separators = { left = '', right = '' },
  },
  sections = {
    lualine_a = { { 'mode', separator = { left = '' }, right_padding = 2 } },
    lualine_b = { 'filename', 'branch' },
    lualine_c = {
      '%=', --[[ add your center components here in place of this comment ]]
    },
    lualine_x = {},
    lualine_y = { 'filetype', 'progress' },
    lualine_z = {
      { 'location', separator = { right = '' }, left_padding = 2 },
    },
  },
  inactive_sections = {
    lualine_a = { 'filename' },
    lualine_b = {},
    lualine_c = {},
    lualine_x = {},
    lualine_y = {},
    lualine_z = { 'location' },
  },
  tabline = {},
  extensions = {},
}


================================================
FILE: examples/cosmicink.lua
================================================
-- CosmicInk config for lualine
-- Author: Yeeloman
-- MIT license, see LICENSE for more details.

-- Main configuration for setting up lualine.nvim statusline plugin

-- Default Theme Colors: Define a set of base colors for your theme
local colors = {
  BG = '#16181b', -- Dark background
  FG = '#c5c4c4', -- Light foreground for contrast
  YELLOW = '#e8b75f', -- Vibrant yellow
  CYAN = '#00bcd4', -- Soft cyan
  DARKBLUE = '#2b3e50', -- Deep blue
  GREEN = '#00e676', -- Bright green
  ORANGE = '#ff7733', -- Warm orange
  VIOLET = '#7a3ba8', -- Strong violet
  MAGENTA = '#d360aa', -- Deep magenta
  BLUE = '#4f9cff', -- Light-medium blue
  RED = '#ff3344', -- Strong red
}

-- Function to get the color associated with the current mode in Vim
local function get_mode_color()
  -- Define a table mapping modes to their associated colors
  local mode_color = {
    n = colors.DARKBLUE,
    i = colors.VIOLET,
    v = colors.RED,
    [''] = colors.BLUE,
    V = colors.RED,
    c = colors.MAGENTA,
    no = colors.RED,
    s = colors.ORANGE,
    S = colors.ORANGE,
    [''] = colors.ORANGE,
    ic = colors.YELLOW,
    R = colors.ORANGE,
    Rv = colors.ORANGE,
    cv = colors.RED,
    ce = colors.RED,
    r = colors.CYAN,
    rm = colors.CYAN,
    ['r?'] = colors.CYAN,
    ['!'] = colors.RED,
    t = colors.RED,
  }
  -- Return the opposite color, or fallback to foreground color
  return mode_color[vim.fn.mode()]
end

-- Function to get the opposite color of a given mode color
local function get_opposite_color(mode_color)
  -- Define a table mapping colors to their opposite color
  local opposite_colors = {
    [colors.RED] = colors.CYAN,
    [colors.BLUE] = colors.ORANGE,
    [colors.GREEN] = colors.MAGENTA,
    [colors.MAGENTA] = colors.DARKBLUE,
    [colors.ORANGE] = colors.BLUE,
    [colors.CYAN] = colors.YELLOW,
    [colors.VIOLET] = colors.GREEN,
    [colors.YELLOW] = colors.RED,
    [colors.DARKBLUE] = colors.VIOLET,
  }
  -- Return the opposite color, or fallback to foreground color
  return opposite_colors[mode_color] or colors.FG
end

-- Function to get an animated color (randomly chosen from available colors)
local function get_animated_color(mode_color)
  -- Define a list of all available colors
  local all_colors = {
    colors.RED,
    colors.BLUE,
    colors.GREEN,
    colors.MAGENTA,
    colors.ORANGE,
    colors.CYAN,
    colors.VIOLET,
    colors.YELLOW,
    colors.DARKBLUE,
  }
  -- Create a list of possible opposite colors (excluding the current mode color)
  local possible_opposites = {}
  for _, color in ipairs(all_colors) do
    if color ~= mode_color then
      table.insert(possible_opposites, color)
    end
  end
  -- Randomly select an opposite color
  if #possible_opposites > 0 then
    local random_index = math.random(1, #possible_opposites)
    return possible_opposites[random_index]
  else
    return colors.FG -- Default to foreground color if no opposite found
  end
end

-- Function to interpolate between two colors for a smooth transition
local function interpolate_color(color1, color2, step)
  -- Blend two colors based on the given step factor (0.0 -> color1, 1.0 -> color2)
  local blend = function(c1, c2, stp)
    return math.floor(c1 + (c2 - c1) * stp)
  end
  -- Extract the RGB values of both colors (in hex)
  local r1, g1, b1 = tonumber(color1:sub(2, 3), 16), tonumber(color1:sub(4, 5), 16), tonumber(color1:sub(6, 7), 16)
  local r2, g2, b2 = tonumber(color2:sub(2, 3), 16), tonumber(color2:sub(4, 5), 16), tonumber(color2:sub(6, 7), 16)

  -- Calculate the new RGB values for the blended color
  local r = blend(r1, r2, step)
  local g = blend(g1, g2, step)
  local b = blend(b1, b2, step)

  -- Return the blended color in hex format
  return string.format('#%02X%02X%02X', r, g, b)
end

-- Function to get a middle color by interpolating between mode color and its opposite
local function get_middle_color(color_step)
  -- Set default value for color_step if not provided
  color_step = color_step or 0.5 -- If color_step is nil, default to 0.5

  local color1 = get_mode_color() -- Get the current mode color
  local color2 = get_opposite_color(color1) -- Get the opposite color

  -- Return an interpolated color between the two (based on the color_step value)
  return interpolate_color(color1, color2, color_step)
end

-- Condition: Check if the buffer is not empty
-- This checks whether the current file's name is non-empty.
-- If the file is open (i.e., has a name), it returns true, meaning the buffer is not empty.
-- local function buffer_not_empty()
-- 	return vim.fn.empty(vim.fn.expand('%:t')) ~= 1 -- 'expand('%:t')' gets the file name
-- end

-- Condition: Hide in width (only show the statusline when the window width is greater than 80)
-- This ensures that the statusline will only appear if the current window width exceeds 80 characters.
local function hide_in_width()
  return vim.fn.winwidth(0) > 80 -- 'winwidth(0)' returns the current window width
end

-- Condition: Check if the current workspace is inside a Git repository
-- This function checks if the current file is inside a Git repository by looking for a `.git` directory
-- in the current file's path. Returns true if the file is in a Git workspace.
-- local function check_git_workspace()
-- 	local filepath = vim.fn.expand('%:p:h')               -- Get the current file's directory
-- 	local gitdir = vim.fn.finddir('.git', filepath .. ';') -- Search for a `.git` directory in the file path
-- 	return gitdir and #gitdir > 0 and #gitdir < #filepath -- Returns true if a `.git` directory is found
-- end

-- -- Set random seed based on current time for randomness
math.randomseed(os.time())
-- Icon sets for random selection
local icon_sets = {
  stars = { '★', '☆', '✧', '✦', '✶', '✷', '✸', '✹' }, -- Set of star-like icons
  runes = {
    '✠',
    '⛧',
    '𖤐',
    'ᛟ',
    'ᚨ',
    'ᚱ',
    'ᚷ',
    'ᚠ',
    'ᛉ',
    'ᛊ',
    'ᛏ',
    '☠',
    '☾',
    '♰',
    '✟',
    '☽',
    '⚚',
    '🜏',
  }, -- Set of rune-like symbols
  hearts = { '❤', '♥', '♡', '❦', '❧' }, -- Set of heart-shaped icons
  waves = { '≈', '∿', '≋', '≀', '⌀', '≣', '⌇' }, -- Set of wave-like symbols
  crosses = { '☨', '✟', '♰', '♱', '⛨', '' }, -- Set of cross-like symbols
}

-- Function to select a random icon from a given set
local function get_random_icon(icons)
  return icons[math.random(#icons)] -- Returns a random icon from the set
end

-- Function to shuffle the elements in a table
local function shuffle_table(tbl)
  local n = #tbl
  while n > 1 do
    local k = math.random(n)
    tbl[n], tbl[k] = tbl[k], tbl[n] -- Swap elements
    n = n - 1 -- Decrease the size of the unsorted portion
  end
end

-- Create a list of all icon sets to allow for random selection from any set
local icon_sets_list = {}
for _, icons in pairs(icon_sets) do
  table.insert(icon_sets_list, icons) -- Add each icon set to the list
end
shuffle_table(icon_sets_list) -- Shuffle the icon sets list

-- Function to reverse the order of elements in a table
local function reverse_table(tbl)
  local reversed = {}
  for i = #tbl, 1, -1 do
    table.insert(reversed, tbl[i]) -- Insert elements in reverse order
  end
  return reversed
end

-- Create a reversed list of icon sets
local reversed_icon_sets = reverse_table(icon_sets_list)

-- Function to create a separator component based on side (left/right) and optional mode color
local function create_separator(side, use_mode_color)
  return {
    function()
      return side == 'left' and '' or '' -- Choose separator symbol based on side
    end,
    color = function()
      -- Set color based on mode or opposite color
      local color = use_mode_color and get_mode_color() or get_opposite_color(get_mode_color())
      return {
        fg = color,
      }
    end,
    padding = {
      left = 0,
    },
  }
end

-- Function to create a mode-based component (e.g., statusline)
-- with optional content, icon, and colors
local function create_mode_based_component(content, icon, color_fg, color_bg)
  return {
    content,
    icon = icon,
    color = function()
      local mode_color = get_mode_color()
      local opposite_color = get_opposite_color(mode_color)
      return {
        fg = color_fg or colors.FG,
        bg = color_bg or opposite_color,
        gui = 'bold',
      }
    end,
  }
end

-- -- Function to get the current mode indicator as a single character
local function mode()
  -- Map of modes to their respective shorthand indicators
  local mode_map = {
    n = 'N', -- Normal mode
    i = 'I', -- Insert mode
    v = 'V', -- Visual mode
    [''] = 'V', -- Visual block mode
    V = 'V', -- Visual line mode
    c = 'C', -- Command-line mode
    no = 'N', -- NInsert mode
    s = 'S', -- Select mode
    S = 'S', -- Select line mode
    ic = 'I', -- Insert mode (completion)
    R = 'R', -- Replace mode
    Rv = 'R', -- Virtual Replace mode
    cv = 'C', -- Command-line mode
    ce = 'C', -- Ex mode
    r = 'R', -- Prompt mode
    rm = 'M', -- More mode
    ['r?'] = '?', -- Confirm mode
    ['!'] = '!', -- Shell mode
    t = 'T', -- Terminal mode
  }
  -- Return the mode shorthand or [UNKNOWN] if no match
  return mode_map[vim.fn.mode()] or '[UNKNOWN]'
end

-- Config
local config = {
  options = {
    component_separators = '',
    section_separators = '',
    theme = {
      normal = {
        c = {
          fg = colors.FG,
          bg = colors.BG,
        },
      },
      inactive = {
        c = {
          fg = colors.FG,
          bg = colors.BG,
        },
      }, -- Simplified inactive theme
    },
    disabled_filetypes = {
      'neo-tree',
      'undotree',
      'sagaoutline',
      'diff',
    },
  },
  sections = {
    lualine_a = {},
    lualine_b = {},
    lualine_c = {},
    lualine_x = {},
    lualine_y = {},
    lualine_z = {},
  },
  inactive_sections = {
    lualine_a = {},
    lualine_b = {},
    lualine_c = {
      {

        'location',
        color = function()
          return {
            fg = colors.FG,
            gui = 'bold',
          }
        end,
      },
    },
    lualine_x = {
      {
        'filename',
        color = function()
          return {
            fg = colors.FG,
            gui = 'bold,italic',
          }
        end,
      },
    },
    lualine_y = {},
    lualine_z = {},
  },
}

-- Helper functions
local function ins_left(component)
  table.insert(config.sections.lualine_c, component)
end

local function ins_right(component)
  table.insert(config.sections.lualine_x, component)
end

-- LEFT
ins_left {
  mode,
  color = function()
    local mode_color = get_mode_color()
    return {
      fg = colors.BG,
      bg = mode_color,
      gui = 'bold',
    }
  end,
  padding = { left = 1, right = 1 },
}

ins_left(create_separator('left', true))

ins_left {
  function()
    return vim.fn.fnamemodify(vim.fn.getcwd(), ':t')
  end,
  icon = ' ',
  color = function()
    local virtual_env = vim.env.VIRTUAL_ENV
    if virtual_env then
      return {
        fg = get_mode_color(),
        gui = 'bold,strikethrough',
      }
    else
      return {
        fg = get_mode_color(),
        gui = 'bold',
      }
    end
  end,
}

ins_left(create_separator('right'))

ins_left(create_mode_based_component('filename', nil, colors.BG))

ins_left(create_separator('left'))

ins_left {
  function()
    return ''
  end,
  color = function()
    return {
      fg = get_middle_color(),
    }
  end,
  cond = hide_in_width,
}

ins_left {
  function()
    local git_status = vim.b.gitsigns_status_dict
    if git_status then
      return string.format('+%d ~%d -%d', git_status.added or 0, git_status.changed or 0, git_status.removed or 0)
    end
    return ''
  end,
  -- icon = '󰊢 ',
  color = {
    fg = colors.YELLOW,
    gui = 'bold',
  },
  cond = hide_in_width,
}

for _, icons in pairs(icon_sets_list) do
  ins_left {
    function()
      return get_random_icon(icons)
    end,
    color = function()
      return {
        fg = get_animated_color(),
      }
    end,
    cond = hide_in_width,
  }
end

ins_left {
  'searchcount',
  color = {
    fg = colors.GREEN,
    gui = 'bold',
  },
}

-- RIGHT
ins_right {
  function()
    local reg = vim.fn.reg_recording()
    return reg ~= '' and '[' .. reg .. ']' or ''
  end,
  color = {
    fg = '#ff3344',
    gui = 'bold',
  },
  cond = function()
    return vim.fn.reg_recording() ~= ''
  end,
}

ins_right {
  'selectioncount',
  color = {
    fg = colors.GREEN,
    gui = 'bold',
  },
}

for _, icons in ipairs(reversed_icon_sets) do
  ins_right {
    function()
      return get_random_icon(icons)
    end,
    color = function()
      return {
        fg = get_animated_color(),
      }
    end,
    cond = hide_in_width,
  }
end

ins_right {
  function()
    local msg = 'No Active Lsp'
    local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')
    local clients = vim.lsp.get_clients()
    if next(clients) == nil then
      return msg
    end
    local lsp_short_names = {
      pyright = 'py',
      tsserver = 'ts',
      rust_analyzer = 'rs',
      lua_ls = 'lua',
      clangd = 'c++',
      bashls = 'sh',
      jsonls = 'json',
      html = 'html',
      cssls = 'css',
      tailwindcss = 'tw',
      dockerls = 'docker',
      sqlls = 'sql',
      yamlls = 'yml',
    }
    for _, client in ipairs(clients) do
      local filetypes = client.config.filetypes
      if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
        return lsp_short_names[client.name] or client.name:sub(1, 2)
      end
    end
    return msg
  end,
  icon = ' ',
  color = {
    fg = colors.YELLOW,
    gui = 'bold',
  },
}

ins_right {
  function()
    return ''
  end,
  color = function()
    return { fg = get_middle_color() }
  end,
  cond = hide_in_width,
}

ins_right(create_separator('right'))

ins_right(create_mode_based_component('location', nil, colors.BG))

ins_right(create_separator('left'))

ins_right {
  'branch',
  icon = ' ',
  --[[ Truncates and formats Git branch names for display in lualine:
    First segment: Uppercase, truncated to 1 character.
    Middle segments: Lowercase, truncated to 1 character.
    Last segment: Unchanged.
    Separator: › between truncated segments and the last segment.

    Example Input/Output:
		Branch										Name	Output
		backend/setup/tailwind		Bs›tailwind
		feature/add-ui						Fa›add-ui
		main											main
	]]
  fmt = function(branch)
    if branch == '' or branch == nil then
      return 'No Repo'
    end

    -- Function to truncate a segment to a specified length
    local function truncate_segment(segment, max_length)
      if #segment > max_length then
        return segment:sub(1, max_length)
      end
      return segment
    end

    -- Split the branch name by '/'
    local segments = {}
    for segment in branch:gmatch('[^/]+') do
      table.insert(segments, segment)
    end

    -- Truncate all segments except the last one
    for i = 1, #segments - 1 do
      segments[i] = truncate_segment(segments[i], 1) -- Truncate to 1 character
    end

    -- If there's only one segment (no '/'), return it as-is
    if #segments == 1 then
      return segments[1]
    end

    -- Capitalize the first segment and lowercase the rest (except the last one)
    segments[1] = segments[1]:upper() -- First segment uppercase
    for i = 2, #segments - 1 do
      segments[i] = segments[i]:lower() -- Other segments lowercase
    end

    -- Combine the first segments with no separator and add '›' before the last segment
    local truncated_branch = table.concat(segments, '', 1, #segments - 1) .. '›' .. segments[#segments]

    -- Ensure the final result doesn't exceed a maximum length
    local max_total_length = 15
    if #truncated_branch > max_total_length then
      truncated_branch = truncated_branch:sub(1, max_total_length) .. '…'
    end

    return truncated_branch
  end,
  color = function()
    local mode_color = get_mode_color()
    return {
      fg = mode_color,
      gui = 'bold',
    }
  end,
}

ins_right(create_separator('right'))

ins_right(create_mode_based_component('progress', nil, colors.BG))

require('lualine').setup(config)


================================================
FILE: examples/evil_lualine.lua
================================================
-- Eviline config for lualine
-- Author: shadmansaleh
-- Credit: glepnir
local lualine = require('lualine')

-- Color table for highlights
-- stylua: ignore
local colors = {
  bg       = '#202328',
  fg       = '#bbc2cf',
  yellow   = '#ECBE7B',
  cyan     = '#008080',
  darkblue = '#081633',
  green    = '#98be65',
  orange   = '#FF8800',
  violet   = '#a9a1e1',
  magenta  = '#c678dd',
  blue     = '#51afef',
  red      = '#ec5f67',
}

local conditions = {
  buffer_not_empty = function()
    return vim.fn.empty(vim.fn.expand('%:t')) ~= 1
  end,
  hide_in_width = function()
    return vim.fn.winwidth(0) > 80
  end,
  check_git_workspace = function()
    local filepath = vim.fn.expand('%:p:h')
    local gitdir = vim.fn.finddir('.git', filepath .. ';')
    return gitdir and #gitdir > 0 and #gitdir < #filepath
  end,
}

-- Config
local config = {
  options = {
    -- Disable sections and component separators
    component_separators = '',
    section_separators = '',
    theme = {
      -- We are going to use lualine_c an lualine_x as left and
      -- right section. Both are highlighted by c theme .  So we
      -- are just setting default looks o statusline
      normal = { c = { fg = colors.fg, bg = colors.bg } },
      inactive = { c = { fg = colors.fg, bg = colors.bg } },
    },
  },
  sections = {
    -- these are to remove the defaults
    lualine_a = {},
    lualine_b = {},
    lualine_y = {},
    lualine_z = {},
    -- These will be filled later
    lualine_c = {},
    lualine_x = {},
  },
  inactive_sections = {
    -- these are to remove the defaults
    lualine_a = {},
    lualine_b = {},
    lualine_y = {},
    lualine_z = {},
    lualine_c = {},
    lualine_x = {},
  },
}

-- Inserts a component in lualine_c at left section
local function ins_left(component)
  table.insert(config.sections.lualine_c, component)
end

-- Inserts a component in lualine_x at right section
local function ins_right(component)
  table.insert(config.sections.lualine_x, component)
end

ins_left {
  function()
    return '▊'
  end,
  color = { fg = colors.blue }, -- Sets highlighting of component
  padding = { left = 0, right = 1 }, -- We don't need space before this
}

ins_left {
  -- mode component
  function()
    return ''
  end,
  color = function()
    -- auto change color according to neovims mode
    local mode_color = {
      n = colors.red,
      i = colors.green,
      v = colors.blue,
      [''] = colors.blue,
      V = colors.blue,
      c = colors.magenta,
      no = colors.red,
      s = colors.orange,
      S = colors.orange,
      [''] = colors.orange,
      ic = colors.yellow,
      R = colors.violet,
      Rv = colors.violet,
      cv = colors.red,
      ce = colors.red,
      r = colors.cyan,
      rm = colors.cyan,
      ['r?'] = colors.cyan,
      ['!'] = colors.red,
      t = colors.red,
    }
    return { fg = mode_color[vim.fn.mode()] }
  end,
  padding = { right = 1 },
}

ins_left {
  -- filesize component
  'filesize',
  cond = conditions.buffer_not_empty,
}

ins_left {
  'filename',
  cond = conditions.buffer_not_empty,
  color = { fg = colors.magenta, gui = 'bold' },
}

ins_left { 'location' }

ins_left { 'progress', color = { fg = colors.fg, gui = 'bold' } }

ins_left {
  'diagnostics',
  sources = { 'nvim_diagnostic' },
  symbols = { error = ' ', warn = ' ', info = ' ' },
  diagnostics_color = {
    error = { fg = colors.red },
    warn = { fg = colors.yellow },
    info = { fg = colors.cyan },
  },
}

-- Insert mid section. You can make any number of sections in neovim :)
-- for lualine it's any number greater then 2
ins_left {
  function()
    return '%='
  end,
}

ins_left {
  -- Lsp server name .
  function()
    local msg = 'No Active Lsp'
    local buf_ft = vim.api.nvim_get_option_value('filetype', { buf = 0 })
    local clients = vim.lsp.get_clients()
    if next(clients) == nil then
      return msg
    end
    for _, client in ipairs(clients) do
      local filetypes = client.config.filetypes
      if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
        return client.name
      end
    end
    return msg
  end,
  icon = ' LSP:',
  color = { fg = '#ffffff', gui = 'bold' },
}

-- Add components to right sections
ins_right {
  'o:encoding', -- option component same as &encoding in viml
  fmt = string.upper, -- I'm not sure why it's upper case either ;)
  cond = conditions.hide_in_width,
  color = { fg = colors.green, gui = 'bold' },
}

ins_right {
  'fileformat',
  fmt = string.upper,
  icons_enabled = false, -- I think icons are cool but Eviline doesn't have them. sigh
  color = { fg = colors.green, gui = 'bold' },
}

ins_right {
  'branch',
  icon = '',
  color = { fg = colors.violet, gui = 'bold' },
}

ins_right {
  'diff',
  -- Is it me or the symbol for modified us really weird
  symbols = { added = ' ', modified = '󰝤 ', removed = ' ' },
  diff_color = {
    added = { fg = colors.green },
    modified = { fg = colors.orange },
    removed = { fg = colors.red },
  },
  cond = conditions.hide_in_width,
}

ins_right {
  function()
    return '▊'
  end,
  color = { fg = colors.blue },
  padding = { left = 1 },
}

-- Now don't forget to initialize lualine
lualine.setup(config)


================================================
FILE: examples/slanted-gaps.lua
================================================
local colors = {
  red = '#ca1243',
  grey = '#a0a1a7',
  black = '#383a42',
  white = '#f3f3f3',
  light_green = '#83a598',
  orange = '#fe8019',
  green = '#8ec07c',
}

local theme = {
  normal = {
    a = { fg = colors.white, bg = colors.black },
    b = { fg = colors.white, bg = colors.grey },
    c = { fg = colors.black, bg = colors.white },
    z = { fg = colors.white, bg = colors.black },
  },
  insert = { a = { fg = colors.black, bg = colors.light_green } },
  visual = { a = { fg = colors.black, bg = colors.orange } },
  replace = { a = { fg = colors.black, bg = colors.green } },
}

local empty = require('lualine.component'):extend()
function empty:draw(default_highlight)
  self.status = ''
  self.applied_separator = ''
  self:apply_highlights(default_highlight)
  self:apply_section_separators()
  return self.status
end

-- Put proper separators and gaps between components in sections
local function process_sections(sections)
  for name, section in pairs(sections) do
    local left = name:sub(9, 10) < 'x'
    for pos = 1, name ~= 'lualine_z' and #section or #section - 1 do
      table.insert(section, pos * 2, { empty, color = { fg = colors.white, bg = colors.white } })
    end
    for id, comp in ipairs(section) do
      if type(comp) ~= 'table' then
        comp = { comp }
        section[id] = comp
      end
      comp.separator = left and { right = '' } or { left = '' }
    end
  end
  return sections
end

local function search_result()
  if vim.v.hlsearch == 0 then
    return ''
  end
  local last_search = vim.fn.getreg('/')
  if not last_search or last_search == '' then
    return ''
  end
  local searchcount = vim.fn.searchcount { maxcount = 9999 }
  return last_search .. '(' .. searchcount.current .. '/' .. searchcount.total .. ')'
end

local function modified()
  if vim.bo.modified then
    return '+'
  elseif vim.bo.modifiable == false or vim.bo.readonly == true then
    return '-'
  end
  return ''
end

require('lualine').setup {
  options = {
    theme = theme,
    component_separators = '',
    section_separators = { left = '', right = '' },
  },
  sections = process_sections {
    lualine_a = { 'mode' },
    lualine_b = {
      'branch',
      'diff',
      {
        'diagnostics',
        source = { 'nvim' },
        sections = { 'error' },
        diagnostics_color = { error = { bg = colors.red, fg = colors.white } },
      },
      {
        'diagnostics',
        source = { 'nvim' },
        sections = { 'warn' },
        diagnostics_color = { warn = { bg = colors.orange, fg = colors.white } },
      },
      { 'filename', file_status = false, path = 1 },
      { modified, color = { bg = colors.red } },
      {
        '%w',
        cond = function()
          return vim.wo.previewwindow
        end,
      },
      {
        '%r',
        cond = function()
          return vim.bo.readonly
        end,
      },
      {
        '%q',
        cond = function()
          return vim.bo.buftype == 'quickfix'
        end,
      },
    },
    lualine_c = {},
    lualine_x = {},
    lualine_y = { search_result, 'filetype' },
    lualine_z = { '%l:%c', '%p%%/%L' },
  },
  inactive_sections = {
    lualine_c = { '%f %y %m' },
    lualine_x = {},
  },
}


================================================
FILE: lua/lualine/component.lua
================================================
-- Copyright (c) 2020-2021 shadmansaleh
-- MIT license, see LICENSE for more details.
local lualine_require = require('lualine_require')
local require = lualine_require.require
local M = require('lualine.utils.class'):extend()
local modules = lualine_require.lazy_require {
  highlight = 'lualine.highlight',
  utils_notices = 'lualine.utils.notices',
  fn_store = 'lualine.utils.fn_store',
}

-- Used to provide a unique id for each component
local component_no = 1
function M._reset_components()
  component_no = 1
end

-- variable to store component output for manipulation
M.status = ''

function M:__tostring()
  local str = 'Component: ' .. self.options.component_name
  if self.debug then
    str = str .. '\n---------------------\n' .. vim.inspect(self)
  end
  return str
end

M.__is_lualine_component = true

---initialize new component
---@param options table options for component
function M:init(options)
  self.options = options or {}
  component_no = component_no + 1
  if not self.options.component_name then
    self.options.component_name = tostring(component_no)
  end
  self.component_no = component_no
  self:set_separator()
  self:create_option_highlights()
  self:set_on_click()
end

---sets the default separator for component based on whether the component
---is in left sections or right sections when separator option is omitted.
function M:set_separator()
  if self.options.separator == nil then
    if self.options.component_separators then
      if self.options.self.section < 'x' then
        self.options.separator = self.options.component_separators.left
      else
        self.options.separator = self.options.component_separators.right
      end
    end
  end
end

---creates hl group from color option
function M:create_option_highlights()
  -- set custom highlights
  if self.options.color then
    self.options.color_highlight = self:create_hl(self.options.color)
  end
  -- setup icon highlight
  if type(self.options.icon) == 'table' and self.options.icon.color then
    self.options.icon_color_highlight = self:create_hl(self.options.icon.color)
  end
end

---Setup on click function so they can be added during drawing.
function M:set_on_click()
  if self.options.on_click ~= nil then
    if vim.fn.has('nvim-0.8') == 0 then
      modules.utils_notices.add_notice(
        '### Options.on_click\nSorry `on_click` can only be used in neovim 0.8 or higher.\n'
      )
      self.options.on_click = nil
      return
    end
    self.on_click_id = modules.fn_store.register_fn(self.component_no, self.options.on_click)
  end
end

---adds spaces to left and right of a component
function M:apply_padding()
  local padding = self.options.padding
  local l_padding, r_padding
  if padding == nil then
    padding = 1
  end
  if type(padding) == 'number' then
    l_padding, r_padding = padding, padding
  elseif type(padding) == 'table' then
    l_padding, r_padding = padding.left, padding.right
  end
  if l_padding then
    if self.status:find('%%#.*#') == 1 then
      -- When component has changed the highlight at beginning
      -- we will add the padding after the highlight
      local pre_highlight = vim.fn.matchlist(self.status, [[\(%#.\{-\}#\)]])[2]
      self.status = pre_highlight .. string.rep(' ', l_padding) .. self.status:sub(#pre_highlight + 1, #self.status)
    else
      self.status = string.rep(' ', l_padding) .. self.status
    end
  end
  if r_padding then
    if self.status:reverse():find('%*%%.*#.*#%%') == 1 then
      -- When component has changed the highlight at the end
      -- we will add the padding before the highlight terminates
      self.status = self.status:sub(1, -3) .. string.rep(' ', r_padding) .. self.status:sub(-2, -1)
    else
      self.status = self.status .. string.rep(' ', r_padding)
    end
  end
end

---applies custom highlights for component
function M:apply_highlights(default_highlight)
  if self.options.color_highlight then
    local hl_fmt
    hl_fmt, M.color_fn_cache = self:format_hl(self.options.color_highlight)
    self.status = hl_fmt .. self.status
  end
  if type(self.options.separator) ~= 'table' and self.status:find('%%#') then
    -- Apply default highlight only when we aren't applying trans sep and
    -- the component has changed it's hl. Since we won't be applying
    -- regular sep in those cases so ending with default hl isn't necessary
    self.status = self.status .. default_highlight
    -- Also put it in applied sep so when sep get striped so does the hl
    self.applied_separator = default_highlight
  end
  -- Prepend default hl when the component doesn't start with hl otherwise
  -- color in previous component can cause side effect
  if not self.status:find('^%%#') then
    self.status = default_highlight .. self.status
  end
end

---apply icon to component (appends/prepends component with icon)
function M:apply_icon()
  local icon = self.options.icon
  if self.options.icons_enabled and icon then
    if type(icon) == 'table' then
      icon = icon[1]
    end
    if
      self.options.icon_color_highlight
      and type(self.options.icon) == 'table'
      and self.options.icon.align == 'right'
    then
      self.status = table.concat {
        self.status,
        ' ',
        self:format_hl(self.options.icon_color_highlight),
        icon,
        self:get_default_hl(),
      }
    elseif self.options.icon_color_highlight then
      self.status = table.concat {
        self:format_hl(self.options.icon_color_highlight),
        icon,
        self:get_default_hl(),
        ' ',
        self.status,
      }
    elseif type(self.options.icon) == 'table' and self.options.icon.align == 'right' then
      self.status = table.concat({ self.status, icon }, ' ')
    else
      self.status = table.concat({ icon, self.status }, ' ')
    end
  end
end

---apply separator at end of component only when
---custom highlights haven't affected background
function M:apply_separator()
  local separator = self.options.separator
  if type(separator) == 'table' then
    if self.options.separator[2] == '' then
      if self.options.self.section < 'x' then
        separator = self.options.component_separators.left
      else
        separator = self.options.component_separators.right
      end
    else
      return
    end
  end
  if separator and #separator > 0 then
    self.status = self.status .. separator
    self.applied_separator = self.applied_separator .. separator
  end
end

---apply transitional separator for the component
function M:apply_section_separators()
  if type(self.options.separator) ~= 'table' then
    return
  end
  if self.options.separator.left ~= nil and self.options.separator.left ~= '' then
    self.status = string.format('%%z{%s}%s', self.options.separator.left, self.status)
    self.strip_previous_separator = true
  end
  if self.options.separator.right ~= nil and self.options.separator.right ~= '' then
    self.status = string.format('%s%%Z{%s}', self.status, self.options.separator.right)
  end
end

---Add on click function description to already drawn item
function M:apply_on_click()
  if self.on_click_id then
    self.status = self:format_fn(self.on_click_id, self.status)
  end
end

---remove separator from tail of this component.
---called by lualine.utils.sections.draw_section to manage unnecessary separators
function M:strip_separator()
  if not self.applied_separator then
    self.applied_separator = ''
  end
  self.status = self.status:sub(1, (#self.status - #self.applied_separator))
  self.applied_separator = nil
  return self.status
end

function M:get_default_hl()
  if self.options.color_highlight then
    return self:format_hl(self.options.color_highlight)
  elseif self.default_hl then
    return self.default_hl
  else
    return modules.highlight.format_highlight(self.options.self.section)
  end
end

---create a lualine highlight for color
---@param color table|string|function defined color for hl
---@param hint string|nil hint for hl name
---@return table an identifier to later retrieve the hl for application
function M:create_hl(color, hint)
  hint = hint and self.options.component_name .. '_' .. hint or self.options.component_name
  return modules.highlight.create_component_highlight_group(color, hint, self.options, false)
end

---Get stl formatted hl group for hl_token
---@param hl_token table identifier received from create_hl or create_component_highlight_group
---@return string stl formatted hl group for hl_token
function M:format_hl(hl_token)
  return modules.highlight.component_format_highlight(hl_token)
end

---Wrap str with click format for function of id
---@param id number
---@param str string
---@return string
function M:format_fn(id, str)
  return string.format("%%%d@v:lua.require'lualine.utils.fn_store'.call_fn@%s%%T", id, str)
end

-- luacheck: push no unused args
---actual function that updates a component. Must be overwritten with component functionality
function M:update_status(is_focused) end
-- luacheck: pop

---driver code of the class
---@param default_highlight string default hl group of section where component resides
---@param is_focused boolean|number whether drawing for active or inactive statusline.
---@return string stl formatted rendering string for component
function M:draw(default_highlight, is_focused)
  self.status = ''
  self.applied_separator = ''

  if self.options.cond ~= nil and self.options.cond() ~= true then
    return self.status
  end
  self.default_hl = default_highlight
  local status = self:update_status(is_focused)
  if self.options.fmt then
    status = self.options.fmt(status or '', self)
  end
  if type(status) == 'string' and (#status > 0 or self.options.draw_empty) then
    self.status = status
    if #status > 0 then
      self:apply_icon()
      self:apply_padding()
    end
    self:apply_on_click()
    self:apply_highlights(default_highlight)
    self:apply_section_separators()
    self:apply_separator()
  end
  return self.status
end

return M


================================================
FILE: lua/lualine/components/branch/git_branch.lua
================================================
local M = {}

local require = require('lualine_require').require
local utils = require('lualine.utils.utils')

-- vars
local current_git_branch = ''
local current_git_dir = ''
local branch_cache = {} -- stores last known branch for a buffer
local active_bufnr = '0'
-- os specific path separator
local sep = package.config:sub(1, 1)
-- event watcher to watch head file
-- Use file watch for non Windows and poll for Windows.
-- Windows doesn't like file watch for some reason.
local file_changed = sep ~= '\\' and vim.loop.new_fs_event() or vim.loop.new_fs_poll()
local git_dir_cache = {} -- Stores git paths that we already know of

---sets git_branch variable to branch name or commit hash if not on branch
---@param head_file string full path of .git/HEAD file
local function get_git_head(head_file)
  local f_head = io.open(head_file)
  if f_head then
    local HEAD = f_head:read()
    f_head:close()
    local branch = HEAD:match('ref: refs/heads/(.+)$')
    if branch then
      current_git_branch = branch
    else
      current_git_branch = HEAD:sub(1, 6)
    end
  end
  return nil
end

---updates the current value of git_branch and sets up file watch on HEAD file
local function update_branch()
  active_bufnr = tostring(vim.api.nvim_get_current_buf())
  file_changed:stop()
  local git_dir = current_git_dir
  if git_dir and #git_dir > 0 then
    local head_file = git_dir .. sep .. 'HEAD'
    get_git_head(head_file)
    file_changed:start(
      head_file,
      sep ~= '\\' and {} or 1000,
      vim.schedule_wrap(function()
        -- reset file-watch
        update_branch()
      end)
    )
  else
    -- set to '' when git dir was not found
    current_git_branch = ''
  end
  branch_cache[vim.api.nvim_get_current_buf()] = current_git_branch
end

---updates the current value of current_git_branch and sets up file watch on HEAD file if value changed
local function update_current_git_dir(git_dir)
  if current_git_dir ~= git_dir then
    current_git_dir = git_dir
    update_branch()
  end
end

---returns full path to git directory for dir_path or current directory
---@param dir_path string|nil
---@return string|nil
function M.find_git_dir(dir_path)
  local git_dir = vim.env.GIT_DIR
  if git_dir then
    update_current_git_dir(git_dir)
    return git_dir
  end

  -- get file dir so we can search from that dir
  local file_dir = dir_path or vim.fn.expand('%:p:h')

  if package.loaded.oil then
    local oil = require('oil')
    local ok, dir = pcall(oil.get_current_dir)
    if ok and dir and dir ~= '' then
      file_dir = vim.fn.fnamemodify(dir, ':p:h')
    end
  end

  -- extract correct file dir from terminals
  if file_dir and file_dir:match('term://.*') then
    file_dir = vim.fn.expand(file_dir:gsub('term://(.+)//.+', '%1'))
  end

  local root_dir = file_dir
  -- Search upward for .git file or folder
  while root_dir do
    if git_dir_cache[root_dir] then
      git_dir = git_dir_cache[root_dir]
      break
    end
    local git_path = root_dir .. sep .. '.git'
    local git_file_stat = vim.loop.fs_stat(git_path)
    if git_file_stat then
      if git_file_stat.type == 'directory' then
        git_dir = git_path
      elseif git_file_stat.type == 'file' then
        -- separate git-dir or submodule is used
        local file = io.open(git_path)
        if file then
          git_dir = file:read()
          git_dir = git_dir and git_dir:match('gitdir: (.+)$')
          file:close()
        end
        -- submodule / relative file path
        if git_dir and git_dir:sub(1, 1) ~= sep and not git_dir:match('^%a:.*$') then
          git_dir = git_path:match('(.*).git') .. git_dir
        end
      end
      if git_dir then
        local head_file_stat = vim.loop.fs_stat(git_dir .. sep .. 'HEAD')
        if head_file_stat and head_file_stat.type == 'file' then
          break
        else
          git_dir = nil
        end
      end
    end
    root_dir = root_dir:match('(.*)' .. sep .. '.-')
  end

  git_dir_cache[file_dir] = git_dir
  if dir_path == nil then
    update_current_git_dir(git_dir)
  end
  return git_dir
end

---initializes git_branch module
function M.init()
  -- run watch head on load so branch is present when component is loaded
  M.find_git_dir()
  -- update branch state of BufEnter as different Buffer may be on different repos
  utils.define_autocmd('BufEnter', "lua require'lualine.components.branch.git_branch'.find_git_dir()")
end
function M.get_branch(bufnr)
  if vim.g.actual_curbuf ~= nil and active_bufnr ~= vim.g.actual_curbuf then
    -- Workaround for https://github.com/nvim-lualine/lualine.nvim/issues/286
    -- See upstream issue https://github.com/neovim/neovim/issues/15300
    -- Diff is out of sync re sync it.
    M.find_git_dir()
  end
  if bufnr then
    return branch_cache[bufnr] or ''
  else
    branch_cache[vim.api.nvim_get_current_buf()] = current_git_branch
  end
  return current_git_branch
end

return M


================================================
FILE: lua/lualine/components/branch/init.lua
================================================
-- Copyright (c) 2020-2021 shadmansaleh
-- MIT license, see LICENSE for more details.
local M = require('lualine.component'):extend()
local modules = require('lualine_require').lazy_require {
  git_branch = 'lualine.components.branch.git_branch',
  highlight = 'lualine.highlight',
  utils = 'lualine.utils.utils',
}

-- Initializer
M.init = function(self, options)
  M.super.init(self, options)
  if not self.options.icon then
    self.options.icon = '' -- e0a0
  end
  modules.git_branch.init()
end

M.update_status = function(_, is_focused)
  local buf = (not is_focused and vim.api.nvim_get_current_buf())
  local branch = modules.git_branch.get_branch(buf)
  return modules.utils.stl_escape(branch)
end

return M


================================================
FILE: lua/lualine/components/buffers/buffer.lua
================================================
local Buffer = require('lualine.utils.class'):extend()

local modules = require('lualine_require').lazy_require {
  highlight = 'lualine.highlight',
  utils = 'lualine.utils.utils',
}

---initialize a new buffer from opts
---@param opts table
function Buffer:init(opts)
  assert(opts.bufnr, 'Cannot create Buffer without bufnr')
  self.bufnr = opts.bufnr
  self.buf_index = opts.buf_index
  self.options = opts.options
  self.highlights = opts.highlights
  self:get_props()
end

function Buffer:is_current()
  return vim.api.nvim_get_current_buf() == self.bufnr
end

function Buffer:is_alternate()
  return vim.fn.bufnr('#') == self.bufnr and not self:is_current()
end

---setup icons, modified status for buffer
function Buffer:get_props()
  self.file = modules.utils.stl_escape(vim.api.nvim_buf_get_name(self.bufnr))
  self.buftype = vim.api.nvim_buf_get_option(self.bufnr, 'buftype')
  self.filetype = vim.api.nvim_buf_get_option(self.bufnr, 'filetype')
  local modified = self.options.show_modified_status and vim.api.nvim_buf_get_option(self.bufnr, 'modified')
  self.modified_icon = modified and self.options.symbols.modified or ''
  self.alternate_file_icon = self:is_alternate() and self.options.symbols.alternate_file or ''
  self.icon = ''
  if self.options.icons_enabled then
    local dev
    local status, _ = pcall(require, 'nvim-web-devicons')
    if not status then
      dev, _ = '', ''
    elseif self.filetype == 'TelescopePrompt' then
      dev, _ = require('nvim-web-devicons').get_icon('telescope')
    elseif self.filetype == 'fugitive' then
      dev, _ = require('nvim-web-devicons').get_icon('git')
    elseif self.filetype == 'vimwiki' then
      dev, _ = require('nvim-web-devicons').get_icon('markdown')
    elseif self.buftype == 'terminal' then
      dev, _ = require('nvim-web-devicons').get_icon('zsh')
    elseif vim.fn.isdirectory(self.file) == 1 then
      dev, _ = self.options.symbols.directory, nil
    else
      dev, _ = require('nvim-web-devicons').get_icon(self.file, vim.fn.expand('#' .. self.bufnr .. ':e'))
    end
    if dev then
      self.icon = dev .. ' '
    end
  end
end

---returns line configured for handling mouse click
---@param name string
---@return string
function Buffer:configure_mouse_click(name)
  return string.format('%%%s@LualineSwitchBuffer@%s%%T', self.bufnr, name)
end

---returns rendered buffer
---@return string
function Buffer:render()
  local name = self:name()
  if self.options.fmt then
    name = self.options.fmt(name or '', self)
  end

  if self.ellipse then -- show ellipsis
    name = '...'
  else
    name = self:apply_mode(name)
  end
  name = Buffer.apply_padding(name, self.options.padding)
  self.len = vim.fn.strchars(name)

  -- setup for mouse clicks
  local line = self:configure_mouse_click(name)
  -- apply highlight
  line = modules.highlight.component_format_highlight(self.highlights[(self.current and 'active' or 'inactive')])
    .. line

  -- apply separators
  if self.options.self.section < 'x' and not self.first then
    local sep_before = self:separator_before()
    line = sep_before .. line
    self.len = self.len + vim.fn.strchars(sep_before)
  elseif self.options.self.section >= 'x' and not self.last then
    local sep_after = self:separator_after()
    line = line .. sep_after
    self.len = self.len + vim.fn.strchars(sep_after)
  end
  return line
end

---apply separator before current buffer
---@return string
function Buffer:separator_before()
  if self.current or self.aftercurrent then
    return '%Z{' .. self.options.section_separators.left .. '}'
  else
    return self.options.component_separators.left
  end
end

---apply separator after current buffer
---@return string
function Buffer:separator_after()
  if self.current or self.beforecurrent then
    return '%z{' .. self.options.section_separators.right .. '}'
  else
    return self.options.component_separators.right
  end
end

---returns name of current buffer after filtering special buffers
---@return string
function Buffer:name()
  if self.options.filetype_names[self.filetype] then
    return self.options.filetype_names[self.filetype]
  elseif self.buftype == 'help' then
    return 'help:' .. vim.fn.fnamemodify(self.file, ':t:r')
  elseif self.buftype == 'terminal' then
    local match = string.match(vim.split(self.file, ' ')[1], 'term:.*:(%a+)')
    return match ~= nil and match or vim.fn.fnamemodify(vim.env.SHELL, ':t')
  elseif self.buftype == 'quickfix' then
    local is_loclist = 0 ~= vim.fn.getloclist(0, { filewinid = 1 }).filewinid
    return is_loclist and 'Location list' or 'Quickfix List'
  elseif vim.fn.isdirectory(self.file) == 1 then
    return vim.fn.fnamemodify(self.file, ':p:.')
  elseif self.file == '' then
    return '[No Name]'
  end

  local name
  if self.options.show_filename_only then
    name = vim.fn.fnamemodify(self.file, ':t')
  else
    name = vim.fn.pathshorten(vim.fn.fnamemodify(self.file, ':p:.'))
  end
  if self.options.hide_filename_extension then
    name = vim.fn.fnamemodify(name, ':r')
  end
  return name
end

---adds spaces to left and right
function Buffer.apply_padding(str, padding)
  local l_padding, r_padding = 1, 1
  if type(padding) == 'number' then
    l_padding, r_padding = padding, padding
  elseif type(padding) == 'table' then
    l_padding, r_padding = padding.left or 0, padding.right or 0
  end
  return string.rep(' ', l_padding) .. str .. string.rep(' ', r_padding)
end

function Buffer:apply_mode(name)
  if self.options.mode == 0 then
    return string.format('%s%s%s%s', self.alternate_file_icon, self.icon, name, self.modified_icon)
  end

  if self.options.mode == 1 then
    return string.format('%s%s %s%s', self.alternate_file_icon, self.buf_index or '', self.icon, self.modified_icon)
  end

  if self.options.mode == 2 then
    return string.format(
      '%s%s %s%s%s',
      self.alternate_file_icon,
      self.buf_index or '',
      self.icon,
      name,
      self.modified_icon
    )
  end

  if self.options.mode == 3 then
    return string.format('%s%s %s%s', self.alternate_file_icon, self.bufnr or '', self.icon, self.modified_icon)
  end

  -- if self.options.mode == 4 then
  return string.format('%s%s %s%s%s', self.alternate_file_icon, self.bufnr or '', self.icon, name, self.modified_icon)
end

return Buffer


================================================
FILE: lua/lualine/components/buffers/init.lua
================================================
-- Copyright (c) 2020-2021 shadmansaleh
-- MIT license, see LICENSE for more details.
local require = require('lualine_require').require
local Buffer = require('lualine.components.buffers.buffer')
local M = require('lualine.component'):extend()
local highlight = require('lualine.highlight')

local default_options = {
  show_filename_only = true,
  hide_filename_extension = false,
  show_modified_status = true,
  mode = 0,
  max_length = 0,
  filetype_names = {
    TelescopePrompt = 'Telescope',
    dashboard = 'Dashboard',
    packer = 'Packer',
    fzf = 'FZF',
    alpha = 'Alpha',
  },
  use_mode_colors = false,
  buffers_color = {
    active = nil,
    inactive = nil,
  },
  symbols = {
    modified = ' ●',
    alternate_file = '#',
    directory = '',
  },
}

-- This function is duplicated in tabs
---returns the proper hl for buffer in section. Used for setting default highlights
---@param section string name of section buffers component is in
---@param is_active boolean
---@return string hl name
local function get_hl(section, is_active)
  local suffix = is_active and highlight.get_mode_suffix() or '_inactive'
  local section_redirects = {
    lualine_x = 'lualine_c',
    lualine_y = 'lualine_b',
    lualine_z = 'lualine_a',
  }
  if section_redirects[section] then
    section = highlight.highlight_exists(section .. suffix) and section or section_redirects[section]
  end
  return section .. suffix
end

function M:init(options)
  M.super.init(self, options)
  -- if use_mode_colors is set, use a function so that the colors update
  local default_active = options.use_mode_colors
      and function()
        return get_hl('lualine_' .. options.self.section, true)
      end
    or get_hl('lualine_' .. options.self.section, true)
  default_options.buffers_color = {
    active = default_active,
    inactive = get_hl('lualine_' .. options.self.section, false),
  }
  self.options = vim.tbl_deep_extend('keep', self.options or {}, default_options)
  if self.options.component_name == 'buffers' then
    self.highlights = {
      active = self:create_hl(self.options.buffers_color.active, 'active'),
      inactive = self:create_hl(self.options.buffers_color.inactive, 'inactive'),
    }
  end
end

function M:new_buffer(bufnr, buf_index)
  bufnr = bufnr or vim.api.nvim_get_current_buf()
  buf_index = buf_index or ''
  return Buffer:new {
    bufnr = bufnr,
    buf_index = buf_index,
    options = self.options,
    highlights = self.highlights,
  }
end

function M:buffers()
  local buffers = {}
  M.bufpos2nr = {}
  for b = 1, vim.fn.bufnr('$') do
    if vim.fn.buflisted(b) ~= 0 and vim.api.nvim_buf_get_option(b, 'buftype') ~= 'quickfix' then
      buffers[#buffers + 1] = self:new_buffer(b, #buffers + 1)
      M.bufpos2nr[#buffers] = b
    end
  end

  return buffers
end

function M:update_status()
  local data = {}
  local buffers = self:buffers()
  local current = -2
  -- mark the first, last, current, before current, after current buffers
  -- for rendering
  if buffers[1] then
    buffers[1].first = true
  end
  if buffers[#buffers] then
    buffers[#buffers].last = true
  end
  for i, buffer in ipairs(buffers) do
    if buffer:is_current() then
      buffer.current = true
      current = i
    end
  end
  if buffers[current - 1] then
    buffers[current - 1].beforecurrent = true
  end
  if buffers[current + 1] then
    buffers[current + 1].aftercurrent = true
  end

  local max_length = self.options.max_length
  if type(max_length) == 'function' then
    max_length = max_length(self)
  end

  if max_length == 0 then
    max_length = math.floor(2 * vim.o.columns / 3)
  end
  local total_length
  for i, buffer in pairs(buffers) do
    if buffer.current then
      current = i
    end
  end
  -- start drawing from current buffer and draw left and right of it until
  -- all buffers are drawn or max_length has been reached.
  if current == -2 then
    local b = self:new_buffer()
    b.current = true
    if self.options.self.section < 'x' then
      b.last = true
      if #buffers > 0 then
        buffers[#buffers].last = nil
      end
      buffers[#buffers + 1] = b
      current = #buffers
    else
      b.first = true
      if #buffers > 0 then
        buffers[1].first = nil
      end
      table.insert(buffers, 1, b)
      current = 1
    end
  end
  local current_buffer = buffers[current]
  data[#data + 1] = current_buffer:render()
  total_length = current_buffer.len
  local i = 0
  local before, after
  while true do
    i = i + 1
    before = buffers[current - i]
    after = buffers[current + i]
    local rendered_before, rendered_after
    if before == nil and after == nil then
      break
    end
    -- draw left most undrawn buffer if fits in max_length
    if before then
      rendered_before = before:render()
      total_length = total_length + before.len
      if total_length > max_length then
        break
      end
      table.insert(data, 1, rendered_before)
    end
    -- draw right most undrawn buffer if fits in max_length
    if after then
      rendered_after = after:render()
      total_length = total_length + after.len
      if total_length > max_length then
        break
      end
      data[#data + 1] = rendered_after
    end
  end
  -- draw ellipsis (...) on relevant sides if all buffers don't fit in max_length
  if total_length > max_length then
    if before ~= nil then
      before.ellipse = true
      before.first = true
      table.insert(data, 1, before:render())
    end
    if after ~= nil then
      after.ellipse = true
      after.last = true
      data[#data + 1] = after:render()
    end
  end

  return table.concat(data)
end

function M:draw()
  self.status = ''
  self.applied_separator = ''

  if self.options.cond ~= nil and self.options.cond() ~= true then
    return self.status
  end
  local status = self:update_status()
  if type(status) == 'string' and #status > 0 then
    self.status = status
    self:apply_section_separators()
    self:apply_separator()
  end
  return self.status
end

function M.buffer_jump(buf_pos, bang)
  if buf_pos == '$' then
    buf_pos = #M.bufpos2nr
  else
    buf_pos = tonumber(buf_pos)
  end
  if buf_pos < 1 or buf_pos > #M.bufpos2nr then
    if bang ~= '!' then
      error('Error: Unable to jump buffer position out of range')
    else
      return
    end
  end
  vim.api.nvim_set_current_buf(M.bufpos2nr[buf_pos])
end

vim.cmd([[
  function! LualineSwitchBuffer(bufnr, mouseclicks, mousebutton, modifiers)
    execute ":buffer " . a:bufnr
  endfunction

  command! -nargs=1 -bang LualineBuffersJump call v:lua.require'lualine.components.buffers'.buffer_jump(<f-args>, "<bang>")
]])

return M


================================================
FILE: lua/lualine/components/datetime.lua
================================================
-- Copyright (c) 2023 Willothy
-- MIT license, see LICENSE for more details.
local lualine_require = require('lualine_require')
local M = lualine_require.require('lualine.component'):extend()

local default_options = {
  -- default, us, uk, iso, or format (ex. "%d/%m/%Y ...")
  style = 'default',
}

function M:init(options)
  M.super.init(self, options)
  self.options = vim.tbl_deep_extend('keep', self.options or {}, default_options)
end

function M:update_status()
  local fmt = self.options.style
  if self.options.style == 'default' then
    fmt = '%A, %B %d | %H:%M'
  elseif self.options.style == 'us' then
    fmt = '%m/%d/%Y'
  elseif self.options.style == 'uk' then
    fmt = '%d/%m/%Y'
  elseif self.options.style == 'iso' then
    fmt = '%Y-%m-%d'
  end

  return os.date(fmt)
end

return M


================================================
FILE: lua/lualine/components/diagnostics/config.lua
================================================
local require = require('lualine_require').require
local utils = require('lualine.utils.utils')
local M = {}

-- default symbols for diagnostics component
M.symbols = {
  icons = {
    error = '󰅚 ', -- x000f015a
    warn = '󰀪 ', -- x000f002a
    info = '󰋽 ', -- x000f02fd
    hint = '󰌶 ', -- x000f0336
  },
  no_icons = { error = 'E:', warn = 'W:', info = 'I:', hint = 'H:' },
}

-- default options for diagnostics component
M.options = {
  colored = true,
  update_in_insert = false,
  always_visible = false,
  sources = { 'nvim_diagnostic', 'coc' },
  sections = { 'error', 'warn', 'info', 'hint' },
}

function M.apply_default_colors(opts)
  local default_diagnostics_color = {
    error = {
      fg = utils.extract_color_from_hllist(
        { 'fg', 'sp' },
        { 'DiagnosticError', 'LspDiagnosticsDefaultError', 'DiffDelete' },
        '#e32636'
      ),
    },
    warn = {
      fg = utils.extract_color_from_hllist(
        { 'fg', 'sp' },
        { 'DiagnosticWarn', 'LspDiagnosticsDefaultWarning', 'DiffText' },
        '#ffa500'
      ),
    },
    info = {
      fg = utils.extract_color_from_hllist(
        { 'fg', 'sp' },
        { 'DiagnosticInfo', 'LspDiagnosticsDefaultInformation', 'Normal' },
        '#ffffff'
      ),
    },
    hint = {
      fg = utils.extract_color_from_hllist(
        { 'fg', 'sp' },
        { 'DiagnosticHint', 'LspDiagnosticsDefaultHint', 'DiffChange' },
        '#273faf'
      ),
    },
  }
  opts.diagnostics_color = vim.tbl_deep_extend('keep', opts.diagnostics_color or {}, default_diagnostics_color)
end

return M


================================================
FILE: lua/lualine/components/diagnostics/init.lua
================================================
-- Copyright (c) 2020-2021 hoob3rt
-- MIT license, see LICENSE for more details.
local lualine_require = require('lualine_require')
local modules = lualine_require.lazy_require {
  default_config = 'lualine.components.diagnostics.config',
  sources = 'lualine.components.diagnostics.sources',
  highlight = 'lualine.highlight',
  utils = 'lualine.utils.utils',
  utils_notices = 'lualine.utils.notices',
}

local M = lualine_require.require('lualine.component'):extend()

M.diagnostics_sources = modules.sources.sources
M.get_diagnostics = modules.sources.get_diagnostics

-- Initializer
function M:init(options)
  -- Run super()
  M.super.init(self, options)
  -- Apply default options
  modules.default_config.apply_default_colors(self.options)
  self.options = vim.tbl_deep_extend('keep', self.options or {}, modules.default_config.options)
  -- Apply default symbols
  self.symbols = vim.tbl_extend(
    'keep',
    self.options.symbols or {},
    self.options.icons_enabled ~= false and modules.default_config.symbols.icons
      or modules.default_config.symbols.no_icons
  )
  -- Initialize highlight groups
  if self.options.colored then
    self.highlight_groups = {
      error = self:create_hl(self.options.diagnostics_color.error, 'error'),
      warn = self:create_hl(self.options.diagnostics_color.warn, 'warn'),
      info = self:create_hl(self.options.diagnostics_color.info, 'info'),
      hint = self:create_hl(self.options.diagnostics_color.hint, 'hint'),
    }
  end

  -- Initialize variable to store last update so we can use it in insert
  -- mode for no update_in_insert
  self.last_diagnostics_count = {}

  -- Error out no source
  if #self.options.sources < 1 then
    modules.utils_notices.add_notice(
      '### diagnostics.sources\n\nno sources for diagnostics configured.\nPlease specify which diagnostics source you want lualine to use with `sources` option.\n'
    )
  end
end

function M:update_status()
  local bufnr = vim.api.nvim_get_current_buf()
  local diagnostics_count
  local result = {}
  if self.options.update_in_insert or vim.api.nvim_get_mode().mode:sub(1, 1) ~= 'i' then
    local error_count, warning_count, info_count, hint_count = 0, 0, 0, 0
    local diagnostic_data = modules.sources.get_diagnostics(self.options.sources)
    -- sum all the counts
    for _, data in pairs(diagnostic_data) do
      error_count = error_count + data.error
      warning_count = warning_count + data.warn
      info_count = info_count + data.info
      hint_count = hint_count + data.hint
    end
    diagnostics_count = {
      error = error_count,
      warn = warning_count,
      info = info_count,
      hint = hint_count,
    }
    -- Save count for insert mode
    self.last_diagnostics_count[bufnr] = diagnostics_count
  else -- Use cached count in insert mode with update_in_insert disabled
    diagnostics_count = self.last_diagnostics_count[bufnr] or { error = 0, warn = 0, info = 0, hint = 0 }
  end

  local always_visible = false
  if type(self.options.always_visible) == 'boolean' then
    always_visible = self.options.always_visible
  elseif type(self.options.always_visible) == 'function' then
    always_visible = self.options.always_visible()
  end

  -- format the counts with symbols and highlights
  if self.options.colored then
    local colors, bgs = {}, {}
    for name, hl in pairs(self.highlight_groups) do
      colors[name] = self:format_hl(hl)
      bgs[name] = modules.utils.extract_highlight_colors(colors[name]:match('%%#(.-)#'), 'bg')
    end
    local previous_section, padding
    for _, section in ipairs(self.options.sections) do
      if diagnostics_count[section] ~= nil and (always_visible or diagnostics_count[section] > 0) then
        padding = previous_section and (bgs[previous_section] ~= bgs[section]) and ' ' or ''
        previous_section = section
        table.insert(result, colors[section] .. padding .. self.symbols[section] .. diagnostics_count[section])
      end
    end
  else
    for _, section in ipairs(self.options.sections) do
      if diagnostics_count[section] ~= nil and (always_visible or diagnostics_count[section] > 0) then
        table.insert(result, self.symbols[section] .. diagnostics_count[section])
      end
    end
  end
  return table.concat(result, ' ')
end

return M


================================================
FILE: lua/lualine/components/diagnostics/sources.lua
================================================
local M = {}

---functions that how how to retrieve diagnostics from specific source.
---returns error_count:number, warning_count:number,
---        info_count:number, hint_count:number
M.sources = {
  nvim_lsp = function()
    local error_count, warning_count, info_count, hint_count
    local diagnostics = vim.diagnostic.get(0)
    local count = { 0, 0, 0, 0 }
    for _, diagnostic in ipairs(diagnostics) do
      if vim.startswith(vim.diagnostic.get_namespace(diagnostic.namespace).name, 'vim.lsp') then
        count[diagnostic.severity] = count[diagnostic.severity] + 1
      end
    end
    error_count = count[vim.diagnostic.severity.ERROR]
    warning_count = count[vim.diagnostic.severity.WARN]
    info_count = count[vim.diagnostic.severity.INFO]
    hint_count = count[vim.diagnostic.severity.HINT]
    return error_count, warning_count, info_count, hint_count
  end,
  nvim_workspace_diagnostic = function()
    local diag_severity = vim.diagnostic.severity

    local function workspace_diag(severity)
      local count = vim.diagnostic.get(nil, { severity = severity })
      return vim.tbl_count(count)
    end

    return workspace_diag(diag_severity.ERROR),
      workspace_diag(diag_severity.WARN),
      workspace_diag(diag_severity.INFO),
      workspace_diag(diag_severity.HINT)
  end,
  nvim_diagnostic = function()
    local count

    if vim.diagnostic.count ~= nil then -- neovim >= 0.10.0
      count = vim.diagnostic.count(0)
      return count[vim.diagnostic.severity.ERROR] or 0,
        count[vim.diagnostic.severity.WARN] or 0,
        count[vim.diagnostic.severity.INFO] or 0,
        count[vim.diagnostic.severity.HINT] or 0
    end

    -- fallback
    local diagnostics = vim.diagnostic.get(0)
    count = { 0, 0, 0, 0 }
    for _, diagnostic in ipairs(diagnostics) do
      count[diagnostic.severity] = count[diagnostic.severity] + 1
    end
    return count[vim.diagnostic.severity.ERROR],
      count[vim.diagnostic.severity.WARN],
      count[vim.diagnostic.severity.INFO],
      count[vim.diagnostic.severity.HINT]
  end,
  coc = function()
    local data = vim.b.coc_diagnostic_info
    if data then
      return data.error, data.warning, data.information, data.hint
    else
      return 0, 0, 0, 0
    end
  end,
  ale = function()
    local ok, data = pcall(vim.fn['ale#statusline#Count'], vim.api.nvim_get_current_buf())
    if ok then
      return data.error + data.style_error, data.warning + data.style_warning, data.info, 0
    else
      return 0, 0, 0, 0
    end
  end,
  vim_lsp = function()
    local ok, data = pcall(vim.fn['lsp#get_buffer_diagnostics_counts'])
    if ok then
      return data.error, data.warning, data.information, data.hint
    else
      return 0, 0, 0, 0
    end
  end,
}

---returns list of diagnostics count from all sources
---@param sources table list of sources
---@return table {{error_count, warning_count, info_count, hint_count}}
M.get_diagnostics = function(sources)
  local result = {}
  for index, source in ipairs(sources) do
    if type(source) == 'string' then
      local error_count, warning_count, info_count, hint_count = M.sources[source]()
      result[index] = {
        error = error_count,
        warn = warning_count,
        info = info_count,
        hint = hint_count,
      }
    elseif type(source) == 'function' then
      local source_result = source()
      source_result = type(source_result) == 'table' and source_result or {}
      result[index] = {
        error = source_result.error or 0,
        warn = source_result.warn or 0,
        info = source_result.info or 0,
        hint = source_result.hint or 0,
      }
    end
  end
  return result
end

return M


================================================
FILE: lua/lualine/components/diff/git_diff.lua
================================================
local lualine_require = require('lualine_require')
local modules = lualine_require.lazy_require {
  utils = 'lualine.utils.utils',
  Job = 'lualine.utils.job',
}

local M = {}

-- Vars
-- variable to store git diff stats
local git_diff = nil
-- accumulates output from diff process
local diff_output_cache = {}
-- variable to store git_diff job
local diff_job = nil

local active_bufnr = '0'
local diff_cache = {} -- Stores last known value of diff of a buffer

---initialize the module
---param opts table
function M.init(opts)
  if type(opts.source) == 'function' then
    M.src = opts.source
  else
    modules.utils.define_autocmd('BufEnter', "lua require'lualine.components.diff.git_diff'.update_diff_args()")
    modules.utils.define_autocmd('BufWritePost', "lua require'lualine.components.diff.git_diff'.update_git_diff()")
    M.update_diff_args()
  end
end

---Api to get git sign count
---scheme :
---{
---   added = added_count,
---   modified = modified_count,
---   removed = removed_count,
---}
---error_code = { added = -1, modified = -1, removed = -1 }
---@param bufnr number|nil
function M.get_sign_count(bufnr)
  if bufnr then
    return diff_cache[bufnr]
  end
  if M.src then
    git_diff = M.src()
    diff_cache[vim.api.nvim_get_current_buf()] = git_diff
  elseif vim.g.actual_curbuf ~= nil and active_bufnr ~= vim.g.actual_curbuf then
    -- Workaround for https://github.com/nvim-lualine/lualine.nvim/issues/286
    -- See upstream issue https://github.com/neovim/neovim/issues/15300
    -- Diff is out of sync re sync it.
    M.update_diff_args()
  end
  return git_diff
end

---process diff data and update git_diff{ added, removed, modified }
---@param data string output on stdout od git diff job
local function process_diff(data)
  -- Adapted from https://github.com/wbthomason/nvim-vcs.lua
  local added, removed, modified = 0, 0, 0
  for _, line in ipairs(data) do
    if string.find(line, [[^@@ ]]) then
      local tokens = vim.fn.matchlist(line, [[^@@ -\v(\d+),?(\d*) \+(\d+),?(\d*)]])
      local line_stats = {
        mod_count = tokens[3] == nil and 0 or tokens[3] == '' and 1 or tonumber(tokens[3]),
        new_count = tokens[5] == nil and 0 or tokens[5] == '' and 1 or tonumber(tokens[5]),
      }

      if line_stats.mod_count == 0 and line_stats.new_count > 0 then
        added = added + line_stats.new_count
      elseif line_stats.mod_count > 0 and line_stats.new_count == 0 then
        removed = removed + line_stats.mod_count
      else
        local min = math.min(line_stats.mod_count, line_stats.new_count)
        modified = modified + min
        added = added + line_stats.new_count - min
        removed = removed + line_stats.mod_count - min
      end
    end
  end
  git_diff = { added = added, modified = modified, removed = removed }
end

---updates the job args
function M.update_diff_args()
  -- Don't show git diff when current buffer doesn't have a filename
  active_bufnr = tostring(vim.api.nvim_get_current_buf())
  if #vim.fn.expand('%') == 0 then
    M.diff_args = nil
    git_diff = nil
    return
  end
  M.diff_args = {
    cmd = {
      'git',
      '-C',
      vim.fn.expand('%:h'),
      '--no-pager',
      'diff',
      '--no-color',
      '--no-ext-diff',
      '-U0',
      '--',
      vim.fn.expand('%:t'),
    },
    on_stdout = function(_, data)
      if next(data) then
        diff_output_cache = vim.list_extend(diff_output_cache, data)
      end
    end,
    on_stderr = function(_, data)
      data = table.concat(data, '\n')
      if #data > 0 then
        git_diff = nil
        diff_output_cache = {}
      end
    end,
    on_exit = function()
      if #diff_output_cache > 0 then
        process_diff(diff_output_cache)
      else
        git_diff = { added = 0, modified = 0, removed = 0 }
      end
      diff_cache[vim.api.nvim_get_current_buf()] = git_diff
    end,
  }
  M.update_git_diff()
end

---update git_diff variable
function M.update_git_diff()
  if M.diff_args then
    diff_output_cache = {}
    if diff_job then
      diff_job:stop()
    end
    diff_job = modules.Job(M.diff_args)
    if diff_job then
      diff_job:start()
    end
  end
end

return M


================================================
FILE: lua/lualine/components/diff/init.lua
================================================
-- Copyright (c) 2020-2021 shadmansaleh
-- MIT license, see LICENSE for more details.
local lualine_require = require('lualine_require')
local modules = lualine_require.lazy_require {
  git_diff = 'lualine.components.diff.git_diff',
  utils = 'lualine.utils.utils',
  utils_notices = 'lualine.utils.notices',
  highlight = 'lualine.highlight',
}
local M = lualine_require.require('lualine.component'):extend()

local default_options = {
  colored = true,
  symbols = { added = '+', modified = '~', removed = '-' },
}

local function apply_default_colors(opts)
  local default_diff_color = {
    added = {
      fg = modules.utils.extract_color_from_hllist(
        'fg',
        { 'LuaLineDiffAdd', 'GitSignsAdd', 'GitGutterAdd', 'DiffAdded', 'DiffAdd' },
        '#90ee90'
      ),
    },
    modified = {
      fg = modules.utils.extract_color_from_hllist(
        'fg',
        { 'LuaLineDiffChange', 'GitSignsChange', 'GitGutterChange', 'DiffChanged', 'DiffChange' },
        '#f0e130'
      ),
    },
    removed = {
      fg = modules.utils.extract_color_from_hllist(
        'fg',
        { 'LuaLineDiffDelete', 'GitSignsDelete', 'GitGutterDelete', 'DiffRemoved', 'DiffDelete' },
        '#ff0038'
      ),
    },
  }
  opts.diff_color = vim.tbl_deep_extend('keep', opts.diff_color or {}, default_diff_color)
end

-- Initializer
function M:init(options)
  M.super.init(self, options)
  apply_default_colors(self.options)
  self.options = vim.tbl_deep_extend('keep', self.options or {}, default_options)
  -- create highlights and save highlight_name in highlights table
  if self.options.colored then
    self.highlights = {
      added = self:create_hl(self.options.diff_color.added, 'added'),
      modified = self:create_hl(self.options.diff_color.modified, 'modified'),
      removed = self:create_hl(self.options.diff_color.removed, 'removed'),
    }
  end
  modules.git_diff.init(self.options)
end

-- Function that runs every time statusline is updated
function M:update_status(is_focused)
  local git_diff = modules.git_diff.get_sign_count((not is_focused and vim.api.nvim_get_current_buf()))
  if git_diff == nil then
    return ''
  end

  local colors = {}
  if self.options.colored then
    -- load the highlights and store them in colors table
    for name, highlight_name in pairs(self.highlights) do
      colors[name] = self:format_hl(highlight_name)
    end
  end

  local result = {}
  -- loop though data and load available sections in result table
  for _, name in ipairs { 'added', 'modified', 'removed' } do
    if git_diff[name] and git_diff[name] > 0 then
      if self.options.colored then
        table.insert(result, colors[name] .. self.options.symbols[name] .. git_diff[name])
      else
        table.insert(result, self.options.symbols[name] .. git_diff[name])
      end
    end
  end
  if #result > 0 then
    return table.concat(result, ' ')
  else
    return ''
  end
end

return M


================================================
FILE: lua/lualine/components/encoding.lua
================================================
-- Copyright (c) 2020-2021 hoob3rt
-- MIT license, see LICENSE for more details.
local lualine_require = require('lualine_require')
local M = lualine_require.require('lualine.component'):extend()

local default_options = {
  -- Show '[BOM]' when the file has a byte-order mark
  show_bomb = false,
}

function M:init(options)
  M.super.init(self, options)
  self.options = vim.tbl_deep_extend('keep', self.options or {}, default_options)
end

function M:update_status()
  local show_bomb = self.options.show_bomb

  local result = vim.opt.fileencoding:get()

  if not show_bomb then
    return result
  end

  if vim.opt.bomb:get() then
    result = result .. ' [BOM]'
  end

  return result
end

return M


================================================
FILE: lua/lualine/components/fileformat.lua
================================================
-- Copyright (c) 2020-2021 shadmansaleh
-- MIT license, see LICENSE for more details.
local M = require('lualine.component'):extend()

-- stylua: ignore
local symbols = {
  unix = '', -- e712
  dos = '', -- e70f
  mac = '', -- e711
}

-- Initializer
function M:init(options)
  -- Run super()
  M.super.init(self, options)
  -- Apply default symbols
  self.symbols = vim.tbl_extend('keep', self.options.symbols or {}, symbols)
end

-- Function that runs every time statusline is updated
function M:update_status()
  local format = vim.bo.fileformat
  if self.options.icons_enabled then
    return self.symbols[format] or format
  else
    return format
  end
end

return M


================================================
FILE: lua/lualine/components/filename.lua
================================================
-- Copyright (c) 2020-2021 shadmansaleh
-- MIT license, see LICENSE for more details.
local M = require('lualine.component'):extend()

local modules = require('lualine_require').lazy_require {
  utils = 'lualine.utils.utils',
}

local default_options = {
  symbols = {
    modified = '[+]',
    readonly = '[-]',
    unnamed = '[No Name]',
    newfile = '[New]',
  },
  file_status = true,
  newfile_status = false,
  path = 0,
  shorting_target = 40,
}

local function is_new_file()
  local filename = vim.fn.expand('%')
  return filename ~= ''
    and filename:match('^%a+://') == nil
    and vim.bo.buftype == ''
    and vim.fn.filereadable(filename) == 0
end

---shortens path by turning apple/orange -> a/orange
---@param path string
---@param sep string path separator
---@param max_len integer maximum length of the full filename string
---@return string
local function shorten_path(path, sep, max_len)
  local len = #path
  if len <= max_len then
    return path
  end

  local segments = vim.split(path, sep)
  for idx = 1, #segments - 1 do
    if len <= max_len then
      break
    end

    local segment = segments[idx]
    local shortened = segment:sub(1, vim.startswith(segment, '.') and 2 or 1)
    segments[idx] = shortened
    len = len - (#segment - #shortened)
  end

  return table.concat(segments, sep)
end

local function filename_and_parent(path, sep)
  local segments = vim.split(path, sep)
  if #segments == 0 then
    return path
  elseif #segments == 1 then
    return segments[#segments]
  else
    return table.concat({ segments[#segments - 1], segments[#segments] }, sep)
  end
end

M.init = function(self, options)
  M.super.init(self, options)
  self.options = vim.tbl_deep_extend('keep', self.options or {}, default_options)
end

M.update_status = function(self)
  local path_separator = package.config:sub(1, 1)
  local data
  if self.options.path == 1 then
    -- relative path
    data = vim.fn.expand('%:~:.')
  elseif self.options.path == 2 then
    -- absolute path
    data = vim.fn.expand('%:p')
  elseif self.options.path == 3 then
    -- absolute path, with tilde
    data = vim.fn.expand('%:p:~')
  elseif self.options.path == 4 then
    -- filename and immediate parent
    data = filename_and_parent(vim.fn.expand('%:p:~'), path_separator)
  else
    -- just filename
    data = vim.fn.expand('%:t')
  end

  if data == '' then
    data = self.options.symbols.unnamed
  end

  local shorting_target = self.options.shorting_target
  if type(shorting_target) == 'function' then
    shorting_target = shorting_target()
  end

  if shorting_target ~= 0 then
    local windwidth = self.options.globalstatus and vim.go.columns or vim.fn.winwidth(0)
    local estimated_space_available = windwidth - shorting_target

    data = shorten_path(data, path_separator, estimated_space_available)
  end

  data = modules.utils.stl_escape(data)

  local symbols = {}
  if self.options.file_status then
    if vim.bo.modified then
      table.insert(symbols, self.options.symbols.modified)
    end
    if vim.bo.modifiable == false or vim.bo.readonly == true then
      table.insert(symbols, self.options.symbols.readonly)
    end
  end

  if self.options.newfile_status and is_new_file() then
    table.insert(symbols, self.options.symbols.newfile)
  end

  return data .. (#symbols > 0 and ' ' .. table.concat(symbols, '') or '')
end

return M


================================================
FILE: lua/lualine/components/filesize.lua
================================================
-- Copyright (c) 2020-2021 shadmansaleh
-- MIT license, see LICENSE for more details.
local function filesize()
  local file = vim.fn.expand('%:p')
  if file == nil or #file == 0 then
    return ''
  end
  local size = vim.fn.getfsize(file)
  if size <= 0 then
    return ''
  end

  local suffixes = { 'b', 'k', 'm', 'g' }

  local i = 1
  while size > 1024 and i < #suffixes do
    size = size / 1024
    i = i + 1
  end

  local format = i == 1 and '%d%s' or '%.1f%s'
  return string.format(format, size, suffixes[i])
end

return filesize


================================================
FILE: lua/lualine/components/filetype.lua
================================================
-- Copyright (c) 2020-2021 hoob3rt
-- MIT license, see LICENSE for more details.
local lualine_require = require('lualine_require')
local modules = lualine_require.lazy_require {
  highlight = 'lualine.highlight',
  utils = 'lualine.utils.utils',
}
local M = lualine_require.require('lualine.component'):extend()

local default_options = {
  colored = true,
  icon_only = false,
}

function M:init(options)
  M.super.init(self, options)
  self.options = vim.tbl_deep_extend('keep', self.options or {}, default_options)
  self.icon_hl_cache = {}
end

function M.update_status()
  local ft = vim.bo.filetype or ''
  return modules.utils.stl_escape(ft)
end

function M:apply_icon()
  if not self.options.icons_enabled then
    return
  end

  local icon, icon_highlight_group
  local ok, devicons = pcall(require, 'nvim-web-devicons')
  if ok then
    icon, icon_highlight_group = devicons.get_icon(vim.fn.expand('%:t'))
    if icon == nil then
      icon, icon_highlight_group = devicons.get_icon_by_filetype(vim.bo.filetype)
    end

    if icon == nil and icon_highlight_group == nil then
      icon = ''
      icon_highlight_group = 'DevIconDefault'
    end
    if icon then
      icon = icon .. ' '
    end
    if self.options.colored then
      local highlight_color = modules.utils.extract_highlight_colors(icon_highlight_group, 'fg')
      if highlight_color then
        local default_highlight = self:get_default_hl()
        local icon_highlight = self.icon_hl_cache[highlight_color]
        if not icon_highlight or not modules.highlight.highlight_exists(icon_highlight.name .. '_normal') then
          icon_highlight = self:create_hl({ fg = highlight_color }, icon_highlight_group)
          self.icon_hl_cache[highlight_color] = icon_highlight
        end

        icon = self:format_hl(icon_highlight) .. icon .. default_highlight
      end
    end
  else
    ok = vim.fn.exists('*WebDevIconsGetFileTypeSymbol')
    if ok ~= 0 then
      icon = vim.fn.WebDevIconsGetFileTypeSymbol()
      if icon then
        icon = icon .. ' '
      end
    end
  end

  if not icon then
    return
  end

  if self.options.icon_only then
    self.status = icon
  elseif type(self.options.icon) == 'table' and self.options.icon.align == 'right' then
    self.status = self.status .. ' ' .. icon
  else
    self.status = icon .. self.status
  end
end

return M


================================================
FILE: lua/lualine/components/hostname.lua
================================================
-- Copyright (c) 2020-2021 hoob3rt
-- MIT license, see LICENSE for more details.
local modules = require('lualine_require').lazy_require {
  utils = 'lualine.utils.utils',
}

local function hostname()
  return modules.utils.stl_escape(vim.loop.os_gethostname())
end

return hostname


================================================
FILE: lua/lualine/components/location.lua
================================================
-- Copyright (c) 2020-2021 hoob3rt
-- MIT license, see LICENSE for more details.
local function location()
  local line = vim.fn.line('.')
  local col = vim.fn.charcol('.')
  return string.format('%3d:%-2d', line, col)
end

return location


================================================
FILE: lua/lualine/components/lsp_status.lua
================================================
local lualine_require = require('lualine_require')

local M = lualine_require.require('lualine.component'):extend()

local default_options = {
  icon = '', -- f013
  symbols = {
    -- Use standard unicode characters for the spinner and done symbols:
    spinner = { '⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏' },
    done = '✓',
    separator = ' ',
  },
  -- List of LSP names to ignore (e.g., `null-ls`):
  ignore_lsp = {},
  show_name = true,
}

function M:init(options)
  -- Run `super()`.
  M.super.init(self, options)

  -- Apply default options.
  self.options = vim.tbl_deep_extend('keep', self.options or {}, default_options)

  -- Apply symbols.
  self.symbols = self.options.symbols or {}

  ---The difference between the `begin` and `end` progress events for each LSP.
  ---
  ---@type table<integer, integer>
  self.lsp_work_by_client_id = {}

  -- Listen to progress updates only if `nvim` supports the `LspProgress` event.
  pcall(vim.api.nvim_create_autocmd, 'LspProgress', {
    desc = 'Update the Lualine LSP status component with progress',
    group = vim.api.nvim_create_augroup('lualine_lsp_progress', {}),
    ---@param event {data: {client_id: integer, params: lsp.ProgressParams}}
    callback = function(event)
      local kind = event.data.params.value.kind
      local client_id = event.data.client_id

      local work = self.lsp_work_by_client_id[client_id] or 0
      local work_change = kind == 'begin' and 1 or (kind == 'end' and -1 or 0)

      self.lsp_work_by_client_id[client_id] = math.max(work + work_change, 0)

      -- Refresh Lualine to update the LSP status symbol if it changed.
      if (work == 0 and work_change > 0) or (work == 1 and work_change < 0) then
        require('lualine').refresh()
      end
    end,
  })
end

function M:update_status()
  local result = {}
  local processed = {}

  -- Backwards-compatible function to get the active LSP clients.
  ---@diagnostic disable-next-line: deprecated
  local get_lsp_clients = vim.lsp.get_clients or vim.lsp.get_active_clients
  local clients = get_lsp_clients { bufnr = vim.api.nvim_get_current_buf() }

  -- Backwards-compatible function to get the current time in nanoseconds.
  local hrtime = (vim.uv or vim.loop).hrtime
  -- Advance the spinner every 80ms only once, not for each client (otherwise the spinners will skip steps).
  -- NOTE: the spinner symbols table is 1-indexed.
  local spinner_symbol = self.symbols.spinner[math.floor(hrtime() / (1e6 * 80)) % #self.symbols.spinner + 1]

  for _, client in ipairs(clients) do
    local status
    local work = self.lsp_work_by_client_id[client.id]
    if work ~= nil and work > 0 then
      status = spinner_symbol
    elseif work ~= nil and work == 0 then
      status = self.symbols.done
    end

    -- Backwards-compatible function to check if a list contains a value.
    local list_contains = vim.list_contains or vim.tbl_contains
    -- Append the status to the LSP only if it supports progress reporting and is not ignored.
    if not processed[client.name] and not list_contains(self.options.ignore_lsp, client.name) then
      local status_display = ((status and status ~= '') and (' ' .. status) or '')
      if self.options.show_name then
        table.insert(result, client.name .. status_display)
      else
        table.insert(result, status_display)
      end
      processed[client.name] = true
    end
  end

  return table.concat(result, self.symbols.separator)
end

return M


================================================
FILE: lua/lualine/components/mode.lua
================================================
-- Copyright (c) 2020-2021 hoob3rt
-- MIT license, see LICENSE for more details.
local get_mode = require('lualine.utils.mode').get_mode
return get_mode


================================================
FILE: lua/lualine/components/progress.lua
================================================
-- Copyright (c) 2020-2021 hoob3rt
-- MIT license, see LICENSE for more details.
local function progress()
  local cur = vim.fn.line('.')
  local total = vim.fn.line('$')
  if cur == 1 then
    return 'Top'
  elseif cur == total then
    return 'Bot'
  else
    return string.format('%2d%%%%', math.floor(cur / total * 100))
  end
end

return progress


================================================
FILE: lua/lualine/components/searchcount.lua
================================================
local M = require('lualine.component'):extend()

local default_options = {
  maxcount = 999,
  timeout = 500,
}

-- Initializer
function M:init(options)
  -- Run super()
  M.super.init(self, options)
  -- Apply default options
  self.options = vim.tbl_extend('keep', self.options or {}, default_options)
end

-- Function that runs every time statusline is updated
function M:update_status()
  if vim.v.hlsearch == 0 then
    return ''
  end

  local ok, result = pcall(vim.fn.searchcount, { maxcount = self.options.maxcount, timeout = self.options.timeout })
  if not ok or next(result) == nil then
    return ''
  end

  local denominator = math.min(result.total, result.maxcount)
  return string.format('[%d/%d]', result.current, denominator)
end

return M


================================================
FILE: lua/lualine/components/selectioncount.lua
================================================
local function selectioncount()
  local mode = vim.fn.mode(true)
  local line_start, col_start = vim.fn.line('v'), vim.fn.col('v')
  local line_end, col_end = vim.fn.line('.'), vim.fn.col('.')
  if mode:match('') then
    return string.format('%dx%d', math.abs(line_start - line_end) + 1, math.abs(col_start - col_end) + 1)
  elseif mode:match('V') or line_start ~= line_end then
    return math.abs(line_start - line_end) + 1
  elseif mode:match('v') then
    return math.abs(col_start - col_end) + 1
  else
    return ''
  end
end

return selectioncount


================================================
FILE: lua/lualine/components/special/eval_func_component.lua
================================================
-- Copyright (c) 2020-2021 shadmansale
Download .txt
gitextract_a833klid/

├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.md
│   │   └── feature_request.md
│   ├── generated-files-bot.yml
│   ├── stale.yml
│   └── workflows/
│       ├── autogen.yml
│       └── ci.yml
├── .gitignore
├── .luacheckrc
├── .luacov
├── .stylua.toml
├── CONTRIBUTING.md
├── LICENSE
├── Makefile
├── README.md
├── THEMES.md
├── doc/
│   └── lualine.txt
├── examples/
│   ├── bubbles.lua
│   ├── cosmicink.lua
│   ├── evil_lualine.lua
│   └── slanted-gaps.lua
├── lua/
│   ├── lualine/
│   │   ├── component.lua
│   │   ├── components/
│   │   │   ├── branch/
│   │   │   │   ├── git_branch.lua
│   │   │   │   └── init.lua
│   │   │   ├── buffers/
│   │   │   │   ├── buffer.lua
│   │   │   │   └── init.lua
│   │   │   ├── datetime.lua
│   │   │   ├── diagnostics/
│   │   │   │   ├── config.lua
│   │   │   │   ├── init.lua
│   │   │   │   └── sources.lua
│   │   │   ├── diff/
│   │   │   │   ├── git_diff.lua
│   │   │   │   └── init.lua
│   │   │   ├── encoding.lua
│   │   │   ├── fileformat.lua
│   │   │   ├── filename.lua
│   │   │   ├── filesize.lua
│   │   │   ├── filetype.lua
│   │   │   ├── hostname.lua
│   │   │   ├── location.lua
│   │   │   ├── lsp_status.lua
│   │   │   ├── mode.lua
│   │   │   ├── progress.lua
│   │   │   ├── searchcount.lua
│   │   │   ├── selectioncount.lua
│   │   │   ├── special/
│   │   │   │   ├── eval_func_component.lua
│   │   │   │   ├── function_component.lua
│   │   │   │   └── vim_var_component.lua
│   │   │   ├── tabs/
│   │   │   │   ├── init.lua
│   │   │   │   └── tab.lua
│   │   │   └── windows/
│   │   │       ├── init.lua
│   │   │       └── window.lua
│   │   ├── config.lua
│   │   ├── extensions/
│   │   │   ├── aerial.lua
│   │   │   ├── assistant.lua
│   │   │   ├── avante.lua
│   │   │   ├── chadtree.lua
│   │   │   ├── ctrlspace.lua
│   │   │   ├── fern.lua
│   │   │   ├── fugitive.lua
│   │   │   ├── fzf.lua
│   │   │   ├── lazy.lua
│   │   │   ├── man.lua
│   │   │   ├── mason.lua
│   │   │   ├── mundo.lua
│   │   │   ├── neo-tree.lua
│   │   │   ├── nerdtree.lua
│   │   │   ├── nvim-dap-ui.lua
│   │   │   ├── nvim-tree.lua
│   │   │   ├── oil.lua
│   │   │   ├── overseer.lua
│   │   │   ├── quickfix.lua
│   │   │   ├── symbols-outline.lua
│   │   │   ├── toggleterm.lua
│   │   │   └── trouble.lua
│   │   ├── highlight.lua
│   │   ├── themes/
│   │   │   ├── 16color.lua
│   │   │   ├── OceanicNext.lua
│   │   │   ├── PaperColor.lua
│   │   │   ├── Tomorrow.lua
│   │   │   ├── auto.lua
│   │   │   ├── ayu.lua
│   │   │   ├── ayu_dark.lua
│   │   │   ├── ayu_light.lua
│   │   │   ├── ayu_mirage.lua
│   │   │   ├── base16.lua
│   │   │   ├── codedark.lua
│   │   │   ├── dracula.lua
│   │   │   ├── everforest.lua
│   │   │   ├── gruvbox-material.lua
│   │   │   ├── gruvbox.lua
│   │   │   ├── gruvbox_dark.lua
│   │   │   ├── gruvbox_light.lua
│   │   │   ├── horizon.lua
│   │   │   ├── iceberg.lua
│   │   │   ├── iceberg_dark.lua
│   │   │   ├── iceberg_light.lua
│   │   │   ├── jellybeans.lua
│   │   │   ├── material.lua
│   │   │   ├── modus-vivendi.lua
│   │   │   ├── molokai.lua
│   │   │   ├── moonfly.lua
│   │   │   ├── nightfly.lua
│   │   │   ├── nord.lua
│   │   │   ├── onedark.lua
│   │   │   ├── onelight.lua
│   │   │   ├── palenight.lua
│   │   │   ├── papercolor_dark.lua
│   │   │   ├── papercolor_light.lua
│   │   │   ├── powerline.lua
│   │   │   ├── powerline_dark.lua
│   │   │   ├── pywal.lua
│   │   │   ├── seoul256.lua
│   │   │   ├── solarized.lua
│   │   │   ├── solarized_dark.lua
│   │   │   ├── solarized_light.lua
│   │   │   ├── tomorrow_night.lua
│   │   │   └── wombat.lua
│   │   └── utils/
│   │       ├── class.lua
│   │       ├── color_utils.lua
│   │       ├── fn_store.lua
│   │       ├── job.lua
│   │       ├── loader.lua
│   │       ├── mode.lua
│   │       ├── notices.lua
│   │       ├── nvim_opts.lua
│   │       ├── section.lua
│   │       └── utils.lua
│   ├── lualine.lua
│   └── lualine_require.lua
├── scripts/
│   ├── docgen.sh
│   ├── nvim_isolated_conf.sh
│   └── test_runner.sh
└── tests/
    ├── helpers.lua
    ├── minimal_init.lua
    ├── spec/
    │   ├── component_spec.lua
    │   ├── config_spec.lua
    │   ├── lualine_spec.lua
    │   └── utils_spec.lua
    └── statusline.lua
Condensed preview — 138 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (503K chars).
[
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "chars": 1649,
    "preview": "---\nname: Bug Report\nabout: Report a problem in lualine\ntitle: 'Bug: '\nlabels: bug\n\n---\n\n<!--\n  Before reporting: search"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "chars": 373,
    "preview": "---\nname: Feature Request\nabout: Request a feature for lualine\ntitle: \"Feat: \"\nlabels: new feature\n---\n\n<!--\n  Before cr"
  },
  {
    "path": ".github/generated-files-bot.yml",
    "chars": 190,
    "preview": "generatedFiles:\n  - path: \"doc/lualine.txt\"\n    message: \"`lualine.txt` is generated from README.md. Make changes there "
  },
  {
    "path": ".github/stale.yml",
    "chars": 747,
    "preview": "# Number of days of inactivity before an issue becomes stale\ndaysUntilStale: 60\n# Number of days of inactivity before a "
  },
  {
    "path": ".github/workflows/autogen.yml",
    "chars": 1410,
    "preview": "name: autogen\non:\n  push:\n    branches: [master]\n    paths:\n      - \"lua/**.lua\"\n      - \"examples/**.lua\"\n      - \"test"
  },
  {
    "path": ".github/workflows/ci.yml",
    "chars": 2201,
    "preview": "name: Tests\n\non:\n  push:\n    branches: [master]\n  pull_request:\n    branches: [master]\n\n# Cancel any in-progress CI runs"
  },
  {
    "path": ".gitignore",
    "chars": 476,
    "preview": "# Compiled Lua sources\nluac.out\n\n# luarocks build files\n*.src.rock\n*.zip\n*.tar.gz\n\n# Object files\n*.o\n*.os\n*.ko\n*.obj\n*."
  },
  {
    "path": ".luacheckrc",
    "chars": 272,
    "preview": "globals = {\n   \"vim\",\n   \"assert\"\n}\n\n-- Don't report unused self arguments of methods.\nself = false\n\n-- Rerun tests only"
  },
  {
    "path": ".luacov",
    "chars": 434,
    "preview": "return {\n  include = {\n    \"lua/lualine$\",\n    \"lua/lualine_require$\",\n    \"lua/lualine%/.+$\",\n  },\n  exclude = {\n    \"l"
  },
  {
    "path": ".stylua.toml",
    "chars": 144,
    "preview": "indent_type = \"Spaces\"\nindent_width = 2\nquote_style = \"AutoPreferSingle\"\ncall_parentheses = \"NoSingleTable\"\ncollapse_sim"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 3116,
    "preview": "# Contributing to lualine.nvim\n\nThanks for considering to contribute.\n\n### Getting started\n\nIf you're not sure where to "
  },
  {
    "path": "LICENSE",
    "chars": 1064,
    "preview": "MIT License\n\nCopyright (c) 2020 hoob3rt\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof"
  },
  {
    "path": "Makefile",
    "chars": 814,
    "preview": ".DEFAULT_GOAL = check\n\nlint:\n\t@luacheck lua/lualine/\n\t@luacheck tests/\n\t@luacheck examples/\n\nformat:\n\t@stylua --config-p"
  },
  {
    "path": "README.md",
    "chars": 35220,
    "preview": "# lualine.nvim\n\n<!-- panvimdoc-ignore-start -->\n\n![code size](https://img.shields.io/github/languages/code-size/nvim-lua"
  },
  {
    "path": "THEMES.md",
    "chars": 20755,
    "preview": "# Available themes\n\nAll available themes are only best effort ports by myself/ other users. If you find a theme to be we"
  },
  {
    "path": "doc/lualine.txt",
    "chars": 39516,
    "preview": "*lualine.txt*          fast and easy to configure statusline plugin for neovim\n\n========================================"
  },
  {
    "path": "examples/bubbles.lua",
    "chars": 1573,
    "preview": "-- Bubbles config for lualine\n-- Author: lokesh-krishna\n-- MIT license, see LICENSE for more details.\n\n-- stylua: ignore"
  },
  {
    "path": "examples/cosmicink.lua",
    "chars": 16116,
    "preview": "-- CosmicInk config for lualine\n-- Author: Yeeloman\n-- MIT license, see LICENSE for more details.\n\n-- Main configuration"
  },
  {
    "path": "examples/evil_lualine.lua",
    "chars": 5216,
    "preview": "-- Eviline config for lualine\n-- Author: shadmansaleh\n-- Credit: glepnir\nlocal lualine = require('lualine')\n\n-- Color ta"
  },
  {
    "path": "examples/slanted-gaps.lua",
    "chars": 3229,
    "preview": "local colors = {\n  red = '#ca1243',\n  grey = '#a0a1a7',\n  black = '#383a42',\n  white = '#f3f3f3',\n  light_green = '#83a5"
  },
  {
    "path": "lua/lualine/component.lua",
    "chars": 9959,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\nlocal lualine_require = require('l"
  },
  {
    "path": "lua/lualine/components/branch/git_branch.lua",
    "chars": 4919,
    "preview": "local M = {}\n\nlocal require = require('lualine_require').require\nlocal utils = require('lualine.utils.utils')\n\n-- vars\nl"
  },
  {
    "path": "lua/lualine/components/branch/init.lua",
    "chars": 719,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\nlocal M = require('lualine.compone"
  },
  {
    "path": "lua/lualine/components/buffers/buffer.lua",
    "chars": 6299,
    "preview": "local Buffer = require('lualine.utils.class'):extend()\n\nlocal modules = require('lualine_require').lazy_require {\n  high"
  },
  {
    "path": "lua/lualine/components/buffers/init.lua",
    "chars": 6665,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\nlocal require = require('lualine_r"
  },
  {
    "path": "lua/lualine/components/datetime.lua",
    "chars": 805,
    "preview": "-- Copyright (c) 2023 Willothy\n-- MIT license, see LICENSE for more details.\nlocal lualine_require = require('lualine_re"
  },
  {
    "path": "lua/lualine/components/diagnostics/config.lua",
    "chars": 1571,
    "preview": "local require = require('lualine_require').require\nlocal utils = require('lualine.utils.utils')\nlocal M = {}\n\n-- default"
  },
  {
    "path": "lua/lualine/components/diagnostics/init.lua",
    "chars": 4285,
    "preview": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal lualine_require = require('lualin"
  },
  {
    "path": "lua/lualine/components/diagnostics/sources.lua",
    "chars": 3680,
    "preview": "local M = {}\n\n---functions that how how to retrieve diagnostics from specific source.\n---returns error_count:number, war"
  },
  {
    "path": "lua/lualine/components/diff/git_diff.lua",
    "chars": 4162,
    "preview": "local lualine_require = require('lualine_require')\nlocal modules = lualine_require.lazy_require {\n  utils = 'lualine.uti"
  },
  {
    "path": "lua/lualine/components/diff/init.lua",
    "chars": 2923,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\nlocal lualine_require = require('l"
  },
  {
    "path": "lua/lualine/components/encoding.lua",
    "chars": 706,
    "preview": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal lualine_require = require('lualin"
  },
  {
    "path": "lua/lualine/components/fileformat.lua",
    "chars": 675,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\nlocal M = require('lualine.compone"
  },
  {
    "path": "lua/lualine/components/filename.lua",
    "chars": 3376,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\nlocal M = require('lualine.compone"
  },
  {
    "path": "lua/lualine/components/filesize.lua",
    "chars": 542,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\nlocal function filesize()\n  local "
  },
  {
    "path": "lua/lualine/components/filetype.lua",
    "chars": 2359,
    "preview": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal lualine_require = require('lualin"
  },
  {
    "path": "lua/lualine/components/hostname.lua",
    "chars": 283,
    "preview": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal modules = require('lualine_requir"
  },
  {
    "path": "lua/lualine/components/location.lua",
    "chars": 240,
    "preview": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal function location()\n  local line "
  },
  {
    "path": "lua/lualine/components/lsp_status.lua",
    "chars": 3464,
    "preview": "local lualine_require = require('lualine_require')\n\nlocal M = lualine_require.require('lualine.component'):extend()\n\nloc"
  },
  {
    "path": "lua/lualine/components/mode.lua",
    "chars": 153,
    "preview": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal get_mode = require('lualine.utils"
  },
  {
    "path": "lua/lualine/components/progress.lua",
    "chars": 352,
    "preview": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal function progress()\n  local cur ="
  },
  {
    "path": "lua/lualine/components/searchcount.lua",
    "chars": 759,
    "preview": "local M = require('lualine.component'):extend()\n\nlocal default_options = {\n  maxcount = 999,\n  timeout = 500,\n}\n\n-- Init"
  },
  {
    "path": "lua/lualine/components/selectioncount.lua",
    "chars": 557,
    "preview": "local function selectioncount()\n  local mode = vim.fn.mode(true)\n  local line_start, col_start = vim.fn.line('v'), vim.f"
  },
  {
    "path": "lua/lualine/components/special/eval_func_component.lua",
    "chars": 1271,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\nlocal M = require('lualine.compone"
  },
  {
    "path": "lua/lualine/components/special/function_component.lua",
    "chars": 516,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\nlocal M = require('lualine.compone"
  },
  {
    "path": "lua/lualine/components/special/vim_var_component.lua",
    "chars": 1186,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\nlocal require = require('lualine_r"
  },
  {
    "path": "lua/lualine/components/tabs/init.lua",
    "chars": 5451,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\nlocal require = require('lualine_r"
  },
  {
    "path": "lua/lualine/components/tabs/tab.lua",
    "chars": 5497,
    "preview": "local Tab = require('lualine.utils.class'):extend()\n\nlocal modules = require('lualine_require').lazy_require {\n  highlig"
  },
  {
    "path": "lua/lualine/components/windows/init.lua",
    "chars": 2099,
    "preview": "local Window = require('lualine.components.windows.window')\nlocal M = require('lualine.components.buffers'):extend()\n\nlo"
  },
  {
    "path": "lua/lualine/components/windows/window.lua",
    "chars": 986,
    "preview": "local Window = require('lualine.components.buffers.buffer'):extend()\n\n---initialize a new buffer from opts\n---@param opt"
  },
  {
    "path": "lua/lualine/config.lua",
    "chars": 4930,
    "preview": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal require = require('lualine_requir"
  },
  {
    "path": "lua/lualine/extensions/aerial.lua",
    "chars": 171,
    "preview": "-- MIT license, see LICENSE for more details.\n-- Extension for aerial.nvim\nlocal M = {}\n\nM.sections = { lualine_a = { 'f"
  },
  {
    "path": "lua/lualine/extensions/assistant.lua",
    "chars": 580,
    "preview": "-- lualine extension for assistant.nvim\n\nlocal ok, assistant = pcall(require, 'assistant')\n\nif not ok then\n  return nil\n"
  },
  {
    "path": "lua/lualine/extensions/avante.lua",
    "chars": 1334,
    "preview": "-- MIT license, see LICENSE for more details.\n-- Extension for avante.nvim\n\nlocal M = {}\n\nlocal function ft_info()\n  loc"
  },
  {
    "path": "lua/lualine/extensions/chadtree.lua",
    "chars": 237,
    "preview": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal nerdtree = require('lualine.exten"
  },
  {
    "path": "lua/lualine/extensions/ctrlspace.lua",
    "chars": 368,
    "preview": "local M = {}\n\nM.sections = {\n  lualine_a = {\n    function()\n      return vim.fn['ctrlspace#context#Configuration']().Sym"
  },
  {
    "path": "lua/lualine/extensions/fern.lua",
    "chars": 235,
    "preview": "-- MIT license, see LICENSE for more details.\n-- Extension for fern file explorer.\nlocal nerdtree = require('lualine.ext"
  },
  {
    "path": "lua/lualine/extensions/fugitive.lua",
    "chars": 328,
    "preview": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal M = {}\n\nlocal function fugitive_b"
  },
  {
    "path": "lua/lualine/extensions/fzf.lua",
    "chars": 844,
    "preview": "--[[\nlualine extension for fzf filetypes:\nworks with both https://github.com/junegunn/fzf.vim and https://github.com/ibh"
  },
  {
    "path": "lua/lualine/extensions/lazy.lua",
    "chars": 484,
    "preview": "-- lualine extension for lazy.nvim\n\nlocal ok, lazy = pcall(require, 'lazy')\nif not ok then\n  return ''\nend\n\nlocal M = {}"
  },
  {
    "path": "lua/lualine/extensions/man.lua",
    "chars": 245,
    "preview": "local M = {}\n\nM.sections = {\n  lualine_a = {\n    function()\n      return 'MAN'\n    end,\n  },\n  lualine_b = { { 'filename"
  },
  {
    "path": "lua/lualine/extensions/mason.lua",
    "chars": 531,
    "preview": "-- lualine extension for mason.nvim\n\nlocal mason_registry\nlocal function maybe_set_registry()\n  local ok, registry = pca"
  },
  {
    "path": "lua/lualine/extensions/mundo.lua",
    "chars": 325,
    "preview": "local M = {}\n\nM.sections = {\n  lualine_a = {\n    function()\n      local ft = vim.opt_local.filetype:get()\n      return ("
  },
  {
    "path": "lua/lualine/extensions/neo-tree.lua",
    "chars": 237,
    "preview": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal nerdtree = require('lualine.exten"
  },
  {
    "path": "lua/lualine/extensions/nerdtree.lua",
    "chars": 272,
    "preview": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal function get_short_cwd()\n  return"
  },
  {
    "path": "lua/lualine/extensions/nvim-dap-ui.lua",
    "chars": 301,
    "preview": "-- MIT license, see LICENSE for more details.\n-- Extension for nvim-dap-ui\nlocal M = {}\n\nM.sections = {\n  lualine_a = { "
  },
  {
    "path": "lua/lualine/extensions/nvim-tree.lua",
    "chars": 237,
    "preview": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal nerdtree = require('lualine.exten"
  },
  {
    "path": "lua/lualine/extensions/oil.lua",
    "chars": 301,
    "preview": "-- Extension for oil.nvim\n\nlocal M = {}\n\nM.sections = {\n  lualine_a = {\n    function()\n      local ok, oil = pcall(requi"
  },
  {
    "path": "lua/lualine/extensions/overseer.lua",
    "chars": 230,
    "preview": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\n\nlocal M = {}\n\nM.sections = {\n  lualine"
  },
  {
    "path": "lua/lualine/extensions/quickfix.lua",
    "chars": 688,
    "preview": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\n--\nlocal function is_loclist()\n  return"
  },
  {
    "path": "lua/lualine/extensions/symbols-outline.lua",
    "chars": 178,
    "preview": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal M = {}\n\nM.sections = { lualine_a "
  },
  {
    "path": "lua/lualine/extensions/toggleterm.lua",
    "chars": 287,
    "preview": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\n\nlocal function toggleterm_statusline()"
  },
  {
    "path": "lua/lualine/extensions/trouble.lua",
    "chars": 839,
    "preview": "local M = {}\n\n---Format mode, eg: lsp_document_symbols -> Lsp Document Symbols\n---@param mode string\n---@return string\nl"
  },
  {
    "path": "lua/lualine/highlight.lua",
    "chars": 18695,
    "preview": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal M = {}\nlocal lualine_require = re"
  },
  {
    "path": "lua/lualine/themes/16color.lua",
    "chars": 1131,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Credit itchyny, jackno (lightli"
  },
  {
    "path": "lua/lualine/themes/OceanicNext.lua",
    "chars": 1396,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Generated by lightline to luali"
  },
  {
    "path": "lua/lualine/themes/PaperColor.lua",
    "chars": 220,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Credit: itchyny(lightline)\nloca"
  },
  {
    "path": "lua/lualine/themes/Tomorrow.lua",
    "chars": 1314,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Generated by lightline to luali"
  },
  {
    "path": "lua/lualine/themes/auto.lua",
    "chars": 6034,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\nlocal utils = require('lualine.uti"
  },
  {
    "path": "lua/lualine/themes/ayu.lua",
    "chars": 342,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Credit: itchyny(lightline)\n-- L"
  },
  {
    "path": "lua/lualine/themes/ayu_dark.lua",
    "chars": 1242,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Generated by lightline to luali"
  },
  {
    "path": "lua/lualine/themes/ayu_light.lua",
    "chars": 1242,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Generated by lightline to luali"
  },
  {
    "path": "lua/lualine/themes/ayu_mirage.lua",
    "chars": 1242,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Generated by lightline to luali"
  },
  {
    "path": "lua/lualine/themes/base16.lua",
    "chars": 3705,
    "preview": "local modules = require('lualine_require').lazy_require { notices = 'lualine.utils.notices' }\n\nlocal function add_notice"
  },
  {
    "path": "lua/lualine/themes/codedark.lua",
    "chars": 1112,
    "preview": "-- Copyright (c) 2020-2021 Shatur95\n-- MIT license, see LICENSE for more details.\n-- stylua: ignore\nlocal colors = {\n  g"
  },
  {
    "path": "lua/lualine/themes/dracula.lua",
    "chars": 1521,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Credit itchyny, jackno (lightli"
  },
  {
    "path": "lua/lualine/themes/everforest.lua",
    "chars": 1548,
    "preview": "-- Copyright (c) 2020-2021 gnuyent\n-- MIT license, see LICENSE for more details.\n-- stylua: ignore\nlocal colors = {\n  bg"
  },
  {
    "path": "lua/lualine/themes/gruvbox-material.lua",
    "chars": 970,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- stylua: ignore\nlocal colors = {"
  },
  {
    "path": "lua/lualine/themes/gruvbox.lua",
    "chars": 241,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Credit: itchyny(lightline)\n-- L"
  },
  {
    "path": "lua/lualine/themes/gruvbox_dark.lua",
    "chars": 1549,
    "preview": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\n-- stylua: ignore\nlocal colors = {\n  bl"
  },
  {
    "path": "lua/lualine/themes/gruvbox_light.lua",
    "chars": 1532,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- stylua: ignore\nlocal colors = {"
  },
  {
    "path": "lua/lualine/themes/horizon.lua",
    "chars": 1564,
    "preview": "-- Copyright (c) 2021 Jnhtr\n-- MIT license, see LICENSE for more details.\n-- stylua: ignore\nlocal colors = {\n  black    "
  },
  {
    "path": "lua/lualine/themes/iceberg.lua",
    "chars": 241,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Credit: itchyny(lightline)\n-- L"
  },
  {
    "path": "lua/lualine/themes/iceberg_dark.lua",
    "chars": 1295,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Generated by lightline to luali"
  },
  {
    "path": "lua/lualine/themes/iceberg_light.lua",
    "chars": 1245,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Generated by lightline to luali"
  },
  {
    "path": "lua/lualine/themes/jellybeans.lua",
    "chars": 1268,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Generated by lightline to luali"
  },
  {
    "path": "lua/lualine/themes/material.lua",
    "chars": 1134,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Credit: Lokesh Krishna(lightlin"
  },
  {
    "path": "lua/lualine/themes/modus-vivendi.lua",
    "chars": 1551,
    "preview": "-- Copyright (c) 2020-2021 ronniedroid\n-- MIT license, see LICENSE for more details.\n-- stylua: ignore\nlocal colors = {\n"
  },
  {
    "path": "lua/lualine/themes/molokai.lua",
    "chars": 952,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Credit: challsted(lightline)\n--"
  },
  {
    "path": "lua/lualine/themes/moonfly.lua",
    "chars": 1147,
    "preview": "-- moonfly color scheme for lualine\n--\n-- URL:     github.com/bluz71/vim-moonfly-colors\n-- License: MIT (https://opensou"
  },
  {
    "path": "lua/lualine/themes/nightfly.lua",
    "chars": 1090,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- stylua: ignore\nlocal colors = {"
  },
  {
    "path": "lua/lualine/themes/nord.lua",
    "chars": 882,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- stylua: ignore\nlocal colors = {"
  },
  {
    "path": "lua/lualine/themes/onedark.lua",
    "chars": 1150,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Credit: Zoltan Dalmadi(lightlin"
  },
  {
    "path": "lua/lualine/themes/onelight.lua",
    "chars": 1055,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Credit: Zoltan Dalmadi(lightlin"
  },
  {
    "path": "lua/lualine/themes/palenight.lua",
    "chars": 1436,
    "preview": "-- Copyright (c) 2020-2021 IGI-111\n-- MIT license, see LICENSE for more details.\n-- stylua: ignore\nlocal colors = {\n  ve"
  },
  {
    "path": "lua/lualine/themes/papercolor_dark.lua",
    "chars": 1618,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Credit: TKNGUE(lightline)\n-- st"
  },
  {
    "path": "lua/lualine/themes/papercolor_light.lua",
    "chars": 1544,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Credit: TKNGUE(lightline)\n-- st"
  },
  {
    "path": "lua/lualine/themes/powerline.lua",
    "chars": 1375,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- stylua: ignore\nlocal Colors = {"
  },
  {
    "path": "lua/lualine/themes/powerline_dark.lua",
    "chars": 1806,
    "preview": "-- Copyright (c) 2021 Ashish Panigrahi\n-- MIT license, see LICENSE for more details.\n-- stylua: ignore\nlocal colors = {\n"
  },
  {
    "path": "lua/lualine/themes/pywal.lua",
    "chars": 1750,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n\nlocal lualine_require = require('"
  },
  {
    "path": "lua/lualine/themes/seoul256.lua",
    "chars": 1267,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Generated by lightline to luali"
  },
  {
    "path": "lua/lualine/themes/solarized.lua",
    "chars": 243,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Credit: itchyny(lightline)\n-- L"
  },
  {
    "path": "lua/lualine/themes/solarized_dark.lua",
    "chars": 1151,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Credit: itchyny(lightline)\n-- s"
  },
  {
    "path": "lua/lualine/themes/solarized_light.lua",
    "chars": 1151,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Credit: itchyny(lightline)\n-- s"
  },
  {
    "path": "lua/lualine/themes/tomorrow_night.lua",
    "chars": 999,
    "preview": "local colors = {\n  bg = '#282a2e',\n  alt_bg = '#373b41',\n  dark_fg = '#969896',\n  fg = '#b4b7b4',\n  light_fg = '#c5c8c6'"
  },
  {
    "path": "lua/lualine/themes/wombat.lua",
    "chars": 1137,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Credit: itchyny(lightline)\n-- s"
  },
  {
    "path": "lua/lualine/utils/class.lua",
    "chars": 787,
    "preview": "-- Adapted from https://github.com/rxi/classic/blob/master/classic.lua\nlocal Object = {}\n\nObject.__index = Object\n\n-- lu"
  },
  {
    "path": "lua/lualine/utils/color_utils.lua",
    "chars": 9813,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\nlocal M = {}\n\n-- stylua: ignore st"
  },
  {
    "path": "lua/lualine/utils/fn_store.lua",
    "chars": 802,
    "preview": "local M = {}\nlocal fns = {}\n\n---Store fn with id in fns so it can be later called\n---@param id integer component id (for"
  },
  {
    "path": "lua/lualine/utils/job.lua",
    "chars": 1491,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n\n--- wrapper around job api\n--- cr"
  },
  {
    "path": "lua/lualine/utils/loader.lua",
    "chars": 8922,
    "preview": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\n\nlocal lualine_require = require('luali"
  },
  {
    "path": "lua/lualine/utils/mode.lua",
    "chars": 1269,
    "preview": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal Mode = {}\n\n-- stylua: ignore\nMode"
  },
  {
    "path": "lua/lualine/utils/notices.lua",
    "chars": 2622,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n\n-- To provide notices for user\nlo"
  },
  {
    "path": "lua/lualine/utils/nvim_opts.lua",
    "chars": 5971,
    "preview": "local M = {}\n\n-- keeps backup of options that we cahge so we can restore it.\n-- format:\n-- options {\n--   global = <1> {"
  },
  {
    "path": "lua/lualine/utils/section.lua",
    "chars": 4615,
    "preview": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal M = {}\nlocal require = require('l"
  },
  {
    "path": "lua/lualine/utils/utils.lua",
    "chars": 6482,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\nlocal M = {}\n\n-- Note for now only"
  },
  {
    "path": "lua/lualine.lua",
    "chars": 26575,
    "preview": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal M = {}\n\nlocal lualine_require = r"
  },
  {
    "path": "lua/lualine_require.lua",
    "chars": 3296,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\nlocal M = {}\n\nM.sep = package.conf"
  },
  {
    "path": "scripts/docgen.sh",
    "chars": 1281,
    "preview": "# Copyright (c) 2020-2021 shadmansaleh\n# MIT license, see LICENSE for more details.\n\nPANVIMDOC_TAG_VERSION=\"v2.7.1\" # pa"
  },
  {
    "path": "scripts/nvim_isolated_conf.sh",
    "chars": 2721,
    "preview": "#!/bin/sh\n\n# Copyright (c) 2020-2021 shadmansaleh\n# MIT license, see LICENSE for more details.\n\nUSAGE=\"Usage nvim_isolat"
  },
  {
    "path": "scripts/test_runner.sh",
    "chars": 401,
    "preview": "#!/usr/bin/env bash\nset -e\n\nREPO_DIR=$(git rev-parse --show-toplevel)\n\nnvim_t() {\n\tnvim -u \"$REPO_DIR/tests/minimal_init"
  },
  {
    "path": "tests/helpers.lua",
    "chars": 2488,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n\nassert = require('luassert')\nloca"
  },
  {
    "path": "tests/minimal_init.lua",
    "chars": 303,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n\nif os.getenv('TEST_COV') then\n  r"
  },
  {
    "path": "tests/spec/component_spec.lua",
    "chars": 32347,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n\nlocal helpers = require('tests.he"
  },
  {
    "path": "tests/spec/config_spec.lua",
    "chars": 6571,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n\nlocal eq = assert.are.same\n\ndescr"
  },
  {
    "path": "tests/spec/lualine_spec.lua",
    "chars": 46011,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n\nlocal eq = assert.are.same\nlocal "
  },
  {
    "path": "tests/spec/utils_spec.lua",
    "chars": 6608,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n\nlocal helpers = require('tests.he"
  },
  {
    "path": "tests/statusline.lua",
    "chars": 6967,
    "preview": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n\n--- ## Testing module for lualine"
  }
]

About this extraction

This page contains the full source code of the nvim-lualine/lualine.nvim GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 138 files (467.4 KB), approximately 137.1k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!