[
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "content": "---\nname: Bug Report\nabout: Report a problem in lualine\ntitle: 'Bug: '\nlabels: bug\n\n---\n\n<!--\n  Before reporting: search existing issues and\n  ensure you are running neovim >= 0.5 and the\n  latest version of lualine.\n-->\n\n### Self Checks\n\n<!-- Check these boxes by placing an X in the middle -->\n- [ ] I'm using the latest lualine.\n- [ ] I didn't find the issue in existing issues or PRs.\n\n### How to reproduce the problem\n<!-- Add steps to reproduce with minimal config from below -->\n\n### Expected behaviour\n\n\n### Actual behaviour\n\n\n### Minimal config to reproduce the issue\n\n<!--\n  =================\n  ### IMPORTANT ###\n  =================\n\n  You need to provide a way to reproduce the issue without influence\n  of other plugins.\n\n  Issues without proper format and a proper way to\n  reproduce might be ignored and closed without any reply.\n\n  This script can help you with that.\n  https://github.com/nvim-lualine/lualine.nvim/blob/master/scripts/nvim_isolated_conf.sh\n\n  Create an isolated config directory with:\n\n    `nvim_isolated_conf.sh -c DirectoryName`\n\n  Then modify the DirectoryName/.config/nvim/init.vim\n  so you can reproduce the issue .\n\n    `nvim_isolated_conf.sh -e DirectoryName`\n\n  will open DirectoryName/.config/nvim/init.vim in neovim.\n  the init.vim will have instructions on how and where to place\n  your config don't worry if you don't know viml you can get away\n  with lua even in a vim file.\n\n  Then you can load the config in an isolated environment to see\n  if the issue is occurring with\n\n    `nvim_isolated_conf.sh -l DirectoryName`\n\n  Paste the DirectoryName/.config/init.vim below\n-->\n\n\n### Additional information\n\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "content": "---\nname: Feature Request\nabout: Request a feature for lualine\ntitle: \"Feat: \"\nlabels: new feature\n---\n\n<!--\n  Before creating a new request: search existing issues and prs\n  and ensure it hasn't been already requested.\n-->\n\n### Requested feature\n\n<!-- Describe the feature with details. -->\n\n### Motivation\n\n<!-- Explain why you think it should be included in lualine.-->\n"
  },
  {
    "path": ".github/generated-files-bot.yml",
    "content": "generatedFiles:\n  - path: \"doc/lualine.txt\"\n    message: \"`lualine.txt` is generated from README.md. Make changes there instead.\"\nignoreAuthors:\n  - 'github-actions[bot]'\n  - 'shadmansaleh'\n"
  },
  {
    "path": ".github/stale.yml",
    "content": "# Number of days of inactivity before an issue becomes stale\ndaysUntilStale: 60\n# Number of days of inactivity before a stale issue is closed\ndaysUntilClose: 7\n# Issues with these labels will never be considered stale\nexemptLabels:\n  - pinned\n  - upstream\n  - help wanted\n  - wip\n  - good first issue\n  - discuss\n  - pin\n# Label to use when marking an issue as stale\nstaleLabel: stale\n# Comment to post when marking an issue as stale. Set to `false` to disable\nmarkComment: >\n  This issue has been automatically marked as stale because it has not had\n  recent activity. It will be closed if no further activity occurs. Thank you\n  for your contributions.\n# Comment to post when closing a stale issue. Set to `false` to disable\ncloseComment: false\n"
  },
  {
    "path": ".github/workflows/autogen.yml",
    "content": "name: autogen\non:\n  push:\n    branches: [master]\n    paths:\n      - \"lua/**.lua\"\n      - \"examples/**.lua\"\n      - \"tests/**.lua\"\n      - \".stylua.toml\"\n      - \"README.md\"\n\n# Cancel any in-progress CI runs for a PR if it is updated\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}\n  cancel-in-progress: true\n\njobs:\n  autogen:\n    name: \"(vimdoc|formating)\"\n    runs-on: ubuntu-22.04\n    timeout-minutes: 10\n    permissions:\n      contents: write\n      pull-requests: write\n    steps:\n      - uses: actions/checkout@v2\n      - name: Generate docs with panvimdoc\n        uses: kdheepak/panvimdoc@v2.7.1\n        with:\n          vimdoc: lualine\n          description: fast and easy to configure statusline plugin for neovim\n      - name: Apply stylua\n        uses: JohnnyMorganz/stylua-action@1.0.0\n        with:\n          token: ${{ secrets.GITHUB_TOKEN }}\n          args: --config-path=.stylua.toml lua/ examples/ tests/\n          version: 0.14.1\n      - name: Push changes\n        uses: stefanzweifel/git-auto-commit-action@v4\n        with:\n          commit_user_name: github-actions[bot]\n          commit_user_email: 41898282+github-actions[bot]@users.noreply.github.com\n          commit_message: \"chore: autogen (vimdocs+formating)\"\n          branch: ${{ github.head_ref }}\n          file_pattern: lua/ examples/ tests/ doc/lualine.txt\n"
  },
  {
    "path": ".github/workflows/ci.yml",
    "content": "name: Tests\n\non:\n  push:\n    branches: [master]\n  pull_request:\n    branches: [master]\n\n# Cancel any in-progress CI runs for a PR if it is updated\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}\n  cancel-in-progress: true\n\njobs:\n  tests:\n    name: ${{ matrix.os }} ${{ matrix.flavor }}\n    strategy:\n      fail-fast: false\n      matrix:\n        include:\n          - flavor: nvim-0.7\n            runner: ubuntu-22.04\n            os: linux\n            nvim_version: v0.7.0\n          - flavor: nvim-0.8\n            runner: ubuntu-22.04\n            os: linux\n            nvim_version: v0.8.0\n          - flavor: nvim-0.9\n            runner: ubuntu-22.04\n            os: linux\n            nvim_version: v0.9.0\n          - flavor: nvim-0.10\n            runner: ubuntu-22.04\n            os: linux\n            nvim_version: v0.10.0\n          - flavor: nvim-0.11\n            runner: ubuntu-22.04\n            os: linux\n            nvim_version: v0.11.0\n          - flavor: nvim-nightly\n            runner: ubuntu-22.04\n            os: linux\n            nvim_version: nightly\n    runs-on: ${{ matrix.runner }}\n    timeout-minutes: 10\n    steps:\n      - uses: actions/checkout@v2\n      - name: Setup Test Environment\n        run: |\n          mkdir -p ./tmp_home/nvim/pack/vendor/start\n          git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ./tmp_home/nvim/pack/vendor/start/plenary.nvim\n          git clone --depth 1 https://github.com/nvim-tree/nvim-web-devicons ./tmp_home/nvim/pack/vendor/start/nvim-web-devicons\n          ln -s $(pwd) ./tmp_home/nvim/pack/vendor/start\n      - name: Setup neovim ${{matrix.nvim_version}}\n        uses: rhysd/action-setup-vim@v1\n        with:\n          neovim: true\n          version: ${{matrix.nvim_version}}\n      - name: Run tests\n        run: |\n          make test\n  lint:\n    runs-on: ubuntu-22.04\n    timeout-minutes: 10\n    steps:\n      - uses: actions/checkout@v2\n      - name: Setup linters\n        run: |\n          sudo apt-get update\n          sudo apt-get install luarocks\n          sudo luarocks install luacheck\n      - name: Run luacheck\n        run: |\n          make lint\n"
  },
  {
    "path": ".gitignore",
    "content": "# 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*.elf\n\n# Precompiled Headers\n*.gch\n*.pch\n\n# Libraries\n*.lib\n*.a\n*.la\n*.lo\n*.def\n*.exp\n\n# Shared objects (inc. Windows DLLs)\n*.dll\n*.so\n*.so.*\n*.dylib\n\n# Executables\n*.exe\n*.out\n*.app\n*.i*86\n*.x86_64\n*.hex\n\n# ctags\ntags\n\n# helptags\n/doc/tags\n\n# panvimdoc\n/panvimdoc/\n\n# luacov\n/luacov.report\n/luacov.report.index\n/luacov.stats\n\n# tests\n/tmp_home/\n.luarc.json\n"
  },
  {
    "path": ".luacheckrc",
    "content": "globals = {\n   \"vim\",\n   \"assert\"\n}\n\n-- Don't report unused self arguments of methods.\nself = false\n\n-- Rerun tests only if their modification time changed.\ncache = true\n\nignore = {\n  \"631\",  -- max_line_length\n  \"212/_.*\",  -- unused argument, for vars with \"_\" prefix\n}\n"
  },
  {
    "path": ".luacov",
    "content": "return {\n  include = {\n    \"lua/lualine$\",\n    \"lua/lualine_require$\",\n    \"lua/lualine%/.+$\",\n  },\n  exclude = {\n    \"lua/lualine/themes%/.+$\",\n    \"lua/lualine/extensions%/.+$\",\n  },\n  modules = {\n    [\"lualine\"] = \"lua/lualine.lua\",\n    [\"lualine_require\"] = \"lua/lualine_require.lua\",\n    [\"lualine.*\"] = \"lua/\",\n  },\n  statsfile = 'luacov.stats',\n  reportfile = 'luacov.report',\n  -- includeuntestedfiles = true,\n}\n-- vim:ft=lua\n"
  },
  {
    "path": ".stylua.toml",
    "content": "indent_type = \"Spaces\"\nindent_width = 2\nquote_style = \"AutoPreferSingle\"\ncall_parentheses = \"NoSingleTable\"\ncollapse_simple_statement = \"Never\"\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# Contributing to lualine.nvim\n\nThanks for considering to contribute.\n\n### Getting started\n\nIf you're not sure where to help? You can try these:\n\n- You can look at the currently open [issues](https://github.com/nvim-lualine/lualine.nvim/issues)\n  to see if some bug needs fixing or for cool feature ideas.<br>\n  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>\n  *We could really use some help with tests & docs they are currently lacking :)*\n- You can add an exciting new component, extension or theme.\n  Note: Currently we aren't adding regular colorscheme based themes.\n  We think they make more sense with colorschemes as they tend not to get\n  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.\n- Feel free to open issues or unfinished PRs for help.\n  I'd actually recommend you to open an issue first for bigger PRs to discuss\n  the feature with a maintainer beforehand. That way you can know if the\n  feature is likely to be accepted or not before you get started.\n  You'll get recommendation and help with implementation specially if you show\n  willingness to implement it yourself.\n- Do add tests and docs for your changes.\n\nGood luck!\n\n### Developer tools\n\n*Let's introduce you to the tools we use.*\n\n- Your PR needs to pass tests & linter. We lint our codebase with [luacheck](https://github.com/mpeterv/luacheck)\n  and run tests with [plenary-test][plenary.nvim] these will be run on CI. If you want you can run tests & linter\n  locally with `make test` & `make lint` respectively. Or `make check` to run both linter & tests. For running\n  tests you'll have to make sure lualine.nvim, [plenary.nvim][plenary.nvim] and\n  [nvim-web-devicons](https://github.com/nvim-tree/nvim-web-devicons) are in same directory.\n- Lua codebase gets formatted with [stylua](https://github.com/JohnnyMorganz/StyLua) in CI.\n  So you can ignore formatting. But if you want to submit formatted\n  PR you can run formatter locally with `make format`.\n- VimDocs are auto generated with [panvimdoc](https://github.com/kdheepak/panvimdoc) from README.md.\n  So don't make changes to doc/lualine.txt . Instead add your docs to README or Wiki.\n  The docgen in ran by CI too. If you want to run it locally you can do so\n  with `make docgen`. Note: you'll need to have [pandoc](https://github.com/jgm/pandoc) installed.\n- `make precommit_check` can come quite handy it'll run all the above mentioned tools\n- You can check our test coverage with `make testcov`.\n  You'll need to have [luacov](https://github.com/keplerproject/luacov)\n  & [luacov-console](https://github.com/spacewander/luacov-console) installed for that.\n  If you want luacov's detailed report files, run the command with the `NOCLEAN` env set.\n  For example `NOCLEAN=1 make testcov`\n\n[plenary.nvim]: https://github.com/nvim-lua/plenary.nvim\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2020 hoob3rt\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "Makefile",
    "content": ".DEFAULT_GOAL = check\n\nlint:\n\t@luacheck lua/lualine/\n\t@luacheck tests/\n\t@luacheck examples/\n\nformat:\n\t@stylua --config-path=.stylua.toml lua/ examples/ tests/\n\ntest:\n\t@mkdir -p tmp_home\n\t@export XDG_DATA_HOME='./tmp_home' && \\\n\texport XDG_CONFIG_HOME='./tmp_home' && \\\n\tbash ./scripts/test_runner.sh\n\t@rm -rf tmp_home\n\n# Install luacov & luacov-console from luarocks\ntestcov:\n\t@mkdir -p ./tmp_home/data/nvim\n\t@mkdir -p ./tmp_home/config/nvim\n\t@export XDG_DATA_HOME=$(realpath './tmp_home/data') && \\\n\texport XDG_CONFIG_HOME=$(realpath './tmp_home/config') && \\\n\texport TEST_COV=true && \\\n\tbash ./scripts/test_runner.sh\n\t@luacov-console lua/\n\t@luacov-console -s\nifeq ($(NOCLEAN), )\n\t\t@rm luacov.*\nendif\n\t@rm -rf tmp_home\n\ndocgen:\n\t@sh ./scripts/docgen.sh\n\nprecommit_check: docgen format test lint\n\ncheck: lint test\n"
  },
  {
    "path": "README.md",
    "content": "# lualine.nvim\n\n<!-- panvimdoc-ignore-start -->\n\n![code size](https://img.shields.io/github/languages/code-size/nvim-lualine/lualine.nvim?style=flat-square)\n![license](https://img.shields.io/github/license/nvim-lualine/lualine.nvim?style=flat-square)\n\n<!-- panvimdoc-ignore-end -->\n\nA blazing fast and easy to configure Neovim statusline written in Lua.\n\n`lualine.nvim` requires Neovim >= 0.7.\n\nFor previous versions of neovim please use compatability tags for example\ncompat-nvim-0.5\n\n## Contributing\n\nFeel free to create an issue/PR if you want to see anything else implemented.\nIf you have some question or need help with configuration, start a [discussion](https://github.com/nvim-lualine/lualine.nvim/discussions).\n\nPlease read [CONTRIBUTING.md](./CONTRIBUTING.md) before opening a PR.\nYou can also help with documentation in the [wiki](https://github.com/nvim-lualine/lualine.nvim/wiki).\n\n<!-- panvimdoc-ignore-start -->\n\n## Screenshots\n\nHere is a preview of what lualine can look like.\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108650373-bb025580-74bf-11eb-8682-2c09321dd18e.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108650377-bd64af80-74bf-11eb-9c55-fbfc51b39fe8.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108650378-be95dc80-74bf-11eb-9718-82b242ecdd54.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108650381-bfc70980-74bf-11eb-9245-85c48f0f154a.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/103467925-32372b00-4d54-11eb-88d6-6d39c46854d8.png'/>\n</p>\n\nScreenshots of all available themes are listed in [THEMES.md](./THEMES.md)\n\nFor those who want to break the norms, you can create custom looks for lualine.\n\n**Example** :\n\n- [evil_lualine](examples/evil_lualine.lua)\n  <img width='700' src='https://user-images.githubusercontent.com/13149513/113875129-4453ba00-97d8-11eb-8f21-94a9ef565db3.png'/>\n- [slanted-gaps](examples/slanted-gaps.lua)\n  <img width='700' src='https://user-images.githubusercontent.com/13149513/143395518-f6d6f748-c1ca-491b-9dab-246d0a8cf23f.png'/>\n- [bubbles](examples/bubbles.lua)\n  <img width='700' src='https://user-images.githubusercontent.com/20235646/131350468-fc556196-5f46-4bfe-a72e-960f6a58db2c.png'/>\n- [cosmicink](examples/cosmicink.lua)\n  <img width='700' src='https://github.com/user-attachments/assets/c8d3e4ba-4997-42e9-a1bb-d5e2a444bbfd'/>\n\n<!-- panvimdoc-ignore-end -->\n\n## Performance compared to other plugins\n\nUnlike other statusline plugins, lualine loads only the components you specify, and nothing else.\n\nStartup time performance measured with an amazing plugin [dstein64/vim-startuptime](https://github.com/dstein64/vim-startuptime)\n\nTimes are measured with a clean `init.vim` with only `vim-startuptime`,\n`vim-plug` and given statusline plugin installed.\nIn control just `vim-startuptime` and`vim-plug` is installed.\nAnd measured time is complete startuptime of vim not time spent\non specific plugin. These numbers are the average of 20 runs.\n\n| control | lualine | lightline | airline |\n| :-----: | :-----: | :-------: | :-----: |\n| 17.2 ms | 24.8 ms |  25.5 ms  | 79.9 ms |\n\nLast Updated On: 18-04-2022\n\n## Installation\n\n### [vim-plug](https://github.com/junegunn/vim-plug)\n\n```vim\nPlug 'nvim-lualine/lualine.nvim'\n\" If you want to have icons in your statusline choose one of these\nPlug 'nvim-tree/nvim-web-devicons'\n```\n\n### [packer.nvim](https://github.com/wbthomason/packer.nvim)\n\n```lua\nuse {\n  'nvim-lualine/lualine.nvim',\n  requires = { 'nvim-tree/nvim-web-devicons', opt = true }\n}\n```\n\n### [lazy.nvim](https://github.com/folke/lazy.nvim)\n\n```lua\n{\n    'nvim-lualine/lualine.nvim',\n    dependencies = { 'nvim-tree/nvim-web-devicons' }\n}\n```\n\nYou'll also need to have a patched font if you want icons.\n\n## Usage and customization\n\nLualine has sections as shown below.\n\n```text\n+-------------------------------------------------+\n| A | B | C                             X | Y | Z |\n+-------------------------------------------------+\n```\n\nEach sections holds its components e.g. Vim's current mode.\n\n### Configuring lualine in init.vim\n\nAll the examples below are in lua. You can use the same examples\nin `.vim` files by wrapping them in lua heredoc like this:\n\n```vim\nlua << END\nrequire('lualine').setup()\nEND\n```\n\nFor more information, check out `:help lua-heredoc`.\n\n#### Default configuration\n\n```lua\nrequire('lualine').setup {\n  options = {\n    icons_enabled = true,\n    theme = 'auto',\n    component_separators = { left = '', right = ''},\n    section_separators = { left = '', right = ''},\n    disabled_filetypes = {\n      statusline = {},\n      winbar = {},\n    },\n    ignore_focus = {},\n    always_divide_middle = true,\n    always_show_tabline = true,\n    globalstatus = false,\n    refresh = {\n      statusline = 1000,\n      tabline = 1000,\n      winbar = 1000,\n      refresh_time = 16, -- ~60fps\n      events = {\n        'WinEnter',\n        'BufEnter',\n        'BufWritePost',\n        'SessionLoadPost',\n        'FileChangedShellPost',\n        'VimResized',\n        'Filetype',\n        'CursorMoved',\n        'CursorMovedI',\n        'ModeChanged',\n      },\n    }\n  },\n  sections = {\n    lualine_a = {'mode'},\n    lualine_b = {'branch', 'diff', 'diagnostics'},\n    lualine_c = {'filename'},\n    lualine_x = {'encoding', 'fileformat', 'filetype'},\n    lualine_y = {'progress'},\n    lualine_z = {'location'}\n  },\n  inactive_sections = {\n    lualine_a = {},\n    lualine_b = {},\n    lualine_c = {'filename'},\n    lualine_x = {'location'},\n    lualine_y = {},\n    lualine_z = {}\n  },\n  tabline = {},\n  winbar = {},\n  inactive_winbar = {},\n  extensions = {}\n}\n```\n\nIf you want to get your current lualine config, you can\ndo so with:\n\n```lua\nrequire('lualine').get_config()\n\n```\n\n---\n\n### Starting lualine\n\n```lua\nrequire('lualine').setup()\n```\n\n---\n\n### Setting a theme\n\n```lua\noptions = { theme = 'gruvbox' }\n```\n\nAll available themes are listed in [THEMES.md](./THEMES.md).\n\nPlease create a PR if you managed to port a popular theme before us, [here is how to do it](./CONTRIBUTING.md).\n\n#### Customizing themes\n\n```lua\nlocal custom_gruvbox = require'lualine.themes.gruvbox'\n\n-- Change the background of lualine_c section for normal mode\ncustom_gruvbox.normal.c.bg = '#112233'\n\nrequire('lualine').setup {\n  options = { theme  = custom_gruvbox },\n  ...\n}\n```\n\nTheme structure is available [here](https://github.com/nvim-lualine/lualine.nvim/wiki/Writing-a-theme).\n\n---\n\n### Separators\n\nlualine defines two kinds of separators:\n\n- `section_separators` - separators between sections\n- `component_separators` - separators between the different components in sections\n\n**Note**: if viewing this README in a browser, chances are the characters below will not be visible.\n\n```lua\noptions = {\n  section_separators = { left = '', right = '' },\n  component_separators = { left = '', right = '' }\n}\n```\n\nHere, left refers to the left-most sections (a, b, c), and right refers\nto the right-most sections (x, y, z).\n\n#### Disabling separators\n\n```lua\noptions = { section_separators = '', component_separators = '' }\n```\n\n---\n\n### Changing components in lualine sections\n\n```lua\nsections = {lualine_a = {'mode'}}\n```\n\n#### Available components\n\n- `branch` (git branch)\n- `buffers` (shows currently available buffers)\n- `diagnostics` (diagnostics count from your preferred source)\n- `diff` (git diff status)\n- `encoding` (file encoding)\n- `fileformat` (file format)\n- `filename`\n- `filesize`\n- `filetype`\n- `hostname`\n- `location` (location in file in line:column format)\n- `mode` (vim mode)\n- `progress` (%progress in file)\n- `searchcount` (number of search matches when hlsearch is active)\n- `selectioncount` (number of selected characters or lines)\n- `tabs` (shows currently available tabs)\n- `windows` (shows currently available windows)\n- `lsp_status` (shows active LSPs in the current buffer and a progress spinner)\n\n#### Custom components\n\n##### Lua functions as lualine component\n\n```lua\nlocal function hello()\n  return [[hello world]]\nend\nsections = { lualine_a = { hello } }\n```\n\n##### Vim functions as lualine component\n\n```lua\nsections = { lualine_a = {'FugitiveHead'} }\n```\n\n##### Vim's statusline items as lualine component\n\n```lua\nsections = { lualine_c = {'%=', '%t%m', '%3p'} }\n```\n\n##### Vim variables as lualine component\n\nVariables from `g:`, `v:`, `t:`, `w:`, `b:`, `o:`, `to:`, `wo:`, `bo:` scopes can be used.\n\nSee `:h lua-vim-variables` and `:h lua-vim-options` if you are not sure what to use.\n\n```lua\nsections = { lualine_a = { 'g:coc_status', 'bo:filetype' } }\n```\n\n##### Lua expressions as lualine component\n\nYou can use any valid lua expression as a component including:\n\n- oneliners\n- global variables\n- require statements\n\n```lua\nsections = { lualine_c = { \"os.date('%a')\", 'data', \"require'lsp-status'.status()\" } }\n```\n\n`data` is a global variable in this example.\n\n---\n\n### Component options\n\nComponent options can change the way a component behave.\nThere are two kinds of options:\n\n- global options affecting all components\n- local options affecting specific\n\nGlobal options can be used as local options (can be applied to specific components)\nbut you cannot use local options as global.\nGlobal option used locally overwrites the global, for example:\n\n```lua\n    require('lualine').setup {\n      options = { fmt = string.lower },\n      sections = { lualine_a = {\n        { 'mode', fmt = function(str) return str:sub(1,1) end } },\n                  lualine_b = {'branch'} }\n    }\n```\n\n`mode` will be formatted with the passed function so only first char will be\nshown . On the other hand branch will be formatted with global formatter\n`string.lower` so it will be showed in lower case.\n\n#### Available options\n\n#### Global options\n\nThese are `options` that are used in options table.\nThey set behavior of lualine.\n\nValues set here are treated as default for other options\nthat work in component level.\n\nFor example even though `icons_enabled` is a general component option.\nYou can set `icons_enabled` to `false` and icons will be disabled on all\ncomponent. You can still overwrite defaults set in option table by specifying\nthe option value in component.\n\n```lua\noptions = {\n  theme = 'auto', -- lualine theme\n  component_separators = { left = '', right = '' },\n  section_separators = { left = '', right = '' },\n  disabled_filetypes = {     -- Filetypes to disable lualine for.\n      statusline = {},       -- only ignores the ft for statusline.\n      winbar = {},           -- only ignores the ft for winbar.\n  },\n\n  ignore_focus = {},         -- If current filetype is in this list it'll\n                             -- always be drawn as inactive statusline\n                             -- and the last window will be drawn as active statusline.\n                             -- for example if you don't want statusline of\n                             -- your file tree / sidebar window to have active\n                             -- statusline you can add their filetypes here.\n                             --\n                             -- Can also be set to a function that takes the\n                             -- currently focused window as its only argument\n                             -- and returns a boolean representing whether the\n                             -- window's statusline should be drawn as inactive.\n\n  always_divide_middle = true, -- When set to true, left sections i.e. 'a','b' and 'c'\n                               -- can't take over the entire statusline even\n                               -- if neither of 'x', 'y' or 'z' are present.\n\n  always_show_tabline = true -- When set to true, if you have configured lualine for displaying tabline\n                          -- then tabline will always show. If set to false, then tabline will be displayed\n                          -- only when there are more than 1 tab. (see :h showtabline)\n\n  globalstatus = false,        -- enable global statusline (have a single statusline\n                               -- at bottom of neovim instead of one for  every window).\n                               -- This feature is only available in neovim 0.7 and higher.\n\n  refresh = {                  -- sets how often lualine should refresh it's contents (in ms)\n    statusline = 100,         -- The refresh option sets minimum time that lualine tries\n    tabline = 100,            -- to maintain between refresh. It's not guarantied if situation\n    winbar = 100              -- arises that lualine needs to refresh itself before this time\n                              -- it'll do it.\n    refresh_time = 16,        -- ~60fps the time after which refresh queue is processed. Mininum refreshtime for lualine\n    events = {                -- The auto command events at which lualine refreshes\n      'WinEnter',\n      'BufEnter',\n      'BufWritePost',\n      'SessionLoadPost',\n      'FileChangedShellPost',\n      'VimResized',\n      'Filetype',\n      'CursorMoved',\n      'CursorMovedI',\n      'ModeChanged',\n    },\n                               -- Also you can force lualine's refresh by calling refresh function\n                               -- like require('lualine').refresh()\n  }\n}\n```\n\n#### General component options\n\nThese are options that control behavior at component level\nand are available for all components.\n\n```lua\nsections = {\n  lualine_a = {\n    {\n      'mode',\n      icons_enabled = true, -- Enables the display of icons alongside the component.\n      -- Defines the icon to be displayed in front of the component.\n      -- Can be string|table\n      -- As table it must contain the icon as first entry and can use\n      -- color option to custom color the icon. Example:\n      -- {'branch', icon = ''} / {'branch', icon = {'', color={fg='green'}}}\n\n      -- icon position can also be set to the right side from table. Example:\n      -- {'branch', icon = {'', align='right', color={fg='green'}}}\n      icon = nil,\n\n      separator = nil,      -- Determines what separator to use for the component.\n                            -- Note:\n                            --  When a string is provided it's treated as component_separator.\n                            --  When a table is provided it's treated as section_separator.\n                            --  Passing an empty string disables the separator.\n                            --\n                            -- These options can be used to set colored separators\n                            -- around a component.\n                            --\n                            -- The options need to be set as such:\n                            --   separator = { left = '', right = ''}\n                            --\n                            -- Where left will be placed on left side of component,\n                            -- and right will be placed on its right.\n                            --\n\n      cond = nil,           -- Condition function, the component is loaded when the function returns `true`.\n\n      draw_empty = false,   -- Whether to draw component even if it's empty.\n                            -- Might be useful if you want just the separator.\n\n      -- Defines a custom color for the component:\n      --\n      -- 'highlight_group_name' | { fg = '#rrggbb'|cterm_value(0-255)|'color_name(red)', bg= '#rrggbb', gui='style' } | function\n      -- Note:\n      --  '|' is synonymous with 'or', meaning a different acceptable format for that placeholder.\n      -- 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' })\n      -- color functions can be used to have different colors based on state as shown below.\n      --\n      -- Examples:\n      --   color = { fg = '#ffaa88', bg = 'grey', gui='italic,bold' },\n      --   color = { fg = 204 }   -- When fg/bg are omitted, they default to the your theme's fg/bg.\n      --   color = 'WarningMsg'   -- Highlight groups can also be used.\n      --   color = function(section)\n      --      return { fg = vim.bo.modified and '#aa3355' or '#33aa88' }\n      --   end,\n      color = nil, -- The default is your theme's color for that section and mode.\n\n      -- Specify what type a component is, if omitted, lualine will guess it for you.\n      --\n      -- Available types are:\n      --   [format: type_name(example)], mod(branch/filename),\n      --   stl(%f/%m), var(g:coc_status/bo:modifiable),\n      --   lua_expr(lua expressions), vim_fun(viml function name)\n      --\n      -- Note:\n      -- lua_expr is short for lua-expression and vim_fun is short for vim-function.\n      type = nil,\n\n      padding = 1, -- Adds padding to the left and right of components.\n                   -- Padding can be specified to left or right independently, e.g.:\n                   --   padding = { left = left_padding, right = right_padding }\n\n      fmt = nil,   -- Format function, formats the component's output.\n                   -- This function receives two arguments:\n                   -- - string that is going to be displayed and\n                   --   that can be changed, enhanced and etc.\n                   -- - context object with information you might\n                   --   need. E.g. tabnr if used with tabs.\n      on_click = nil, -- takes a function that is called when component is clicked with mouse.\n                   -- the function receives several arguments\n                   -- - number of clicks in case of multiple clicks\n                   -- - mouse button used (l(left)/r(right)/m(middle)/...)\n                   -- - modifiers pressed (s(shift)/c(ctrl)/a(alt)/m(meta)...)\n    }\n  }\n}\n```\n\n#### Component specific options\n\nThese are options that are available on specific components.\nFor example, you have option on `diagnostics` component to\nspecify what your diagnostic sources will be.\n\n#### buffers component options\n\n```lua\nsections = {\n  lualine_a = {\n    {\n      'buffers',\n      show_filename_only = true,   -- Shows shortened relative path when set to false.\n      hide_filename_extension = false,   -- Hide filename extension when set to true.\n      show_modified_status = true, -- Shows indicator when the buffer is modified.\n\n      mode = 0, -- 0: Shows buffer name\n                -- 1: Shows buffer index\n                -- 2: Shows buffer name + buffer index\n                -- 3: Shows buffer number\n                -- 4: Shows buffer name + buffer number\n\n      max_length = vim.o.columns * 2 / 3, -- Maximum width of buffers component,\n                                          -- it can also be a function that returns\n                                          -- the value of `max_length` dynamically.\n      filetype_names = {\n        TelescopePrompt = 'Telescope',\n        dashboard = 'Dashboard',\n        packer = 'Packer',\n        fzf = 'FZF',\n        alpha = 'Alpha'\n      }, -- Shows specific buffer name for that filetype ( { `filetype` = `buffer_name`, ... } )\n\n      -- Automatically updates active buffer color to match color of other components (will be overidden if buffers_color is set)\n      use_mode_colors = false,\n\n      buffers_color = {\n        -- Same values as the general color option can be used here.\n        active = 'lualine_{section}_normal',     -- Color for active buffer.\n        inactive = 'lualine_{section}_inactive', -- Color for inactive buffer.\n      },\n\n      symbols = {\n        modified = ' ●',      -- Text to show when the buffer is modified\n        alternate_file = '#', -- Text to show to identify the alternate file\n        directory =  '',     -- Text to show when the buffer is a directory\n      },\n    }\n  }\n}\n```\n\n#### datetime component options\n\n```lua\nsections = {\n  lualine_a = {\n    {\n      'datetime',\n      -- options: default, us, uk, iso, or your own format string (\"%H:%M\", etc..)\n      style = 'default'\n    }\n  }\n}\n```\n\n#### diagnostics component options\n\n```lua\nsections = {\n  lualine_a = {\n    {\n      'diagnostics',\n\n      -- Table of diagnostic sources, available sources are:\n      --   'nvim_lsp', 'nvim_diagnostic', 'nvim_workspace_diagnostic', 'coc', 'ale', 'vim_lsp'.\n      -- or a function that returns a table as such:\n      --   { error=error_cnt, warn=warn_cnt, info=info_cnt, hint=hint_cnt }\n      sources = { 'nvim_diagnostic', 'coc' },\n\n      -- Displays diagnostics for the defined severity types\n      sections = { 'error', 'warn', 'info', 'hint' },\n\n      diagnostics_color = {\n        -- Same values as the general color option can be used here.\n        error = 'DiagnosticError', -- Changes diagnostics' error color.\n        warn  = 'DiagnosticWarn',  -- Changes diagnostics' warn color.\n        info  = 'DiagnosticInfo',  -- Changes diagnostics' info color.\n        hint  = 'DiagnosticHint',  -- Changes diagnostics' hint color.\n      },\n      symbols = {error = 'E', warn = 'W', info = 'I', hint = 'H'},\n      colored = true,           -- Displays diagnostics status in color if set to true.\n      update_in_insert = false, -- Update diagnostics in insert mode.\n      always_visible = false,   -- Show diagnostics even if there are none.\n    }\n  }\n}\n```\n\n#### diff component options\n\n```lua\nsections = {\n  lualine_a = {\n    {\n      'diff',\n      colored = true, -- Displays a colored diff status if set to true\n      diff_color = {\n        -- Same color values as the general color option can be used here.\n        added    = 'LuaLineDiffAdd',    -- Changes the diff's added color\n        modified = 'LuaLineDiffChange', -- Changes the diff's modified color\n        removed  = 'LuaLineDiffDelete', -- Changes the diff's removed color you\n      },\n      symbols = {added = '+', modified = '~', removed = '-'}, -- Changes the symbols used by the diff.\n      source = nil, -- A function that works as a data source for diff.\n                    -- It must return a table as such:\n                    --   { added = add_count, modified = modified_count, removed = removed_count }\n                    -- or nil on failure. count <= 0 won't be displayed.\n    }\n  }\n}\n```\n\n#### fileformat component options\n\n```lua\nsections = {\n  lualine_a = {\n    {\n      'fileformat',\n      symbols = {\n        unix = '', -- e712\n        dos = '',  -- e70f\n        mac = '',  -- e711\n      }\n    }\n  }\n}\n```\n\n#### filename component options\n\n```lua\nsections = {\n  lualine_a = {\n    {\n      'filename',\n      file_status = true,      -- Displays file status (readonly status, modified status)\n      newfile_status = false,  -- Display new file status (new file means no write after created)\n      path = 0,                -- 0: Just the filename\n                               -- 1: Relative path\n                               -- 2: Absolute path\n                               -- 3: Absolute path, with tilde as the home directory\n                               -- 4: Filename and parent dir, with tilde as the home directory\n\n      shorting_target = 40,    -- Shortens path to leave 40 spaces in the window\n                               -- for other components. (terrible name, any suggestions?)\n                               -- It can also be a function that returns\n                               -- the value of `shorting_target` dynamically.\n      symbols = {\n        modified = '[+]',      -- Text to show when the file is modified.\n        readonly = '[-]',      -- Text to show when the file is non-modifiable or readonly.\n        unnamed = '[No Name]', -- Text to show for unnamed buffers.\n        newfile = '[New]',     -- Text to show for newly created file before first write\n      }\n    }\n  }\n}\n```\n\n#### filetype component options\n\n```lua\nsections = {\n  lualine_a = {\n    {\n      'filetype',\n      colored = true,   -- Displays filetype icon in color if set to true\n      icon_only = false, -- Display only an icon for filetype\n      icon = { align = 'right' }, -- Display filetype icon on the right hand side\n      -- icon =    {'X', align='right'}\n      -- Icon string ^ in table is ignored in filetype component\n    }\n  }\n}\n```\n\n#### encoding component options\n\n```lua\nsections = {\n  lualine_a = {\n    {\n      'encoding',\n      -- Show '[BOM]' when the file has a byte-order mark\n        show_bomb = false,\n    }\n  }\n}\n```\n\n#### searchcount component options\n\n```lua\nsections = {\n  lualine_a = {\n    {\n      'searchcount',\n      maxcount = 999,\n      timeout = 500,\n    }\n  }\n}\n```\n\n#### tabs component options\n\n```lua\nsections = {\n  lualine_a = {\n    {\n      'tabs',\n      tab_max_length = 40,  -- Maximum width of each tab. The content will be shorten dynamically (example: apple/orange -> a/orange)\n      max_length = vim.o.columns / 3, -- Maximum width of tabs component.\n                                      -- Note:\n                                      -- It can also be a function that returns\n                                      -- the value of `max_length` dynamically.\n      mode = 0, -- 0: Shows tab_nr\n                -- 1: Shows tab_name\n                -- 2: Shows tab_nr + tab_name\n\n      path = 0, -- 0: just shows the filename\n                -- 1: shows the relative path and shorten $HOME to ~\n                -- 2: shows the full path\n                -- 3: shows the full path and shorten $HOME to ~\n\n      -- Automatically updates active tab color to match color of other components (will be overidden if buffers_color is set)\n      use_mode_colors = false,\n\n      tabs_color = {\n        -- Same values as the general color option can be used here.\n        active = 'lualine_{section}_normal',     -- Color for active tab.\n        inactive = 'lualine_{section}_inactive', -- Color for inactive tab.\n      },\n\n      show_modified_status = true,  -- Shows a symbol next to the tab name if the file has been modified.\n      symbols = {\n        modified = '[+]',  -- Text to show when the file is modified.\n      },\n\n      fmt = function(name, context)\n        -- Show + if buffer is modified in tab\n        local buflist = vim.fn.tabpagebuflist(context.tabnr)\n        local winnr = vim.fn.tabpagewinnr(context.tabnr)\n        local bufnr = buflist[winnr]\n        local mod = vim.fn.getbufvar(bufnr, '&mod')\n\n        return name .. (mod == 1 and ' +' or '')\n      end\n    }\n  }\n}\n```\n\n#### windows component options\n\n```lua\nsections = {\n  lualine_a = {\n    {\n      'windows',\n      show_filename_only = true,   -- Shows shortened relative path when set to false.\n      show_modified_status = true, -- Shows indicator when the window is modified.\n\n      mode = 0, -- 0: Shows window name\n                -- 1: Shows window index\n                -- 2: Shows window name + window index\n\n      max_length = vim.o.columns * 2 / 3, -- Maximum width of windows component,\n                                          -- it can also be a function that returns\n                                          -- the value of `max_length` dynamically.\n      filetype_names = {\n        TelescopePrompt = 'Telescope',\n        dashboard = 'Dashboard',\n        packer = 'Packer',\n        fzf = 'FZF',\n        alpha = 'Alpha'\n      }, -- Shows specific window name for that filetype ( { `filetype` = `window_name`, ... } )\n\n      disabled_buftypes = { 'quickfix', 'prompt' }, -- Hide a window if its buffer's type is disabled\n\n      -- Automatically updates active window color to match color of other components (will be overidden if buffers_color is set)\n      use_mode_colors = false,\n\n      windows_color = {\n        -- Same values as the general color option can be used here.\n        active = 'lualine_{section}_normal',     -- Color for active window.\n        inactive = 'lualine_{section}_inactive', -- Color for inactive window.\n      },\n    }\n  }\n}\n```\n\n#### lsp status component options\n\n```lua\nsections = {\n  lualine_a = {\n    {\n      'lsp_status',\n      icon = '', -- f013\n      symbols = {\n        -- Standard unicode symbols to cycle through for LSP progress:\n        spinner = { '⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏' },\n        -- Standard unicode symbol for when LSP is done:\n        done = '✓',\n        -- Delimiter inserted between LSP names:\n        separator = ' ',\n      },\n      -- List of LSP names to ignore (e.g., `null-ls`):\n      ignore_lsp = {},\n      -- Display the LSP name\n      show_name = true,\n    }\n  }\n}\n```\n\n---\n\n### Tabline\n\nYou can use lualine to display components in tabline.\nThe configuration for tabline sections is exactly the same as that of the statusline.\n\n```lua\ntabline = {\n  lualine_a = {},\n  lualine_b = {'branch'},\n  lualine_c = {'filename'},\n  lualine_x = {},\n  lualine_y = {},\n  lualine_z = {}\n}\n```\n\nThis will show the branch and filename components on top of neovim inside tabline.\n\nlualine also provides 2 components, buffers and tabs, that you can use to get a more traditional tabline/bufferline.\n\n```lua\ntabline = {\n  lualine_a = {'buffers'},\n  lualine_b = {'branch'},\n  lualine_c = {'filename'},\n  lualine_x = {},\n  lualine_y = {},\n  lualine_z = {'tabs'}\n}\n```\n\n### Winbar\n\nFrom neovim-0.8 you can customize your winbar with lualine.\nWinbar configuration is similar to statusline.\n\n```lua\nwinbar = {\n  lualine_a = {},\n  lualine_b = {},\n  lualine_c = {'filename'},\n  lualine_x = {},\n  lualine_y = {},\n  lualine_z = {}\n}\n\ninactive_winbar = {\n  lualine_a = {},\n  lualine_b = {},\n  lualine_c = {'filename'},\n  lualine_x = {},\n  lualine_y = {},\n  lualine_z = {}\n}\n```\n\nJust like statusline you can separately specify winbar for active and inactive\nwindows. Any lualine component can be placed in winbar. All kinds of custom\ncomponents supported in statusline are also supported for winbar too. In general\nYou can treat winbar as another lualine statusline that just appears on top\nof windows instead of at bottom.\n\n#### Buffers\n\nShows currently open buffers. Like bufferline . See\n[buffers options](#buffers-component-options)\nfor all builtin behaviors of buffers component.\nYou can use `:LualineBuffersJump` to jump to buffer based on index\nof buffer in buffers component.\nJumping to non-existent buffer indices generates an error. To avoid these errors\n`LualineBuffersJump` provides `<bang>` support, meaning that you can call\n`:LualineBufferJump!` to ignore these errors.\n\n```vim\n  :LualineBuffersJump 2  \" Jumps to 2nd buffer in buffers component.\n  :LualineBuffersJump $  \" Jumps to last buffer in buffers component.\n  :LualineBuffersJump! 3  \" Attempts to jump to 3rd buffer, if it exists.\n```\n\n#### Tabs\n\nShows currently open tab. Like usual tabline. See\n[tabs options](#tabs-component-options)\nfor all builtin behaviors of tabs component.\nYou can also use `:LualineRenameTab` to set a name for a tabpage.\nFor example:\n\n```vim\n:LualineRenameTab Project_K\n```\n\nIt's useful when you're using rendering mode 2/3 in tabs.\nTo unname a tabpage run `:LualineRenameTab` without argument.\n\n#### Tabline as statusline\n\nYou can also completely move your statusline to a tabline by configuring\n`lualine.tabline` and disabling `lualine.sections` and `lualine.inactive_sections`:\n\n```lua\ntabline = {\n......\n  },\nsections = {},\ninactive_sections = {},\n```\n\nIf you want a more sophisticated tabline you can use other\ntabline plugins with lualine too, for example:\n\n- [nvim-bufferline](https://github.com/akinsho/nvim-bufferline.lua)\n- [tabline.nvim](https://github.com/kdheepak/tabline.nvim)\n\ntabline.nvim even uses lualine's theme by default 🙌\nYou can find a bigger list [here](https://github.com/rockerBOO/awesome-neovim#tabline).\n\n---\n\n### Extensions\n\nlualine extensions change statusline appearance for a window/buffer with\nspecified filetypes.\n\nBy default no extensions are loaded to improve performance.\nYou can load extensions with:\n\n```lua\nextensions = {'quickfix'}\n```\n\n#### Available extensions\n\n- aerial\n- assistant\n- avante\n- chadtree\n- ctrlspace\n- fern\n- fugitive\n- fzf\n- lazy\n- man\n- mason\n- mundo\n- neo-tree\n- nerdtree\n- nvim-dap-ui\n- nvim-tree\n- oil\n- overseer\n- quickfix\n- symbols-outline\n- toggleterm\n- trouble\n\n#### Custom extensions\n\nYou can define your own extensions. If you believe an extension may be useful to others, then please submit a PR.\n\n```lua\nlocal my_extension = { sections = { lualine_a = {'mode'} }, filetypes = {'lua'} }\nrequire('lualine').setup { extensions = { my_extension } }\n```\n\n---\n\n### Refreshing lualine\n\nBy default lualine refreshes itself based on timer and some events. You can set\nthe interval of the timer with refresh option. However you can also force\nlualine to refresh at any time by calling `lualine.refresh` function.\n\n```lua\nrequire('lualine').refresh({\n  scope = 'tabpage',  -- scope of refresh all/tabpage/window\n  place = { 'statusline', 'winbar', 'tabline' },  -- lualine segment ro refresh.\n})\n```\n\nThe arguments shown here are default values. So not passing any of them will be\ntreated as if a default value was passed.\n\nSo you can simply do\n\n```lua\nrequire('lualine').refresh()\n```\n\nAlso, note by default when you call refresh a refresh event is queued in lualine.\nIt desn't refresh event immidiately. It'll refresh on next refresh check pass.\nBy default this time is set to 16ms to match 60fps. This duration can be configured\nwith `options.refresh.refresh_time` option. If you want to bypass the refresh queue\nand want lualine to process the refresh immmidiately call refresh with `force=true`\nparameter set like this.\n```lua\nrequire('lualine').refresh({\n  force = true,       -- do an immidiate refresh\n  scope = 'tabpage',  -- scope of refresh all/tabpage/window\n  place = { 'statusline', 'winbar', 'tabline' },  -- lualine segment ro refresh.\n})\n```\nPractically, speaking this is almost never needed. Also you should avoid calling\n`lualine.refresh` with `force` inside components. Since components are\nevaluated during refresh, calling refresh while refreshing can have undesirable\neffects.\n\n\n### Disabling lualine\n\nYou can disable lualine for specific filetypes:\n\n```lua\noptions = { disabled_filetypes = {'lua'} }\n```\n\nYou can also disable lualine completely.\nNote that you need to call this after the setup\n\n```lua\n  require('lualine').hide({\n    place = {'statusline', 'tabline', 'winbar'}, -- The segment this change applies to.\n    unhide = false,  -- whether to re-enable lualine again/\n  })\n```\n\nThe arguments show for hide above are default values.\nWhich means even if the hide function is called without\narguments it'll work as if these were passed.\n\nSo in short to disable lualine completely you can do\n\n```lua\nrequire('lualine').hide()\n```\n\nTo enable it again you can do\n\n```lua\nrequire('lualine').hide({unhide=true})\n```\n\n<!-- panvimdoc-ignore-start -->\n\n### Contributors\n\nThanks to these wonderful people, we enjoy this awesome plugin.\n\n<a href=\"https://github.com/nvim-lualine/lualine.nvim/graphs/contributors\">\n  <img src=\"https://contrib.rocks/image?repo=nvim-lualine/lualine.nvim\" />\n</a>\n\n<!-- panvimdoc-ignore-end -->\n\n### Wiki\n\nCheck out the [wiki](https://github.com/nvim-lualine/lualine.nvim/wiki) for more info.\n\nYou 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.\n\nIf you want to extend lualine with plugins or want to know\nwhich ones already do, [wiki/plugins](https://github.com/nvim-lualine/lualine.nvim/wiki/Plugins) is for you.\n"
  },
  {
    "path": "THEMES.md",
    "content": "# Available themes\n\nAll 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.\n\n### auto\n\nauto is a special theme. It will automatically load theme for your colorscheme.\nIf there's no theme available for your colorscheme then\nit'll try it's best to generate one.\n\n### 16color\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648240-02d2ae00-74bb-11eb-9ac1-495849621366.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648219-f77f8280-74ba-11eb-84e4-978bf918c21f.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648263-141bba80-74bb-11eb-84e0-ff48ae6f927a.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648270-1a119b80-74bb-11eb-8fff-00984243846f.png'/>\n</p>\n\n### ayu_dark\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648314-357ca680-74bb-11eb-83de-ec94c3a75d99.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648329-3e6d7800-74bb-11eb-901b-41e1f01315f0.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648342-44fbef80-74bb-11eb-8262-a6f615e5fcfb.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648367-52b17500-74bb-11eb-8ec5-dbb59db60d98.png'/>\n</p>\n\n### ayu_light\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648508-b5a30c00-74bb-11eb-80f7-0bce969d35ea.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648511-b89dfc80-74bb-11eb-9868-f63d7752fe83.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648514-bb98ed00-74bb-11eb-87f4-6b24de56f86c.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648518-bd62b080-74bb-11eb-8cbe-869ed12d16dc.png'/>\n</p>\n\n### ayu_mirage\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648535-c6538200-74bb-11eb-815b-53f4b3274602.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648537-c784af00-74bb-11eb-8da5-d91bfc61a967.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648539-ca7f9f80-74bb-11eb-840a-5e0d9ba98bb8.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648541-cbb0cc80-74bb-11eb-843f-19c4c58b1d91.png'/>\n</p>\n\n### ayu\n\nIt's a combination of ayu_light, ayu_dark & ayu_mirage. If `g:ayucolor` exists,\nit loads one of these based on your `g:ayucolor` option. Otherwise, it will\nload ayu_light when background=light and ayu_dark when background=dark\nBut if `g:ayuprefermirage` exists, it will load ayu_mirage instead when\n`background=dark`.\n\n### base16\n\nThis 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.\nThe following example is using the `tomorrow-night` colorscheme:\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/11501572/156889654-3dedc9a1-e7a5-4cbe-b219-2a97499cf1d2.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/11501572/156889648-93bf3ce8-064d-4ac0-8415-20d6ef87c60b.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/11501572/156889624-c97fc3ae-d642-41ba-b39a-f9a72ff8b15e.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/11501572/156889566-17066e95-7f85-4bfd-8178-c4a34beab453.png'/>\n</p>\n\n### codedark\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648568-dff4c980-74bb-11eb-9d16-b68ac68f2ab2.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648569-e125f680-74bb-11eb-8782-db9a6c2a3153.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648578-e6834100-74bb-11eb-819c-fb66d7d5118c.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648582-e8e59b00-74bb-11eb-9239-edcc8e9c2c18.png'/>\n</p>\n\n### dracula\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648594-f0a53f80-74bb-11eb-9018-9ee12260750e.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648600-f26f0300-74bb-11eb-82a4-f732b3e7eeff.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648606-f4d15d00-74bb-11eb-8327-a35e97533617.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648619-fe5ac500-74bb-11eb-8952-cc5c81fd0b2b.png'/>\n</p>\n\n### everforest\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648663-1cc0c080-74bc-11eb-8cc1-36266a0385e3.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648667-1df1ed80-74bc-11eb-9ef8-dfd2e8401f0c.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648671-21857480-74bc-11eb-996e-a5cf212e98bd.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648675-22b6a180-74bc-11eb-9b8e-45e64a03e062.png'/>\n</p>\n\n### gruvbox_dark\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648685-2b0edc80-74bc-11eb-9ec9-9aac3677df43.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648693-2ea26380-74bc-11eb-831a-9ebbe4f3dd83.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648700-319d5400-74bc-11eb-90fa-72eccbda8242.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648716-382bcb80-74bc-11eb-824a-aaca67035073.png'/>\n</p>\n\n### gruvbox_light\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/34294427/118757012-5d9b5c00-b896-11eb-8e4f-c0c28f774cf6.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/34294427/118757009-5bd19880-b896-11eb-9846-d02b16653ab0.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/34294427/118757023-612ee300-b896-11eb-8673-a39a0fbce619.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/34294427/118757020-5ffdb600-b896-11eb-95e7-dbf1f08e063d.png'/>\n</p>\n\n### gruvbox\n\nIt's a combination of gruvbox_light and gruvbox_dark. It loads either of\nthem based you your `background` option.\n\n### gruvbox-material\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648725-3f52d980-74bc-11eb-8fa5-a77b0a21cdea.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648728-41b53380-74bc-11eb-99cf-001eab6cc51b.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648742-4a0d6e80-74bc-11eb-9685-8e0cba1eb3c3.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648744-4d085f00-74bc-11eb-8aaa-05a7ca46adec.png'/>\n</p>\n\n### horizon\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/69089176/118903813-70527700-b910-11eb-9d45-1785790ce8e8.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/69089176/118902058-bc9bb800-b90c-11eb-99b8-3b98cbdd01d7.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/69089176/118903506-dab6e780-b90f-11eb-85db-c6227a8caf0c.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/69089176/118902070-c2919900-b90c-11eb-9296-145a99ce52ce.png'/>\n</p>\n\n### iceberg_dark\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648796-614c5c00-74bc-11eb-8398-cde120ec7746.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648813-64474c80-74bc-11eb-986b-432498dd6245.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648822-66a9a680-74bc-11eb-8b2b-416cd359c30d.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648829-6ad5c400-74bc-11eb-9af4-670968934931.png'/>\n</p>\n\n### iceberg_light\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648848-71fcd200-74bc-11eb-8910-e12ae9ce619f.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648849-73c69580-74bc-11eb-93f9-d6f75a2bdd97.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648851-7628ef80-74bc-11eb-8a4b-c7f44c89ac93.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648862-7aeda380-74bc-11eb-808c-1b12dde45f3d.png'/>\n</p>\n\n### iceberg\n\nIt's a combination of iceberg_light and iceberg_dark. It loads either of\nthem based you your `background` option.\n\n### jellybeans\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648882-82ad4800-74bc-11eb-91e8-4d38fcdec134.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648883-850fa200-74bc-11eb-8d9b-54116accd2f8.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648900-8d67dd00-74bc-11eb-9600-13cd48fa2bde.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648902-8f31a080-74bc-11eb-9d8e-37a3f41d4c7a.png'/>\n</p>\n\n### material\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648925-9e185300-74bc-11eb-9263-842fe2d56ba8.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648927-9f498000-74bc-11eb-8a15-4ba68403037a.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648930-a1134380-74bc-11eb-8a24-f203bf05cfb3.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648935-a2dd0700-74bc-11eb-9a4b-72eb1e2ab79e.png'/>\n</p>\n\n### modus-vivendi\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/9327361/114389966-58176b80-9b9e-11eb-944e-1e0079527d74.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/9327361/114390000-606fa680-9b9e-11eb-97dd-ef5bbc23049a.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/9327361/114390024-6796b480-9b9e-11eb-8be2-ca4cc893fbb2.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/9327361/114390052-6d8c9580-9b9e-11eb-8dcb-469290a4c655.png'/>\n</p>\n\n### molokai\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648944-ab354200-74bc-11eb-85fd-71a40102384b.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648946-acff0580-74bc-11eb-9aae-36a869b855e5.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648953-af615f80-74bc-11eb-8897-f2945fc34c09.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648958-b12b2300-74bc-11eb-8232-550949cbbfb3.png'/>\n</p>\n\n### moonfly\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/11382509/129304429-cd2af22d-3b88-4c17-bf99-99f7608576d4.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/11382509/129304441-81a6c88e-364c-476a-9050-0ada4cae1e3b.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/11382509/129304453-2b18900a-13a9-4476-9977-3875e55aabaf.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/11382509/129304469-37fb0168-0484-406b-8b2e-d309232612ab.png'/>\n</p>\n\n### nightfly\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648974-b9835e00-74bc-11eb-9c52-c5187aa3ff2c.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648977-bab48b00-74bc-11eb-96b3-7f51fc73d8e8.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648980-bc7e4e80-74bc-11eb-9b12-3182a112f968.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108648981-bdaf7b80-74bc-11eb-86d4-6c44c3764a70.png'/>\n</p>\n\n### nord\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649007-cbfd9780-74bc-11eb-87be-a9edc714e57a.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649010-cd2ec480-74bc-11eb-9d9b-54fadee2abef.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649019-cef88800-74bc-11eb-97eb-054d78427442.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649021-cf911e80-74bc-11eb-8b4a-9f9eb61c7973.png'/>\n</p>\n\n### OceanicNext\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649039-d7e95980-74bc-11eb-9a33-df413936c645.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649043-d91a8680-74bc-11eb-9b1b-9c2e88ede3aa.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649052-db7ce080-74bc-11eb-8d9b-05c4c21a7e53.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649056-dcae0d80-74bc-11eb-91a0-ee0d98f3525d.png'/>\n</p>\n\n### onedark\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/8293386/150810955-ef6bf575-4a96-439c-a708-37dd25c63a47.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/8293386/150811104-31fbc04c-1500-4779-a079-98bd1e56701d.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/8293386/150811324-d1169232-a7b6-4f79-a104-031ea7972a32.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/8293386/150811517-f90a406d-a4b9-4bd5-913c-ec1ae547c400.png'/>\n</p>\n\n### onelight\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/8293386/150809518-b596f9bc-c351-4e71-9dec-e1856efaff8a.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/8293386/150809979-237c6414-4278-447d-a00f-0a32e2770195.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/8293386/150810292-afeecfce-3b53-468d-aed9-1bb5ea9ed46f.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/8293386/150810514-81024b2c-3b80-466f-85ce-914e191bb4f9.png'/>\n</p>\n\n### palenight\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/7190144/109406548-3e1d2300-797a-11eb-8fdb-c3882ae08625.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/7190144/109406547-3e1d2300-797a-11eb-9b72-43ba7145355d.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/7190144/109406545-3cebf600-797a-11eb-8e2e-992e98d8120e.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/7190144/109406546-3d848c80-797a-11eb-9069-04caf383275d.png'/>\n</p>\n\n### papercolor_dark\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649104-fd766300-74bc-11eb-8c5c-40e7191a81f7.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649106-fe0ef980-74bc-11eb-93f7-f98e0b89d5c9.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649108-ff402680-74bc-11eb-93da-bb96d51c39f0.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649112-00715380-74bd-11eb-8125-2c108da5123e.png'/>\n</p>\n\n### papercolor_light\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649126-07986180-74bd-11eb-9a25-c6ce762d37d2.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649129-08c98e80-74bd-11eb-93d4-5bc109ac9ee9.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649132-0b2be880-74bd-11eb-8ed2-afab3e974b4e.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649137-0cf5ac00-74bd-11eb-8764-765bead5de6e.png'/>\n</p>\n\n### PaperColor\n\nIt's a combination of papercolor_light and papercolor_dark. It loads either of\nthem based you your `background` option.\n\n### powerline\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649147-14b55080-74bd-11eb-9670-713185342eb2.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649150-15e67d80-74bd-11eb-8815-194c51d96016.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649155-17b04100-74bd-11eb-8e41-017eb9a837b5.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649158-18e16e00-74bd-11eb-8687-65b0ecbf20d2.png'/>\n</p>\n\n### powerline_dark\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/59497618/131224416-851aedd4-27bb-47fd-a9a6-5332aa42ce60.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/59497618/131224418-7bec491b-1183-4ec7-8089-3dbe460cc1e4.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/59497618/131224419-adab4f88-aaf8-449e-9988-ae002333d131.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/59497618/131224421-3b175d7a-fb14-424c-ad53-03d2c3b2ab71.png'/>\n</p>\n\n### pywal\n\npywal 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.\n\n#### `wal --theme ashes`\n\n<img width='700' src='https://user-images.githubusercontent.com/36740602/132101614-8aa90169-a1ed-4911-b09f-31b5bae56cbf.png'/>\n\n#### `wal --theme -l github`\n\n<img width='700' src='https://user-images.githubusercontent.com/36740602/132101617-f3ff65eb-8051-4294-9a55-e6caa9605006.png'/>\n\n#### `wal --theme vscode`\n\n<img width='700' src='https://user-images.githubusercontent.com/36740602/132101619-7d04d748-d478-45a2-983a-f2a93f3c5714.png'/>\n\n#### `wal --theme zenburn`\n\n<img width='700' src='https://user-images.githubusercontent.com/36740602/132101621-505e5bb6-d18a-434c-a0f8-a3904a5c71f2.png'/>\n\n### seoul256\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649194-2c8cd480-74bd-11eb-8fbc-935d7e0fe921.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649198-2d256b00-74bd-11eb-9894-7ffdead0297c.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649202-2eef2e80-74bd-11eb-9627-38f834ce4aec.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649205-2f87c500-74bd-11eb-9da6-5253dcff2c82.png'/>\n</p>\n\n### solarized_dark\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649216-37476980-74bd-11eb-8f3b-2a7fc368388d.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649217-38789680-74bd-11eb-8337-5e3005c5e261.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649223-3c0c1d80-74bd-11eb-953b-72c614aa9638.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649227-3d3d4a80-74bd-11eb-8251-d7788db36060.png'/>\n</p>\n\n### solarized_light\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649246-44645880-74bd-11eb-92c9-120798dc0452.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649251-462e1c00-74bd-11eb-953d-2857296997cc.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649255-475f4900-74bd-11eb-8a75-7ca266d56009.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649258-48907600-74bd-11eb-9bba-8e82b56777d9.png'/>\n</p>\n\n### Tomorrow\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649275-51814780-74bd-11eb-881b-1e137a0cbfe0.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649297-59d98280-74bd-11eb-92a5-a8c4af150106.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649317-5e9e3680-74bd-11eb-95a4-fc018cb4a528.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649321-6067fa00-74bd-11eb-83bb-b1de7f5e62d6.png'/>\n</p>\n\n### tomorrow_night\n\n<p>\n<img width=\"700\" src=\"https://github.com/user-attachments/assets/1d61f5b8-266b-499e-b071-da8c14c65804\"/>\n<img width=\"700\" src=\"https://github.com/user-attachments/assets/7992fef4-4161-4e3a-a964-42bb22f77d08\"/>\n<img width=\"700\" src=\"https://github.com/user-attachments/assets/e26fa7a6-9c27-4171-a8e7-067785ab6fee\"/>\n<img width=\"700\" src=\"https://github.com/user-attachments/assets/b88b2767-8b93-4be6-a2f8-6528dd43089a\"/>\n</p>\n\n### wombat\n\n<p>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649337-65c54480-74bd-11eb-9ea1-fab2e679c56b.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649411-8db4a800-74bd-11eb-962a-8b73f9fb7124.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649349-6cec5280-74bd-11eb-9ada-8f1cb8b48ec1.png'/>\n<img width='700' src='https://user-images.githubusercontent.com/41551030/108649358-6fe74300-74bd-11eb-9fe2-a955f964e3ce.png'/>\n</p>\n"
  },
  {
    "path": "doc/lualine.txt",
    "content": "*lualine.txt*          fast and easy to configure statusline plugin for neovim\n\n==============================================================================\nTable of Contents                                  *lualine-table-of-contents*\n\n1. lualine.nvim                                         |lualine-lualine.nvim|\n  - Contributing                                        |lualine-contributing|\n  - Performance compared to other plugins|lualine-performance-compared-to-other-plugins|\n  - Installation                                        |lualine-installation|\n  - Usage and customization                  |lualine-usage-and-customization|\n\n==============================================================================\n1. lualine.nvim                                         *lualine-lualine.nvim*\n\nA blazing fast and easy to configure Neovim statusline written in Lua.\n\n`lualine.nvim` requires Neovim >= 0.7.\n\nFor previous versions of neovim please use compatability tags for example\ncompat-nvim-0.5\n\nCONTRIBUTING                                            *lualine-contributing*\n\nFeel free to create an issue/PR if you want to see anything else implemented.\nIf you have some question or need help with configuration, start a discussion\n<https://github.com/nvim-lualine/lualine.nvim/discussions>.\n\nPlease read CONTRIBUTING.md <./CONTRIBUTING.md> before opening a PR. You can\nalso help with documentation in the wiki\n<https://github.com/nvim-lualine/lualine.nvim/wiki>.\n\nPERFORMANCE COMPARED TO OTHER PLUGINS*lualine-performance-compared-to-other-plugins*\n\nUnlike other statusline plugins, lualine loads only the components you specify,\nand nothing else.\n\nStartup time performance measured with an amazing plugin\ndstein64/vim-startuptime <https://github.com/dstein64/vim-startuptime>\n\nTimes are measured with a clean `init.vim` with only `vim-startuptime`,\n`vim-plug` and given statusline plugin installed. In control just\n`vim-startuptime` and`vim-plug` is installed. And measured time is complete\nstartuptime of vim not time spent on specific plugin. These numbers are the\naverage of 20 runs.\n\n│control│lualine│lightline│airline│\n│17.2 ms│24.8 ms│ 25.5 ms │79.9 ms│\n\n\nLast Updated On: 18-04-2022\n\nINSTALLATION                                            *lualine-installation*\n\nVIM-PLUG <HTTPS://GITHUB.COM/JUNEGUNN/VIM-PLUG> ~\n\n>\n    Plug 'nvim-lualine/lualine.nvim'\n    \" If you want to have icons in your statusline choose one of these\n    Plug 'nvim-tree/nvim-web-devicons'\n<\n\n\nPACKER.NVIM <HTTPS://GITHUB.COM/WBTHOMASON/PACKER.NVIM> ~\n\n>\n    use {\n      'nvim-lualine/lualine.nvim',\n      requires = { 'nvim-tree/nvim-web-devicons', opt = true }\n    }\n<\n\n\nLAZY.NVIM <HTTPS://GITHUB.COM/FOLKE/LAZY.NVIM> ~\n\n>\n    {\n        'nvim-lualine/lualine.nvim',\n        dependencies = { 'nvim-tree/nvim-web-devicons' }\n    }\n<\n\n\nYou’ll also need to have a patched font if you want icons.\n\nUSAGE AND CUSTOMIZATION                      *lualine-usage-and-customization*\n\nLualine has sections as shown below.\n\n>\n    +-------------------------------------------------+\n    | A | B | C                             X | Y | Z |\n    +-------------------------------------------------+\n<\n\n\nEach sections holds its components e.g. Vim’s current mode.\n\nCONFIGURING LUALINE IN INIT.VIM ~\n\nAll the examples below are in lua. You can use the same examples in `.vim`\nfiles by wrapping them in lua heredoc like this:\n\n>\n    lua << END\n    require('lualine').setup()\n    END\n<\n\n\nFor more information, check out `:help lua-heredoc`.\n\n                                               *lualine-Default-configuration*\n\n>\n    require('lualine').setup {\n      options = {\n        icons_enabled = true,\n        theme = 'auto',\n        component_separators = { left = '', right = ''},\n        section_separators = { left = '', right = ''},\n        disabled_filetypes = {\n          statusline = {},\n          winbar = {},\n        },\n        ignore_focus = {},\n        always_divide_middle = true,\n        always_show_tabline = true,\n        globalstatus = false,\n        refresh = {\n          statusline = 1000,\n          tabline = 1000,\n          winbar = 1000,\n          refresh_time = 16, -- ~60fps\n          events = {\n            'WinEnter',\n            'BufEnter',\n            'BufWritePost',\n            'SessionLoadPost',\n            'FileChangedShellPost',\n            'VimResized',\n            'Filetype',\n            'CursorMoved',\n            'CursorMovedI',\n            'ModeChanged',\n          },\n        }\n      },\n      sections = {\n        lualine_a = {'mode'},\n        lualine_b = {'branch', 'diff', 'diagnostics'},\n        lualine_c = {'filename'},\n        lualine_x = {'encoding', 'fileformat', 'filetype'},\n        lualine_y = {'progress'},\n        lualine_z = {'location'}\n      },\n      inactive_sections = {\n        lualine_a = {},\n        lualine_b = {},\n        lualine_c = {'filename'},\n        lualine_x = {'location'},\n        lualine_y = {},\n        lualine_z = {}\n      },\n      tabline = {},\n      winbar = {},\n      inactive_winbar = {},\n      extensions = {}\n    }\n<\n\n\nDefault configuration                  If you want to get your current lualine\n                                       config, you can do so with:\n\n\n>\n    require('lualine').get_config()\n<\n\n\n------------------------------------------------------------------------------\n\nSTARTING LUALINE ~\n\n>\n    require('lualine').setup()\n<\n\n\n------------------------------------------------------------------------------\n\nSETTING A THEME ~\n\n>\n    options = { theme = 'gruvbox' }\n<\n\n\nAll available themes are listed in THEMES.md <./THEMES.md>.\n\nPlease create a PR if you managed to port a popular theme before us, here is\nhow to do it <./CONTRIBUTING.md>.\n\n                                                  *lualine-Customizing-themes*\n\n>\n    local custom_gruvbox = require'lualine.themes.gruvbox'\n    \n    -- Change the background of lualine_c section for normal mode\n    custom_gruvbox.normal.c.bg = '#112233'\n    \n    require('lualine').setup {\n      options = { theme  = custom_gruvbox },\n      ...\n    }\n<\n\n\nCustomizing themes                     Theme structure is available here\n                                       <https://github.com/nvim-lualine/lualine.nvim/wiki/Writing-a-theme>.\n\n\n------------------------------------------------------------------------------\n\nSEPARATORS ~\n\nlualine defines two kinds of separators:\n\n\n- `section_separators` - separators between sections\n- `component_separators` - separators between the different components in sections\n\n\n**Note**: if viewing this README in a browser, chances are the characters below\nwill not be visible.\n\n>\n    options = {\n      section_separators = { left = '', right = '' },\n      component_separators = { left = '', right = '' }\n    }\n<\n\n\nHere, left refers to the left-most sections (a, b, c), and right refers to the\nright-most sections (x, y, z).\n\n                                                *lualine-Disabling-separators*\n\n>\n    options = { section_separators = '', component_separators = '' }\n<\n\n\n------------------------------------------------------------------------------\n\nCHANGING COMPONENTS IN LUALINE SECTIONS ~\n\n>\n    sections = {lualine_a = {'mode'}}\n<\n\n\n                                                *lualine-Available-components*\n\n\n- `branch` (git branch)\n- `buffers` (shows currently available buffers)\n- `diagnostics` (diagnostics count from your preferred source)\n- `diff` (git diff status)\n- `encoding` (file encoding)\n- `fileformat` (file format)\n- `filename`\n- `filesize`\n- `filetype`\n- `hostname`\n- `location` (location in file in line:column format)\n- `mode` (vim mode)\n- `progress` (%progress in file)\n- `searchcount` (number of search matches when hlsearch is active)\n- `selectioncount` (number of selected characters or lines)\n- `tabs` (shows currently available tabs)\n- `windows` (shows currently available windows)\n- `lsp_status` (shows active LSPs in the current buffer and a progress spinner)\n\n\n                                                   *lualine-Custom-components*\n\nLUA FUNCTIONS AS LUALINE COMPONENT\n\n>\n    local function hello()\n      return [[hello world]]\n    end\n    sections = { lualine_a = { hello } }\n<\n\n\nVIM FUNCTIONS AS LUALINE COMPONENT\n\n>\n    sections = { lualine_a = {'FugitiveHead'} }\n<\n\n\nVIM’S STATUSLINE ITEMS AS LUALINE COMPONENT\n\n>\n    sections = { lualine_c = {'%=', '%t%m', '%3p'} }\n<\n\n\nVIM VARIABLES AS LUALINE COMPONENT\n\nVariables from `g:`, `v:`, `t:`, `w:`, `b:`, `o:`, `to:`, `wo:`, `bo:` scopes\ncan be used.\n\nSee `:h lua-vim-variables` and `:h lua-vim-options` if you are not sure what to\nuse.\n\n>\n    sections = { lualine_a = { 'g:coc_status', 'bo:filetype' } }\n<\n\n\nLUA EXPRESSIONS AS LUALINE COMPONENT\n\nYou can use any valid lua expression as a component including:\n\n\n- oneliners\n- global variables\n- require statements\n\n\n>\n    sections = { lualine_c = { \"os.date('%a')\", 'data', \"require'lsp-status'.status()\" } }\n<\n\n\n`data` is a global variable in this example.\n\n------------------------------------------------------------------------------\n\nCOMPONENT OPTIONS ~\n\nComponent options can change the way a component behave. There are two kinds of\noptions:\n\n\n- global options affecting all components\n- local options affecting specific\n\n\nGlobal options can be used as local options (can be applied to specific\ncomponents) but you cannot use local options as global. Global option used\nlocally overwrites the global, for example:\n\n>\n        require('lualine').setup {\n          options = { fmt = string.lower },\n          sections = { lualine_a = {\n            { 'mode', fmt = function(str) return str:sub(1,1) end } },\n                      lualine_b = {'branch'} }\n        }\n<\n\n\n`mode` will be formatted with the passed function so only first char will be\nshown. On the other hand branch will be formatted with global formatter\n`string.lower` so it will be showed in lower case.\n\n                                                   *lualine-Available-options*\n\n                                                      *lualine-Global-options*\n\nGlobal options                         These are `options` that are used in\n                                       options table. They set behavior of\n                                       lualine.\n\n\nValues set here are treated as default for other options that work in component\nlevel.\n\nFor example even though `icons_enabled` is a general component option. You can\nset `icons_enabled` to `false` and icons will be disabled on all component. You\ncan still overwrite defaults set in option table by specifying the option value\nin component.\n\n>\n    options = {\n      theme = 'auto', -- lualine theme\n      component_separators = { left = '', right = '' },\n      section_separators = { left = '', right = '' },\n      disabled_filetypes = {     -- Filetypes to disable lualine for.\n          statusline = {},       -- only ignores the ft for statusline.\n          winbar = {},           -- only ignores the ft for winbar.\n      },\n    \n      ignore_focus = {},         -- If current filetype is in this list it'll\n                                 -- always be drawn as inactive statusline\n                                 -- and the last window will be drawn as active statusline.\n                                 -- for example if you don't want statusline of\n                                 -- your file tree / sidebar window to have active\n                                 -- statusline you can add their filetypes here.\n                                 --\n                                 -- Can also be set to a function that takes the\n                                 -- currently focused window as its only argument\n                                 -- and returns a boolean representing whether the\n                                 -- window's statusline should be drawn as inactive.\n    \n      always_divide_middle = true, -- When set to true, left sections i.e. 'a','b' and 'c'\n                                   -- can't take over the entire statusline even\n                                   -- if neither of 'x', 'y' or 'z' are present.\n    \n      always_show_tabline = true -- When set to true, if you have configured lualine for displaying tabline\n                              -- then tabline will always show. If set to false, then tabline will be displayed\n                              -- only when there are more than 1 tab. (see :h showtabline)\n    \n      globalstatus = false,        -- enable global statusline (have a single statusline\n                                   -- at bottom of neovim instead of one for  every window).\n                                   -- This feature is only available in neovim 0.7 and higher.\n    \n      refresh = {                  -- sets how often lualine should refresh it's contents (in ms)\n        statusline = 100,         -- The refresh option sets minimum time that lualine tries\n        tabline = 100,            -- to maintain between refresh. It's not guarantied if situation\n        winbar = 100              -- arises that lualine needs to refresh itself before this time\n                                  -- it'll do it.\n        refresh_time = 16,        -- ~60fps the time after which refresh queue is processed. Mininum refreshtime for lualine\n        events = {                -- The auto command events at which lualine refreshes\n          'WinEnter',\n          'BufEnter',\n          'BufWritePost',\n          'SessionLoadPost',\n          'FileChangedShellPost',\n          'VimResized',\n          'Filetype',\n          'CursorMoved',\n          'CursorMovedI',\n          'ModeChanged',\n        },\n                                   -- Also you can force lualine's refresh by calling refresh function\n                                   -- like require('lualine').refresh()\n      }\n    }\n<\n\n\n                                           *lualine-General-component-options*\n\nGeneral component options              These are options that control behavior\n                                       at component level and are available for\n                                       all components.\n\n\n>\n    sections = {\n      lualine_a = {\n        {\n          'mode',\n          icons_enabled = true, -- Enables the display of icons alongside the component.\n          -- Defines the icon to be displayed in front of the component.\n          -- Can be string|table\n          -- As table it must contain the icon as first entry and can use\n          -- color option to custom color the icon. Example:\n          -- {'branch', icon = ''} / {'branch', icon = {'', color={fg='green'}}}\n    \n          -- icon position can also be set to the right side from table. Example:\n          -- {'branch', icon = {'', align='right', color={fg='green'}}}\n          icon = nil,\n    \n          separator = nil,      -- Determines what separator to use for the component.\n                                -- Note:\n                                --  When a string is provided it's treated as component_separator.\n                                --  When a table is provided it's treated as section_separator.\n                                --  Passing an empty string disables the separator.\n                                --\n                                -- These options can be used to set colored separators\n                                -- around a component.\n                                --\n                                -- The options need to be set as such:\n                                --   separator = { left = '', right = ''}\n                                --\n                                -- Where left will be placed on left side of component,\n                                -- and right will be placed on its right.\n                                --\n    \n          cond = nil,           -- Condition function, the component is loaded when the function returns `true`.\n    \n          draw_empty = false,   -- Whether to draw component even if it's empty.\n                                -- Might be useful if you want just the separator.\n    \n          -- Defines a custom color for the component:\n          --\n          -- 'highlight_group_name' | { fg = '#rrggbb'|cterm_value(0-255)|'color_name(red)', bg= '#rrggbb', gui='style' } | function\n          -- Note:\n          --  '|' is synonymous with 'or', meaning a different acceptable format for that placeholder.\n          -- 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' })\n          -- color functions can be used to have different colors based on state as shown below.\n          --\n          -- Examples:\n          --   color = { fg = '#ffaa88', bg = 'grey', gui='italic,bold' },\n          --   color = { fg = 204 }   -- When fg/bg are omitted, they default to the your theme's fg/bg.\n          --   color = 'WarningMsg'   -- Highlight groups can also be used.\n          --   color = function(section)\n          --      return { fg = vim.bo.modified and '#aa3355' or '#33aa88' }\n          --   end,\n          color = nil, -- The default is your theme's color for that section and mode.\n    \n          -- Specify what type a component is, if omitted, lualine will guess it for you.\n          --\n          -- Available types are:\n          --   [format: type_name(example)], mod(branch/filename),\n          --   stl(%f/%m), var(g:coc_status/bo:modifiable),\n          --   lua_expr(lua expressions), vim_fun(viml function name)\n          --\n          -- Note:\n          -- lua_expr is short for lua-expression and vim_fun is short for vim-function.\n          type = nil,\n    \n          padding = 1, -- Adds padding to the left and right of components.\n                       -- Padding can be specified to left or right independently, e.g.:\n                       --   padding = { left = left_padding, right = right_padding }\n    \n          fmt = nil,   -- Format function, formats the component's output.\n                       -- This function receives two arguments:\n                       -- - string that is going to be displayed and\n                       --   that can be changed, enhanced and etc.\n                       -- - context object with information you might\n                       --   need. E.g. tabnr if used with tabs.\n          on_click = nil, -- takes a function that is called when component is clicked with mouse.\n                       -- the function receives several arguments\n                       -- - number of clicks in case of multiple clicks\n                       -- - mouse button used (l(left)/r(right)/m(middle)/...)\n                       -- - modifiers pressed (s(shift)/c(ctrl)/a(alt)/m(meta)...)\n        }\n      }\n    }\n<\n\n\n                                          *lualine-Component-specific-options*\n\nComponent specific options             These are options that are available on\n                                       specific components. For example, you\n                                       have option on `diagnostics` component\n                                       to specify what your diagnostic sources\n                                       will be.\n\n\n                                           *lualine-buffers-component-options*\n\n>\n    sections = {\n      lualine_a = {\n        {\n          'buffers',\n          show_filename_only = true,   -- Shows shortened relative path when set to false.\n          hide_filename_extension = false,   -- Hide filename extension when set to true.\n          show_modified_status = true, -- Shows indicator when the buffer is modified.\n    \n          mode = 0, -- 0: Shows buffer name\n                    -- 1: Shows buffer index\n                    -- 2: Shows buffer name + buffer index\n                    -- 3: Shows buffer number\n                    -- 4: Shows buffer name + buffer number\n    \n          max_length = vim.o.columns * 2 / 3, -- Maximum width of buffers component,\n                                              -- it can also be a function that returns\n                                              -- the value of `max_length` dynamically.\n          filetype_names = {\n            TelescopePrompt = 'Telescope',\n            dashboard = 'Dashboard',\n            packer = 'Packer',\n            fzf = 'FZF',\n            alpha = 'Alpha'\n          }, -- Shows specific buffer name for that filetype ( { `filetype` = `buffer_name`, ... } )\n    \n          -- Automatically updates active buffer color to match color of other components (will be overidden if buffers_color is set)\n          use_mode_colors = false,\n    \n          buffers_color = {\n            -- Same values as the general color option can be used here.\n            active = 'lualine_{section}_normal',     -- Color for active buffer.\n            inactive = 'lualine_{section}_inactive', -- Color for inactive buffer.\n          },\n    \n          symbols = {\n            modified = ' ●',      -- Text to show when the buffer is modified\n            alternate_file = '#', -- Text to show to identify the alternate file\n            directory =  '',     -- Text to show when the buffer is a directory\n          },\n        }\n      }\n    }\n<\n\n\n                                          *lualine-datetime-component-options*\n\n>\n    sections = {\n      lualine_a = {\n        {\n          'datetime',\n          -- options: default, us, uk, iso, or your own format string (\"%H:%M\", etc..)\n          style = 'default'\n        }\n      }\n    }\n<\n\n\n                                       *lualine-diagnostics-component-options*\n\n>\n    sections = {\n      lualine_a = {\n        {\n          'diagnostics',\n    \n          -- Table of diagnostic sources, available sources are:\n          --   'nvim_lsp', 'nvim_diagnostic', 'nvim_workspace_diagnostic', 'coc', 'ale', 'vim_lsp'.\n          -- or a function that returns a table as such:\n          --   { error=error_cnt, warn=warn_cnt, info=info_cnt, hint=hint_cnt }\n          sources = { 'nvim_diagnostic', 'coc' },\n    \n          -- Displays diagnostics for the defined severity types\n          sections = { 'error', 'warn', 'info', 'hint' },\n    \n          diagnostics_color = {\n            -- Same values as the general color option can be used here.\n            error = 'DiagnosticError', -- Changes diagnostics' error color.\n            warn  = 'DiagnosticWarn',  -- Changes diagnostics' warn color.\n            info  = 'DiagnosticInfo',  -- Changes diagnostics' info color.\n            hint  = 'DiagnosticHint',  -- Changes diagnostics' hint color.\n          },\n          symbols = {error = 'E', warn = 'W', info = 'I', hint = 'H'},\n          colored = true,           -- Displays diagnostics status in color if set to true.\n          update_in_insert = false, -- Update diagnostics in insert mode.\n          always_visible = false,   -- Show diagnostics even if there are none.\n        }\n      }\n    }\n<\n\n\n                                              *lualine-diff-component-options*\n\n>\n    sections = {\n      lualine_a = {\n        {\n          'diff',\n          colored = true, -- Displays a colored diff status if set to true\n          diff_color = {\n            -- Same color values as the general color option can be used here.\n            added    = 'LuaLineDiffAdd',    -- Changes the diff's added color\n            modified = 'LuaLineDiffChange', -- Changes the diff's modified color\n            removed  = 'LuaLineDiffDelete', -- Changes the diff's removed color you\n          },\n          symbols = {added = '+', modified = '~', removed = '-'}, -- Changes the symbols used by the diff.\n          source = nil, -- A function that works as a data source for diff.\n                        -- It must return a table as such:\n                        --   { added = add_count, modified = modified_count, removed = removed_count }\n                        -- or nil on failure. count <= 0 won't be displayed.\n        }\n      }\n    }\n<\n\n\n                                        *lualine-fileformat-component-options*\n\n>\n    sections = {\n      lualine_a = {\n        {\n          'fileformat',\n          symbols = {\n            unix = '', -- e712\n            dos = '',  -- e70f\n            mac = '',  -- e711\n          }\n        }\n      }\n    }\n<\n\n\n                                          *lualine-filename-component-options*\n\n>\n    sections = {\n      lualine_a = {\n        {\n          'filename',\n          file_status = true,      -- Displays file status (readonly status, modified status)\n          newfile_status = false,  -- Display new file status (new file means no write after created)\n          path = 0,                -- 0: Just the filename\n                                   -- 1: Relative path\n                                   -- 2: Absolute path\n                                   -- 3: Absolute path, with tilde as the home directory\n                                   -- 4: Filename and parent dir, with tilde as the home directory\n    \n          shorting_target = 40,    -- Shortens path to leave 40 spaces in the window\n                                   -- for other components. (terrible name, any suggestions?)\n                                   -- It can also be a function that returns\n                                   -- the value of `shorting_target` dynamically.\n          symbols = {\n            modified = '[+]',      -- Text to show when the file is modified.\n            readonly = '[-]',      -- Text to show when the file is non-modifiable or readonly.\n            unnamed = '[No Name]', -- Text to show for unnamed buffers.\n            newfile = '[New]',     -- Text to show for newly created file before first write\n          }\n        }\n      }\n    }\n<\n\n\n                                          *lualine-filetype-component-options*\n\n>\n    sections = {\n      lualine_a = {\n        {\n          'filetype',\n          colored = true,   -- Displays filetype icon in color if set to true\n          icon_only = false, -- Display only an icon for filetype\n          icon = { align = 'right' }, -- Display filetype icon on the right hand side\n          -- icon =    {'X', align='right'}\n          -- Icon string ^ in table is ignored in filetype component\n        }\n      }\n    }\n<\n\n\n                                          *lualine-encoding-component-options*\n\n>\n    sections = {\n      lualine_a = {\n        {\n          'encoding',\n          -- Show '[BOM]' when the file has a byte-order mark\n            show_bomb = false,\n        }\n      }\n    }\n<\n\n\n                                       *lualine-searchcount-component-options*\n\n>\n    sections = {\n      lualine_a = {\n        {\n          'searchcount',\n          maxcount = 999,\n          timeout = 500,\n        }\n      }\n    }\n<\n\n\n                                              *lualine-tabs-component-options*\n\n>\n    sections = {\n      lualine_a = {\n        {\n          'tabs',\n          tab_max_length = 40,  -- Maximum width of each tab. The content will be shorten dynamically (example: apple/orange -> a/orange)\n          max_length = vim.o.columns / 3, -- Maximum width of tabs component.\n                                          -- Note:\n                                          -- It can also be a function that returns\n                                          -- the value of `max_length` dynamically.\n          mode = 0, -- 0: Shows tab_nr\n                    -- 1: Shows tab_name\n                    -- 2: Shows tab_nr + tab_name\n    \n          path = 0, -- 0: just shows the filename\n                    -- 1: shows the relative path and shorten $HOME to ~\n                    -- 2: shows the full path\n                    -- 3: shows the full path and shorten $HOME to ~\n    \n          -- Automatically updates active tab color to match color of other components (will be overidden if buffers_color is set)\n          use_mode_colors = false,\n    \n          tabs_color = {\n            -- Same values as the general color option can be used here.\n            active = 'lualine_{section}_normal',     -- Color for active tab.\n            inactive = 'lualine_{section}_inactive', -- Color for inactive tab.\n          },\n    \n          show_modified_status = true,  -- Shows a symbol next to the tab name if the file has been modified.\n          symbols = {\n            modified = '[+]',  -- Text to show when the file is modified.\n          },\n    \n          fmt = function(name, context)\n            -- Show + if buffer is modified in tab\n            local buflist = vim.fn.tabpagebuflist(context.tabnr)\n            local winnr = vim.fn.tabpagewinnr(context.tabnr)\n            local bufnr = buflist[winnr]\n            local mod = vim.fn.getbufvar(bufnr, '&mod')\n    \n            return name .. (mod == 1 and ' +' or '')\n          end\n        }\n      }\n    }\n<\n\n\n                                           *lualine-windows-component-options*\n\n>\n    sections = {\n      lualine_a = {\n        {\n          'windows',\n          show_filename_only = true,   -- Shows shortened relative path when set to false.\n          show_modified_status = true, -- Shows indicator when the window is modified.\n    \n          mode = 0, -- 0: Shows window name\n                    -- 1: Shows window index\n                    -- 2: Shows window name + window index\n    \n          max_length = vim.o.columns * 2 / 3, -- Maximum width of windows component,\n                                              -- it can also be a function that returns\n                                              -- the value of `max_length` dynamically.\n          filetype_names = {\n            TelescopePrompt = 'Telescope',\n            dashboard = 'Dashboard',\n            packer = 'Packer',\n            fzf = 'FZF',\n            alpha = 'Alpha'\n          }, -- Shows specific window name for that filetype ( { `filetype` = `window_name`, ... } )\n    \n          disabled_buftypes = { 'quickfix', 'prompt' }, -- Hide a window if its buffer's type is disabled\n    \n          -- Automatically updates active window color to match color of other components (will be overidden if buffers_color is set)\n          use_mode_colors = false,\n    \n          windows_color = {\n            -- Same values as the general color option can be used here.\n            active = 'lualine_{section}_normal',     -- Color for active window.\n            inactive = 'lualine_{section}_inactive', -- Color for inactive window.\n          },\n        }\n      }\n    }\n<\n\n\n                                        *lualine-lsp-status-component-options*\n\n>\n    sections = {\n      lualine_a = {\n        {\n          'lsp_status',\n          icon = '', -- f013\n          symbols = {\n            -- Standard unicode symbols to cycle through for LSP progress:\n            spinner = { '⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏' },\n            -- Standard unicode symbol for when LSP is done:\n            done = '✓',\n            -- Delimiter inserted between LSP names:\n            separator = ' ',\n          },\n          -- List of LSP names to ignore (e.g., `null-ls`):\n          ignore_lsp = {},\n          -- Display the LSP name\n          show_name = true,\n        }\n      }\n    }\n<\n\n\n------------------------------------------------------------------------------\n\nTABLINE ~\n\nYou can use lualine to display components in tabline. The configuration for\ntabline sections is exactly the same as that of the statusline.\n\n>\n    tabline = {\n      lualine_a = {},\n      lualine_b = {'branch'},\n      lualine_c = {'filename'},\n      lualine_x = {},\n      lualine_y = {},\n      lualine_z = {}\n    }\n<\n\n\nThis will show the branch and filename components on top of neovim inside\ntabline.\n\nlualine also provides 2 components, buffers and tabs, that you can use to get a\nmore traditional tabline/bufferline.\n\n>\n    tabline = {\n      lualine_a = {'buffers'},\n      lualine_b = {'branch'},\n      lualine_c = {'filename'},\n      lualine_x = {},\n      lualine_y = {},\n      lualine_z = {'tabs'}\n    }\n<\n\n\nWINBAR ~\n\nFrom neovim-0.8 you can customize your winbar with lualine. Winbar\nconfiguration is similar to statusline.\n\n>\n    winbar = {\n      lualine_a = {},\n      lualine_b = {},\n      lualine_c = {'filename'},\n      lualine_x = {},\n      lualine_y = {},\n      lualine_z = {}\n    }\n    \n    inactive_winbar = {\n      lualine_a = {},\n      lualine_b = {},\n      lualine_c = {'filename'},\n      lualine_x = {},\n      lualine_y = {},\n      lualine_z = {}\n    }\n<\n\n\nJust like statusline you can separately specify winbar for active and inactive\nwindows. Any lualine component can be placed in winbar. All kinds of custom\ncomponents supported in statusline are also supported for winbar too. In\ngeneral You can treat winbar as another lualine statusline that just appears on\ntop of windows instead of at bottom.\n\n                                                             *lualine-Buffers*\n\nBuffers                                Shows currently open buffers. Like\n                                       bufferline. See\n                                       |lualine-buffers-options| for all\n                                       builtin behaviors of buffers component.\n                                       You can use `:LualineBuffersJump` to\n                                       jump to buffer based on index of buffer\n                                       in buffers component. Jumping to\n                                       non-existent buffer indices generates an\n                                       error. To avoid these errors\n                                       `LualineBuffersJump` provides `<bang>`\n                                       support, meaning that you can call\n                                       `:LualineBufferJump!` to ignore these\n                                       errors.\n\n\n>\n      :LualineBuffersJump 2  \" Jumps to 2nd buffer in buffers component.\n      :LualineBuffersJump $  \" Jumps to last buffer in buffers component.\n      :LualineBuffersJump! 3  \" Attempts to jump to 3rd buffer, if it exists.\n<\n\n\n                                                                *lualine-Tabs*\n\nTabs                                   Shows currently open tab. Like usual\n                                       tabline. See |lualine-tabs-options| for\n                                       all builtin behaviors of tabs component.\n                                       You can also use `:LualineRenameTab` to\n                                       set a name for a tabpage. For example:\n\n\n>\n    :LualineRenameTab Project_K\n<\n\n\nIt’s useful when you’re using rendering mode 2/3 in tabs. To unname a\ntabpage run `:LualineRenameTab` without argument.\n\n                                               *lualine-Tabline-as-statusline*\n\nTabline as statusline                  You can also completely move your\n                                       statusline to a tabline by configuring\n                                       `lualine.tabline` and disabling\n                                       `lualine.sections` and\n                                       `lualine.inactive_sections`:\n\n\n>\n    tabline = {\n    ......\n      },\n    sections = {},\n    inactive_sections = {},\n<\n\n\nIf you want a more sophisticated tabline you can use other tabline plugins with\nlualine too, for example:\n\n\n- nvim-bufferline <https://github.com/akinsho/nvim-bufferline.lua>\n- tabline.nvim <https://github.com/kdheepak/tabline.nvim>\n\n\ntabline.nvim even uses lualine’s theme by default 🙌 You can find a bigger\nlist here <https://github.com/rockerBOO/awesome-neovim#tabline>.\n\n------------------------------------------------------------------------------\n\nEXTENSIONS ~\n\nlualine extensions change statusline appearance for a window/buffer with\nspecified filetypes.\n\nBy default no extensions are loaded to improve performance. You can load\nextensions with:\n\n>\n    extensions = {'quickfix'}\n<\n\n\n                                                *lualine-Available-extensions*\n\n\n- aerial\n- assistant\n- avante\n- chadtree\n- ctrlspace\n- fern\n- fugitive\n- fzf\n- lazy\n- man\n- mason\n- mundo\n- neo-tree\n- nerdtree\n- nvim-dap-ui\n- nvim-tree\n- oil\n- overseer\n- quickfix\n- symbols-outline\n- toggleterm\n- trouble\n\n\n                                                   *lualine-Custom-extensions*\n\nCustom extensions                      You can define your own extensions. If\n                                       you believe an extension may be useful\n                                       to others, then please submit a PR.\n\n\n>\n    local my_extension = { sections = { lualine_a = {'mode'} }, filetypes = {'lua'} }\n    require('lualine').setup { extensions = { my_extension } }\n<\n\n\n------------------------------------------------------------------------------\n\nREFRESHING LUALINE ~\n\nBy default lualine refreshes itself based on timer and some events. You can set\nthe interval of the timer with refresh option. However you can also force\nlualine to refresh at any time by calling `lualine.refresh` function.\n\n>\n    require('lualine').refresh({\n      scope = 'tabpage',  -- scope of refresh all/tabpage/window\n      place = { 'statusline', 'winbar', 'tabline' },  -- lualine segment ro refresh.\n    })\n<\n\n\nThe arguments shown here are default values. So not passing any of them will be\ntreated as if a default value was passed.\n\nSo you can simply do\n\n>\n    require('lualine').refresh()\n<\n\n\nAlso, note by default when you call refresh a refresh event is queued in\nlualine. It desn’t refresh event immidiately. It’ll refresh on next refresh\ncheck pass. By default this time is set to 16ms to match 60fps. This duration\ncan be configured with `options.refresh.refresh_time` option. If you want to\nbypass the refresh queue and want lualine to process the refresh immmidiately\ncall refresh with `force=true` parameter set like this.\n\n>\n    require('lualine').refresh({\n      force = true,       -- do an immidiate refresh\n      scope = 'tabpage',  -- scope of refresh all/tabpage/window\n      place = { 'statusline', 'winbar', 'tabline' },  -- lualine segment ro refresh.\n    })\n<\n\n\nPractically, speaking this is almost never needed. Also you should avoid\ncalling `lualine.refresh` with `force` inside components. Since components are\nevaluated during refresh, calling refresh while refreshing can have undesirable\neffects.\n\nDISABLING LUALINE ~\n\nYou can disable lualine for specific filetypes:\n\n>\n    options = { disabled_filetypes = {'lua'} }\n<\n\n\nYou can also disable lualine completely. Note that you need to call this after\nthe setup\n\n>\n      require('lualine').hide({\n        place = {'statusline', 'tabline', 'winbar'}, -- The segment this change applies to.\n        unhide = false,  -- whether to re-enable lualine again/\n      })\n<\n\n\nThe arguments show for hide above are default values. Which means even if the\nhide function is called without arguments it’ll work as if these were passed.\n\nSo in short to disable lualine completely you can do\n\n>\n    require('lualine').hide()\n<\n\n\nTo enable it again you can do\n\n>\n    require('lualine').hide({unhide=true})\n<\n\n\nWIKI ~\n\nCheck out the wiki <https://github.com/nvim-lualine/lualine.nvim/wiki> for more\ninfo.\n\nYou can find some useful configuration snippets\n<https://github.com/nvim-lualine/lualine.nvim/wiki/Component-snippets> here.\nYou can also share your awesome snippets with others.\n\nIf you want to extend lualine with plugins or want to know which ones already\ndo, wiki/plugins <https://github.com/nvim-lualine/lualine.nvim/wiki/Plugins> is\nfor you.\n\nGenerated by panvimdoc <https://github.com/kdheepak/panvimdoc>\n\nvim:tw=78:ts=8:noet:ft=help:norl:\n"
  },
  {
    "path": "examples/bubbles.lua",
    "content": "-- Bubbles config for lualine\n-- Author: lokesh-krishna\n-- MIT license, see LICENSE for more details.\n\n-- stylua: ignore\nlocal colors = {\n  blue   = '#80a0ff',\n  cyan   = '#79dac8',\n  black  = '#080808',\n  white  = '#c6c6c6',\n  red    = '#ff5189',\n  violet = '#d183e8',\n  grey   = '#303030',\n}\n\nlocal bubbles_theme = {\n  normal = {\n    a = { fg = colors.black, bg = colors.violet },\n    b = { fg = colors.white, bg = colors.grey },\n    c = { fg = colors.white },\n  },\n\n  insert = { a = { fg = colors.black, bg = colors.blue } },\n  visual = { a = { fg = colors.black, bg = colors.cyan } },\n  replace = { a = { fg = colors.black, bg = colors.red } },\n\n  inactive = {\n    a = { fg = colors.white, bg = colors.black },\n    b = { fg = colors.white, bg = colors.black },\n    c = { fg = colors.white },\n  },\n}\n\nrequire('lualine').setup {\n  options = {\n    theme = bubbles_theme,\n    component_separators = '',\n    section_separators = { left = '', right = '' },\n  },\n  sections = {\n    lualine_a = { { 'mode', separator = { left = '' }, right_padding = 2 } },\n    lualine_b = { 'filename', 'branch' },\n    lualine_c = {\n      '%=', --[[ add your center components here in place of this comment ]]\n    },\n    lualine_x = {},\n    lualine_y = { 'filetype', 'progress' },\n    lualine_z = {\n      { 'location', separator = { right = '' }, left_padding = 2 },\n    },\n  },\n  inactive_sections = {\n    lualine_a = { 'filename' },\n    lualine_b = {},\n    lualine_c = {},\n    lualine_x = {},\n    lualine_y = {},\n    lualine_z = { 'location' },\n  },\n  tabline = {},\n  extensions = {},\n}\n"
  },
  {
    "path": "examples/cosmicink.lua",
    "content": "-- CosmicInk config for lualine\n-- Author: Yeeloman\n-- MIT license, see LICENSE for more details.\n\n-- Main configuration for setting up lualine.nvim statusline plugin\n\n-- Default Theme Colors: Define a set of base colors for your theme\nlocal colors = {\n  BG = '#16181b', -- Dark background\n  FG = '#c5c4c4', -- Light foreground for contrast\n  YELLOW = '#e8b75f', -- Vibrant yellow\n  CYAN = '#00bcd4', -- Soft cyan\n  DARKBLUE = '#2b3e50', -- Deep blue\n  GREEN = '#00e676', -- Bright green\n  ORANGE = '#ff7733', -- Warm orange\n  VIOLET = '#7a3ba8', -- Strong violet\n  MAGENTA = '#d360aa', -- Deep magenta\n  BLUE = '#4f9cff', -- Light-medium blue\n  RED = '#ff3344', -- Strong red\n}\n\n-- Function to get the color associated with the current mode in Vim\nlocal function get_mode_color()\n  -- Define a table mapping modes to their associated colors\n  local mode_color = {\n    n = colors.DARKBLUE,\n    i = colors.VIOLET,\n    v = colors.RED,\n    ['\u0016'] = colors.BLUE,\n    V = colors.RED,\n    c = colors.MAGENTA,\n    no = colors.RED,\n    s = colors.ORANGE,\n    S = colors.ORANGE,\n    ['\u0013'] = colors.ORANGE,\n    ic = colors.YELLOW,\n    R = colors.ORANGE,\n    Rv = colors.ORANGE,\n    cv = colors.RED,\n    ce = colors.RED,\n    r = colors.CYAN,\n    rm = colors.CYAN,\n    ['r?'] = colors.CYAN,\n    ['!'] = colors.RED,\n    t = colors.RED,\n  }\n  -- Return the opposite color, or fallback to foreground color\n  return mode_color[vim.fn.mode()]\nend\n\n-- Function to get the opposite color of a given mode color\nlocal function get_opposite_color(mode_color)\n  -- Define a table mapping colors to their opposite color\n  local opposite_colors = {\n    [colors.RED] = colors.CYAN,\n    [colors.BLUE] = colors.ORANGE,\n    [colors.GREEN] = colors.MAGENTA,\n    [colors.MAGENTA] = colors.DARKBLUE,\n    [colors.ORANGE] = colors.BLUE,\n    [colors.CYAN] = colors.YELLOW,\n    [colors.VIOLET] = colors.GREEN,\n    [colors.YELLOW] = colors.RED,\n    [colors.DARKBLUE] = colors.VIOLET,\n  }\n  -- Return the opposite color, or fallback to foreground color\n  return opposite_colors[mode_color] or colors.FG\nend\n\n-- Function to get an animated color (randomly chosen from available colors)\nlocal function get_animated_color(mode_color)\n  -- Define a list of all available colors\n  local all_colors = {\n    colors.RED,\n    colors.BLUE,\n    colors.GREEN,\n    colors.MAGENTA,\n    colors.ORANGE,\n    colors.CYAN,\n    colors.VIOLET,\n    colors.YELLOW,\n    colors.DARKBLUE,\n  }\n  -- Create a list of possible opposite colors (excluding the current mode color)\n  local possible_opposites = {}\n  for _, color in ipairs(all_colors) do\n    if color ~= mode_color then\n      table.insert(possible_opposites, color)\n    end\n  end\n  -- Randomly select an opposite color\n  if #possible_opposites > 0 then\n    local random_index = math.random(1, #possible_opposites)\n    return possible_opposites[random_index]\n  else\n    return colors.FG -- Default to foreground color if no opposite found\n  end\nend\n\n-- Function to interpolate between two colors for a smooth transition\nlocal function interpolate_color(color1, color2, step)\n  -- Blend two colors based on the given step factor (0.0 -> color1, 1.0 -> color2)\n  local blend = function(c1, c2, stp)\n    return math.floor(c1 + (c2 - c1) * stp)\n  end\n  -- Extract the RGB values of both colors (in hex)\n  local r1, g1, b1 = tonumber(color1:sub(2, 3), 16), tonumber(color1:sub(4, 5), 16), tonumber(color1:sub(6, 7), 16)\n  local r2, g2, b2 = tonumber(color2:sub(2, 3), 16), tonumber(color2:sub(4, 5), 16), tonumber(color2:sub(6, 7), 16)\n\n  -- Calculate the new RGB values for the blended color\n  local r = blend(r1, r2, step)\n  local g = blend(g1, g2, step)\n  local b = blend(b1, b2, step)\n\n  -- Return the blended color in hex format\n  return string.format('#%02X%02X%02X', r, g, b)\nend\n\n-- Function to get a middle color by interpolating between mode color and its opposite\nlocal function get_middle_color(color_step)\n  -- Set default value for color_step if not provided\n  color_step = color_step or 0.5 -- If color_step is nil, default to 0.5\n\n  local color1 = get_mode_color() -- Get the current mode color\n  local color2 = get_opposite_color(color1) -- Get the opposite color\n\n  -- Return an interpolated color between the two (based on the color_step value)\n  return interpolate_color(color1, color2, color_step)\nend\n\n-- Condition: Check if the buffer is not empty\n-- This checks whether the current file's name is non-empty.\n-- If the file is open (i.e., has a name), it returns true, meaning the buffer is not empty.\n-- local function buffer_not_empty()\n-- \treturn vim.fn.empty(vim.fn.expand('%:t')) ~= 1 -- 'expand('%:t')' gets the file name\n-- end\n\n-- Condition: Hide in width (only show the statusline when the window width is greater than 80)\n-- This ensures that the statusline will only appear if the current window width exceeds 80 characters.\nlocal function hide_in_width()\n  return vim.fn.winwidth(0) > 80 -- 'winwidth(0)' returns the current window width\nend\n\n-- Condition: Check if the current workspace is inside a Git repository\n-- This function checks if the current file is inside a Git repository by looking for a `.git` directory\n-- in the current file's path. Returns true if the file is in a Git workspace.\n-- local function check_git_workspace()\n-- \tlocal filepath = vim.fn.expand('%:p:h')               -- Get the current file's directory\n-- \tlocal gitdir = vim.fn.finddir('.git', filepath .. ';') -- Search for a `.git` directory in the file path\n-- \treturn gitdir and #gitdir > 0 and #gitdir < #filepath -- Returns true if a `.git` directory is found\n-- end\n\n-- -- Set random seed based on current time for randomness\nmath.randomseed(os.time())\n-- Icon sets for random selection\nlocal icon_sets = {\n  stars = { '★', '☆', '✧', '✦', '✶', '✷', '✸', '✹' }, -- Set of star-like icons\n  runes = {\n    '✠',\n    '⛧',\n    '𖤐',\n    'ᛟ',\n    'ᚨ',\n    'ᚱ',\n    'ᚷ',\n    'ᚠ',\n    'ᛉ',\n    'ᛊ',\n    'ᛏ',\n    '☠',\n    '☾',\n    '♰',\n    '✟',\n    '☽',\n    '⚚',\n    '🜏',\n  }, -- Set of rune-like symbols\n  hearts = { '❤', '♥', '♡', '❦', '❧' }, -- Set of heart-shaped icons\n  waves = { '≈', '∿', '≋', '≀', '⌀', '≣', '⌇' }, -- Set of wave-like symbols\n  crosses = { '☨', '✟', '♰', '♱', '⛨', '' }, -- Set of cross-like symbols\n}\n\n-- Function to select a random icon from a given set\nlocal function get_random_icon(icons)\n  return icons[math.random(#icons)] -- Returns a random icon from the set\nend\n\n-- Function to shuffle the elements in a table\nlocal function shuffle_table(tbl)\n  local n = #tbl\n  while n > 1 do\n    local k = math.random(n)\n    tbl[n], tbl[k] = tbl[k], tbl[n] -- Swap elements\n    n = n - 1 -- Decrease the size of the unsorted portion\n  end\nend\n\n-- Create a list of all icon sets to allow for random selection from any set\nlocal icon_sets_list = {}\nfor _, icons in pairs(icon_sets) do\n  table.insert(icon_sets_list, icons) -- Add each icon set to the list\nend\nshuffle_table(icon_sets_list) -- Shuffle the icon sets list\n\n-- Function to reverse the order of elements in a table\nlocal function reverse_table(tbl)\n  local reversed = {}\n  for i = #tbl, 1, -1 do\n    table.insert(reversed, tbl[i]) -- Insert elements in reverse order\n  end\n  return reversed\nend\n\n-- Create a reversed list of icon sets\nlocal reversed_icon_sets = reverse_table(icon_sets_list)\n\n-- Function to create a separator component based on side (left/right) and optional mode color\nlocal function create_separator(side, use_mode_color)\n  return {\n    function()\n      return side == 'left' and '' or '' -- Choose separator symbol based on side\n    end,\n    color = function()\n      -- Set color based on mode or opposite color\n      local color = use_mode_color and get_mode_color() or get_opposite_color(get_mode_color())\n      return {\n        fg = color,\n      }\n    end,\n    padding = {\n      left = 0,\n    },\n  }\nend\n\n-- Function to create a mode-based component (e.g., statusline)\n-- with optional content, icon, and colors\nlocal function create_mode_based_component(content, icon, color_fg, color_bg)\n  return {\n    content,\n    icon = icon,\n    color = function()\n      local mode_color = get_mode_color()\n      local opposite_color = get_opposite_color(mode_color)\n      return {\n        fg = color_fg or colors.FG,\n        bg = color_bg or opposite_color,\n        gui = 'bold',\n      }\n    end,\n  }\nend\n\n-- -- Function to get the current mode indicator as a single character\nlocal function mode()\n  -- Map of modes to their respective shorthand indicators\n  local mode_map = {\n    n = 'N', -- Normal mode\n    i = 'I', -- Insert mode\n    v = 'V', -- Visual mode\n    ['\u0016'] = 'V', -- Visual block mode\n    V = 'V', -- Visual line mode\n    c = 'C', -- Command-line mode\n    no = 'N', -- NInsert mode\n    s = 'S', -- Select mode\n    S = 'S', -- Select line mode\n    ic = 'I', -- Insert mode (completion)\n    R = 'R', -- Replace mode\n    Rv = 'R', -- Virtual Replace mode\n    cv = 'C', -- Command-line mode\n    ce = 'C', -- Ex mode\n    r = 'R', -- Prompt mode\n    rm = 'M', -- More mode\n    ['r?'] = '?', -- Confirm mode\n    ['!'] = '!', -- Shell mode\n    t = 'T', -- Terminal mode\n  }\n  -- Return the mode shorthand or [UNKNOWN] if no match\n  return mode_map[vim.fn.mode()] or '[UNKNOWN]'\nend\n\n-- Config\nlocal config = {\n  options = {\n    component_separators = '',\n    section_separators = '',\n    theme = {\n      normal = {\n        c = {\n          fg = colors.FG,\n          bg = colors.BG,\n        },\n      },\n      inactive = {\n        c = {\n          fg = colors.FG,\n          bg = colors.BG,\n        },\n      }, -- Simplified inactive theme\n    },\n    disabled_filetypes = {\n      'neo-tree',\n      'undotree',\n      'sagaoutline',\n      'diff',\n    },\n  },\n  sections = {\n    lualine_a = {},\n    lualine_b = {},\n    lualine_c = {},\n    lualine_x = {},\n    lualine_y = {},\n    lualine_z = {},\n  },\n  inactive_sections = {\n    lualine_a = {},\n    lualine_b = {},\n    lualine_c = {\n      {\n\n        'location',\n        color = function()\n          return {\n            fg = colors.FG,\n            gui = 'bold',\n          }\n        end,\n      },\n    },\n    lualine_x = {\n      {\n        'filename',\n        color = function()\n          return {\n            fg = colors.FG,\n            gui = 'bold,italic',\n          }\n        end,\n      },\n    },\n    lualine_y = {},\n    lualine_z = {},\n  },\n}\n\n-- Helper functions\nlocal function ins_left(component)\n  table.insert(config.sections.lualine_c, component)\nend\n\nlocal function ins_right(component)\n  table.insert(config.sections.lualine_x, component)\nend\n\n-- LEFT\nins_left {\n  mode,\n  color = function()\n    local mode_color = get_mode_color()\n    return {\n      fg = colors.BG,\n      bg = mode_color,\n      gui = 'bold',\n    }\n  end,\n  padding = { left = 1, right = 1 },\n}\n\nins_left(create_separator('left', true))\n\nins_left {\n  function()\n    return vim.fn.fnamemodify(vim.fn.getcwd(), ':t')\n  end,\n  icon = ' ',\n  color = function()\n    local virtual_env = vim.env.VIRTUAL_ENV\n    if virtual_env then\n      return {\n        fg = get_mode_color(),\n        gui = 'bold,strikethrough',\n      }\n    else\n      return {\n        fg = get_mode_color(),\n        gui = 'bold',\n      }\n    end\n  end,\n}\n\nins_left(create_separator('right'))\n\nins_left(create_mode_based_component('filename', nil, colors.BG))\n\nins_left(create_separator('left'))\n\nins_left {\n  function()\n    return ''\n  end,\n  color = function()\n    return {\n      fg = get_middle_color(),\n    }\n  end,\n  cond = hide_in_width,\n}\n\nins_left {\n  function()\n    local git_status = vim.b.gitsigns_status_dict\n    if git_status then\n      return string.format('+%d ~%d -%d', git_status.added or 0, git_status.changed or 0, git_status.removed or 0)\n    end\n    return ''\n  end,\n  -- icon = '󰊢 ',\n  color = {\n    fg = colors.YELLOW,\n    gui = 'bold',\n  },\n  cond = hide_in_width,\n}\n\nfor _, icons in pairs(icon_sets_list) do\n  ins_left {\n    function()\n      return get_random_icon(icons)\n    end,\n    color = function()\n      return {\n        fg = get_animated_color(),\n      }\n    end,\n    cond = hide_in_width,\n  }\nend\n\nins_left {\n  'searchcount',\n  color = {\n    fg = colors.GREEN,\n    gui = 'bold',\n  },\n}\n\n-- RIGHT\nins_right {\n  function()\n    local reg = vim.fn.reg_recording()\n    return reg ~= '' and '[' .. reg .. ']' or ''\n  end,\n  color = {\n    fg = '#ff3344',\n    gui = 'bold',\n  },\n  cond = function()\n    return vim.fn.reg_recording() ~= ''\n  end,\n}\n\nins_right {\n  'selectioncount',\n  color = {\n    fg = colors.GREEN,\n    gui = 'bold',\n  },\n}\n\nfor _, icons in ipairs(reversed_icon_sets) do\n  ins_right {\n    function()\n      return get_random_icon(icons)\n    end,\n    color = function()\n      return {\n        fg = get_animated_color(),\n      }\n    end,\n    cond = hide_in_width,\n  }\nend\n\nins_right {\n  function()\n    local msg = 'No Active Lsp'\n    local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')\n    local clients = vim.lsp.get_clients()\n    if next(clients) == nil then\n      return msg\n    end\n    local lsp_short_names = {\n      pyright = 'py',\n      tsserver = 'ts',\n      rust_analyzer = 'rs',\n      lua_ls = 'lua',\n      clangd = 'c++',\n      bashls = 'sh',\n      jsonls = 'json',\n      html = 'html',\n      cssls = 'css',\n      tailwindcss = 'tw',\n      dockerls = 'docker',\n      sqlls = 'sql',\n      yamlls = 'yml',\n    }\n    for _, client in ipairs(clients) do\n      local filetypes = client.config.filetypes\n      if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then\n        return lsp_short_names[client.name] or client.name:sub(1, 2)\n      end\n    end\n    return msg\n  end,\n  icon = ' ',\n  color = {\n    fg = colors.YELLOW,\n    gui = 'bold',\n  },\n}\n\nins_right {\n  function()\n    return ''\n  end,\n  color = function()\n    return { fg = get_middle_color() }\n  end,\n  cond = hide_in_width,\n}\n\nins_right(create_separator('right'))\n\nins_right(create_mode_based_component('location', nil, colors.BG))\n\nins_right(create_separator('left'))\n\nins_right {\n  'branch',\n  icon = ' ',\n  --[[ Truncates and formats Git branch names for display in lualine:\n    First segment: Uppercase, truncated to 1 character.\n    Middle segments: Lowercase, truncated to 1 character.\n    Last segment: Unchanged.\n    Separator: › between truncated segments and the last segment.\n\n    Example Input/Output:\n\t\tBranch\t\t\t\t\t\t\t\t\t\tName\tOutput\n\t\tbackend/setup/tailwind\t\tBs›tailwind\n\t\tfeature/add-ui\t\t\t\t\t\tFa›add-ui\n\t\tmain\t\t\t\t\t\t\t\t\t\t\tmain\n\t]]\n  fmt = function(branch)\n    if branch == '' or branch == nil then\n      return 'No Repo'\n    end\n\n    -- Function to truncate a segment to a specified length\n    local function truncate_segment(segment, max_length)\n      if #segment > max_length then\n        return segment:sub(1, max_length)\n      end\n      return segment\n    end\n\n    -- Split the branch name by '/'\n    local segments = {}\n    for segment in branch:gmatch('[^/]+') do\n      table.insert(segments, segment)\n    end\n\n    -- Truncate all segments except the last one\n    for i = 1, #segments - 1 do\n      segments[i] = truncate_segment(segments[i], 1) -- Truncate to 1 character\n    end\n\n    -- If there's only one segment (no '/'), return it as-is\n    if #segments == 1 then\n      return segments[1]\n    end\n\n    -- Capitalize the first segment and lowercase the rest (except the last one)\n    segments[1] = segments[1]:upper() -- First segment uppercase\n    for i = 2, #segments - 1 do\n      segments[i] = segments[i]:lower() -- Other segments lowercase\n    end\n\n    -- Combine the first segments with no separator and add '›' before the last segment\n    local truncated_branch = table.concat(segments, '', 1, #segments - 1) .. '›' .. segments[#segments]\n\n    -- Ensure the final result doesn't exceed a maximum length\n    local max_total_length = 15\n    if #truncated_branch > max_total_length then\n      truncated_branch = truncated_branch:sub(1, max_total_length) .. '…'\n    end\n\n    return truncated_branch\n  end,\n  color = function()\n    local mode_color = get_mode_color()\n    return {\n      fg = mode_color,\n      gui = 'bold',\n    }\n  end,\n}\n\nins_right(create_separator('right'))\n\nins_right(create_mode_based_component('progress', nil, colors.BG))\n\nrequire('lualine').setup(config)\n"
  },
  {
    "path": "examples/evil_lualine.lua",
    "content": "-- Eviline config for lualine\n-- Author: shadmansaleh\n-- Credit: glepnir\nlocal lualine = require('lualine')\n\n-- Color table for highlights\n-- stylua: ignore\nlocal colors = {\n  bg       = '#202328',\n  fg       = '#bbc2cf',\n  yellow   = '#ECBE7B',\n  cyan     = '#008080',\n  darkblue = '#081633',\n  green    = '#98be65',\n  orange   = '#FF8800',\n  violet   = '#a9a1e1',\n  magenta  = '#c678dd',\n  blue     = '#51afef',\n  red      = '#ec5f67',\n}\n\nlocal conditions = {\n  buffer_not_empty = function()\n    return vim.fn.empty(vim.fn.expand('%:t')) ~= 1\n  end,\n  hide_in_width = function()\n    return vim.fn.winwidth(0) > 80\n  end,\n  check_git_workspace = function()\n    local filepath = vim.fn.expand('%:p:h')\n    local gitdir = vim.fn.finddir('.git', filepath .. ';')\n    return gitdir and #gitdir > 0 and #gitdir < #filepath\n  end,\n}\n\n-- Config\nlocal config = {\n  options = {\n    -- Disable sections and component separators\n    component_separators = '',\n    section_separators = '',\n    theme = {\n      -- We are going to use lualine_c an lualine_x as left and\n      -- right section. Both are highlighted by c theme .  So we\n      -- are just setting default looks o statusline\n      normal = { c = { fg = colors.fg, bg = colors.bg } },\n      inactive = { c = { fg = colors.fg, bg = colors.bg } },\n    },\n  },\n  sections = {\n    -- these are to remove the defaults\n    lualine_a = {},\n    lualine_b = {},\n    lualine_y = {},\n    lualine_z = {},\n    -- These will be filled later\n    lualine_c = {},\n    lualine_x = {},\n  },\n  inactive_sections = {\n    -- these are to remove the defaults\n    lualine_a = {},\n    lualine_b = {},\n    lualine_y = {},\n    lualine_z = {},\n    lualine_c = {},\n    lualine_x = {},\n  },\n}\n\n-- Inserts a component in lualine_c at left section\nlocal function ins_left(component)\n  table.insert(config.sections.lualine_c, component)\nend\n\n-- Inserts a component in lualine_x at right section\nlocal function ins_right(component)\n  table.insert(config.sections.lualine_x, component)\nend\n\nins_left {\n  function()\n    return '▊'\n  end,\n  color = { fg = colors.blue }, -- Sets highlighting of component\n  padding = { left = 0, right = 1 }, -- We don't need space before this\n}\n\nins_left {\n  -- mode component\n  function()\n    return ''\n  end,\n  color = function()\n    -- auto change color according to neovims mode\n    local mode_color = {\n      n = colors.red,\n      i = colors.green,\n      v = colors.blue,\n      ['\u0016'] = colors.blue,\n      V = colors.blue,\n      c = colors.magenta,\n      no = colors.red,\n      s = colors.orange,\n      S = colors.orange,\n      ['\u0013'] = colors.orange,\n      ic = colors.yellow,\n      R = colors.violet,\n      Rv = colors.violet,\n      cv = colors.red,\n      ce = colors.red,\n      r = colors.cyan,\n      rm = colors.cyan,\n      ['r?'] = colors.cyan,\n      ['!'] = colors.red,\n      t = colors.red,\n    }\n    return { fg = mode_color[vim.fn.mode()] }\n  end,\n  padding = { right = 1 },\n}\n\nins_left {\n  -- filesize component\n  'filesize',\n  cond = conditions.buffer_not_empty,\n}\n\nins_left {\n  'filename',\n  cond = conditions.buffer_not_empty,\n  color = { fg = colors.magenta, gui = 'bold' },\n}\n\nins_left { 'location' }\n\nins_left { 'progress', color = { fg = colors.fg, gui = 'bold' } }\n\nins_left {\n  'diagnostics',\n  sources = { 'nvim_diagnostic' },\n  symbols = { error = ' ', warn = ' ', info = ' ' },\n  diagnostics_color = {\n    error = { fg = colors.red },\n    warn = { fg = colors.yellow },\n    info = { fg = colors.cyan },\n  },\n}\n\n-- Insert mid section. You can make any number of sections in neovim :)\n-- for lualine it's any number greater then 2\nins_left {\n  function()\n    return '%='\n  end,\n}\n\nins_left {\n  -- Lsp server name .\n  function()\n    local msg = 'No Active Lsp'\n    local buf_ft = vim.api.nvim_get_option_value('filetype', { buf = 0 })\n    local clients = vim.lsp.get_clients()\n    if next(clients) == nil then\n      return msg\n    end\n    for _, client in ipairs(clients) do\n      local filetypes = client.config.filetypes\n      if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then\n        return client.name\n      end\n    end\n    return msg\n  end,\n  icon = ' LSP:',\n  color = { fg = '#ffffff', gui = 'bold' },\n}\n\n-- Add components to right sections\nins_right {\n  'o:encoding', -- option component same as &encoding in viml\n  fmt = string.upper, -- I'm not sure why it's upper case either ;)\n  cond = conditions.hide_in_width,\n  color = { fg = colors.green, gui = 'bold' },\n}\n\nins_right {\n  'fileformat',\n  fmt = string.upper,\n  icons_enabled = false, -- I think icons are cool but Eviline doesn't have them. sigh\n  color = { fg = colors.green, gui = 'bold' },\n}\n\nins_right {\n  'branch',\n  icon = '',\n  color = { fg = colors.violet, gui = 'bold' },\n}\n\nins_right {\n  'diff',\n  -- Is it me or the symbol for modified us really weird\n  symbols = { added = ' ', modified = '󰝤 ', removed = ' ' },\n  diff_color = {\n    added = { fg = colors.green },\n    modified = { fg = colors.orange },\n    removed = { fg = colors.red },\n  },\n  cond = conditions.hide_in_width,\n}\n\nins_right {\n  function()\n    return '▊'\n  end,\n  color = { fg = colors.blue },\n  padding = { left = 1 },\n}\n\n-- Now don't forget to initialize lualine\nlualine.setup(config)\n"
  },
  {
    "path": "examples/slanted-gaps.lua",
    "content": "local colors = {\n  red = '#ca1243',\n  grey = '#a0a1a7',\n  black = '#383a42',\n  white = '#f3f3f3',\n  light_green = '#83a598',\n  orange = '#fe8019',\n  green = '#8ec07c',\n}\n\nlocal theme = {\n  normal = {\n    a = { fg = colors.white, bg = colors.black },\n    b = { fg = colors.white, bg = colors.grey },\n    c = { fg = colors.black, bg = colors.white },\n    z = { fg = colors.white, bg = colors.black },\n  },\n  insert = { a = { fg = colors.black, bg = colors.light_green } },\n  visual = { a = { fg = colors.black, bg = colors.orange } },\n  replace = { a = { fg = colors.black, bg = colors.green } },\n}\n\nlocal empty = require('lualine.component'):extend()\nfunction empty:draw(default_highlight)\n  self.status = ''\n  self.applied_separator = ''\n  self:apply_highlights(default_highlight)\n  self:apply_section_separators()\n  return self.status\nend\n\n-- Put proper separators and gaps between components in sections\nlocal function process_sections(sections)\n  for name, section in pairs(sections) do\n    local left = name:sub(9, 10) < 'x'\n    for pos = 1, name ~= 'lualine_z' and #section or #section - 1 do\n      table.insert(section, pos * 2, { empty, color = { fg = colors.white, bg = colors.white } })\n    end\n    for id, comp in ipairs(section) do\n      if type(comp) ~= 'table' then\n        comp = { comp }\n        section[id] = comp\n      end\n      comp.separator = left and { right = '' } or { left = '' }\n    end\n  end\n  return sections\nend\n\nlocal function search_result()\n  if vim.v.hlsearch == 0 then\n    return ''\n  end\n  local last_search = vim.fn.getreg('/')\n  if not last_search or last_search == '' then\n    return ''\n  end\n  local searchcount = vim.fn.searchcount { maxcount = 9999 }\n  return last_search .. '(' .. searchcount.current .. '/' .. searchcount.total .. ')'\nend\n\nlocal function modified()\n  if vim.bo.modified then\n    return '+'\n  elseif vim.bo.modifiable == false or vim.bo.readonly == true then\n    return '-'\n  end\n  return ''\nend\n\nrequire('lualine').setup {\n  options = {\n    theme = theme,\n    component_separators = '',\n    section_separators = { left = '', right = '' },\n  },\n  sections = process_sections {\n    lualine_a = { 'mode' },\n    lualine_b = {\n      'branch',\n      'diff',\n      {\n        'diagnostics',\n        source = { 'nvim' },\n        sections = { 'error' },\n        diagnostics_color = { error = { bg = colors.red, fg = colors.white } },\n      },\n      {\n        'diagnostics',\n        source = { 'nvim' },\n        sections = { 'warn' },\n        diagnostics_color = { warn = { bg = colors.orange, fg = colors.white } },\n      },\n      { 'filename', file_status = false, path = 1 },\n      { modified, color = { bg = colors.red } },\n      {\n        '%w',\n        cond = function()\n          return vim.wo.previewwindow\n        end,\n      },\n      {\n        '%r',\n        cond = function()\n          return vim.bo.readonly\n        end,\n      },\n      {\n        '%q',\n        cond = function()\n          return vim.bo.buftype == 'quickfix'\n        end,\n      },\n    },\n    lualine_c = {},\n    lualine_x = {},\n    lualine_y = { search_result, 'filetype' },\n    lualine_z = { '%l:%c', '%p%%/%L' },\n  },\n  inactive_sections = {\n    lualine_c = { '%f %y %m' },\n    lualine_x = {},\n  },\n}\n"
  },
  {
    "path": "lua/lualine/component.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\nlocal lualine_require = require('lualine_require')\nlocal require = lualine_require.require\nlocal M = require('lualine.utils.class'):extend()\nlocal modules = lualine_require.lazy_require {\n  highlight = 'lualine.highlight',\n  utils_notices = 'lualine.utils.notices',\n  fn_store = 'lualine.utils.fn_store',\n}\n\n-- Used to provide a unique id for each component\nlocal component_no = 1\nfunction M._reset_components()\n  component_no = 1\nend\n\n-- variable to store component output for manipulation\nM.status = ''\n\nfunction M:__tostring()\n  local str = 'Component: ' .. self.options.component_name\n  if self.debug then\n    str = str .. '\\n---------------------\\n' .. vim.inspect(self)\n  end\n  return str\nend\n\nM.__is_lualine_component = true\n\n---initialize new component\n---@param options table options for component\nfunction M:init(options)\n  self.options = options or {}\n  component_no = component_no + 1\n  if not self.options.component_name then\n    self.options.component_name = tostring(component_no)\n  end\n  self.component_no = component_no\n  self:set_separator()\n  self:create_option_highlights()\n  self:set_on_click()\nend\n\n---sets the default separator for component based on whether the component\n---is in left sections or right sections when separator option is omitted.\nfunction M:set_separator()\n  if self.options.separator == nil then\n    if self.options.component_separators then\n      if self.options.self.section < 'x' then\n        self.options.separator = self.options.component_separators.left\n      else\n        self.options.separator = self.options.component_separators.right\n      end\n    end\n  end\nend\n\n---creates hl group from color option\nfunction M:create_option_highlights()\n  -- set custom highlights\n  if self.options.color then\n    self.options.color_highlight = self:create_hl(self.options.color)\n  end\n  -- setup icon highlight\n  if type(self.options.icon) == 'table' and self.options.icon.color then\n    self.options.icon_color_highlight = self:create_hl(self.options.icon.color)\n  end\nend\n\n---Setup on click function so they can be added during drawing.\nfunction M:set_on_click()\n  if self.options.on_click ~= nil then\n    if vim.fn.has('nvim-0.8') == 0 then\n      modules.utils_notices.add_notice(\n        '### Options.on_click\\nSorry `on_click` can only be used in neovim 0.8 or higher.\\n'\n      )\n      self.options.on_click = nil\n      return\n    end\n    self.on_click_id = modules.fn_store.register_fn(self.component_no, self.options.on_click)\n  end\nend\n\n---adds spaces to left and right of a component\nfunction M:apply_padding()\n  local padding = self.options.padding\n  local l_padding, r_padding\n  if padding == nil then\n    padding = 1\n  end\n  if type(padding) == 'number' then\n    l_padding, r_padding = padding, padding\n  elseif type(padding) == 'table' then\n    l_padding, r_padding = padding.left, padding.right\n  end\n  if l_padding then\n    if self.status:find('%%#.*#') == 1 then\n      -- When component has changed the highlight at beginning\n      -- we will add the padding after the highlight\n      local pre_highlight = vim.fn.matchlist(self.status, [[\\(%#.\\{-\\}#\\)]])[2]\n      self.status = pre_highlight .. string.rep(' ', l_padding) .. self.status:sub(#pre_highlight + 1, #self.status)\n    else\n      self.status = string.rep(' ', l_padding) .. self.status\n    end\n  end\n  if r_padding then\n    if self.status:reverse():find('%*%%.*#.*#%%') == 1 then\n      -- When component has changed the highlight at the end\n      -- we will add the padding before the highlight terminates\n      self.status = self.status:sub(1, -3) .. string.rep(' ', r_padding) .. self.status:sub(-2, -1)\n    else\n      self.status = self.status .. string.rep(' ', r_padding)\n    end\n  end\nend\n\n---applies custom highlights for component\nfunction M:apply_highlights(default_highlight)\n  if self.options.color_highlight then\n    local hl_fmt\n    hl_fmt, M.color_fn_cache = self:format_hl(self.options.color_highlight)\n    self.status = hl_fmt .. self.status\n  end\n  if type(self.options.separator) ~= 'table' and self.status:find('%%#') then\n    -- Apply default highlight only when we aren't applying trans sep and\n    -- the component has changed it's hl. Since we won't be applying\n    -- regular sep in those cases so ending with default hl isn't necessary\n    self.status = self.status .. default_highlight\n    -- Also put it in applied sep so when sep get striped so does the hl\n    self.applied_separator = default_highlight\n  end\n  -- Prepend default hl when the component doesn't start with hl otherwise\n  -- color in previous component can cause side effect\n  if not self.status:find('^%%#') then\n    self.status = default_highlight .. self.status\n  end\nend\n\n---apply icon to component (appends/prepends component with icon)\nfunction M:apply_icon()\n  local icon = self.options.icon\n  if self.options.icons_enabled and icon then\n    if type(icon) == 'table' then\n      icon = icon[1]\n    end\n    if\n      self.options.icon_color_highlight\n      and type(self.options.icon) == 'table'\n      and self.options.icon.align == 'right'\n    then\n      self.status = table.concat {\n        self.status,\n        ' ',\n        self:format_hl(self.options.icon_color_highlight),\n        icon,\n        self:get_default_hl(),\n      }\n    elseif self.options.icon_color_highlight then\n      self.status = table.concat {\n        self:format_hl(self.options.icon_color_highlight),\n        icon,\n        self:get_default_hl(),\n        ' ',\n        self.status,\n      }\n    elseif type(self.options.icon) == 'table' and self.options.icon.align == 'right' then\n      self.status = table.concat({ self.status, icon }, ' ')\n    else\n      self.status = table.concat({ icon, self.status }, ' ')\n    end\n  end\nend\n\n---apply separator at end of component only when\n---custom highlights haven't affected background\nfunction M:apply_separator()\n  local separator = self.options.separator\n  if type(separator) == 'table' then\n    if self.options.separator[2] == '' then\n      if self.options.self.section < 'x' then\n        separator = self.options.component_separators.left\n      else\n        separator = self.options.component_separators.right\n      end\n    else\n      return\n    end\n  end\n  if separator and #separator > 0 then\n    self.status = self.status .. separator\n    self.applied_separator = self.applied_separator .. separator\n  end\nend\n\n---apply transitional separator for the component\nfunction M:apply_section_separators()\n  if type(self.options.separator) ~= 'table' then\n    return\n  end\n  if self.options.separator.left ~= nil and self.options.separator.left ~= '' then\n    self.status = string.format('%%z{%s}%s', self.options.separator.left, self.status)\n    self.strip_previous_separator = true\n  end\n  if self.options.separator.right ~= nil and self.options.separator.right ~= '' then\n    self.status = string.format('%s%%Z{%s}', self.status, self.options.separator.right)\n  end\nend\n\n---Add on click function description to already drawn item\nfunction M:apply_on_click()\n  if self.on_click_id then\n    self.status = self:format_fn(self.on_click_id, self.status)\n  end\nend\n\n---remove separator from tail of this component.\n---called by lualine.utils.sections.draw_section to manage unnecessary separators\nfunction M:strip_separator()\n  if not self.applied_separator then\n    self.applied_separator = ''\n  end\n  self.status = self.status:sub(1, (#self.status - #self.applied_separator))\n  self.applied_separator = nil\n  return self.status\nend\n\nfunction M:get_default_hl()\n  if self.options.color_highlight then\n    return self:format_hl(self.options.color_highlight)\n  elseif self.default_hl then\n    return self.default_hl\n  else\n    return modules.highlight.format_highlight(self.options.self.section)\n  end\nend\n\n---create a lualine highlight for color\n---@param color table|string|function defined color for hl\n---@param hint string|nil hint for hl name\n---@return table an identifier to later retrieve the hl for application\nfunction M:create_hl(color, hint)\n  hint = hint and self.options.component_name .. '_' .. hint or self.options.component_name\n  return modules.highlight.create_component_highlight_group(color, hint, self.options, false)\nend\n\n---Get stl formatted hl group for hl_token\n---@param hl_token table identifier received from create_hl or create_component_highlight_group\n---@return string stl formatted hl group for hl_token\nfunction M:format_hl(hl_token)\n  return modules.highlight.component_format_highlight(hl_token)\nend\n\n---Wrap str with click format for function of id\n---@param id number\n---@param str string\n---@return string\nfunction M:format_fn(id, str)\n  return string.format(\"%%%d@v:lua.require'lualine.utils.fn_store'.call_fn@%s%%T\", id, str)\nend\n\n-- luacheck: push no unused args\n---actual function that updates a component. Must be overwritten with component functionality\nfunction M:update_status(is_focused) end\n-- luacheck: pop\n\n---driver code of the class\n---@param default_highlight string default hl group of section where component resides\n---@param is_focused boolean|number whether drawing for active or inactive statusline.\n---@return string stl formatted rendering string for component\nfunction M:draw(default_highlight, is_focused)\n  self.status = ''\n  self.applied_separator = ''\n\n  if self.options.cond ~= nil and self.options.cond() ~= true then\n    return self.status\n  end\n  self.default_hl = default_highlight\n  local status = self:update_status(is_focused)\n  if self.options.fmt then\n    status = self.options.fmt(status or '', self)\n  end\n  if type(status) == 'string' and (#status > 0 or self.options.draw_empty) then\n    self.status = status\n    if #status > 0 then\n      self:apply_icon()\n      self:apply_padding()\n    end\n    self:apply_on_click()\n    self:apply_highlights(default_highlight)\n    self:apply_section_separators()\n    self:apply_separator()\n  end\n  return self.status\nend\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/components/branch/git_branch.lua",
    "content": "local M = {}\n\nlocal require = require('lualine_require').require\nlocal utils = require('lualine.utils.utils')\n\n-- vars\nlocal current_git_branch = ''\nlocal current_git_dir = ''\nlocal branch_cache = {} -- stores last known branch for a buffer\nlocal active_bufnr = '0'\n-- os specific path separator\nlocal sep = package.config:sub(1, 1)\n-- event watcher to watch head file\n-- Use file watch for non Windows and poll for Windows.\n-- Windows doesn't like file watch for some reason.\nlocal file_changed = sep ~= '\\\\' and vim.loop.new_fs_event() or vim.loop.new_fs_poll()\nlocal git_dir_cache = {} -- Stores git paths that we already know of\n\n---sets git_branch variable to branch name or commit hash if not on branch\n---@param head_file string full path of .git/HEAD file\nlocal function get_git_head(head_file)\n  local f_head = io.open(head_file)\n  if f_head then\n    local HEAD = f_head:read()\n    f_head:close()\n    local branch = HEAD:match('ref: refs/heads/(.+)$')\n    if branch then\n      current_git_branch = branch\n    else\n      current_git_branch = HEAD:sub(1, 6)\n    end\n  end\n  return nil\nend\n\n---updates the current value of git_branch and sets up file watch on HEAD file\nlocal function update_branch()\n  active_bufnr = tostring(vim.api.nvim_get_current_buf())\n  file_changed:stop()\n  local git_dir = current_git_dir\n  if git_dir and #git_dir > 0 then\n    local head_file = git_dir .. sep .. 'HEAD'\n    get_git_head(head_file)\n    file_changed:start(\n      head_file,\n      sep ~= '\\\\' and {} or 1000,\n      vim.schedule_wrap(function()\n        -- reset file-watch\n        update_branch()\n      end)\n    )\n  else\n    -- set to '' when git dir was not found\n    current_git_branch = ''\n  end\n  branch_cache[vim.api.nvim_get_current_buf()] = current_git_branch\nend\n\n---updates the current value of current_git_branch and sets up file watch on HEAD file if value changed\nlocal function update_current_git_dir(git_dir)\n  if current_git_dir ~= git_dir then\n    current_git_dir = git_dir\n    update_branch()\n  end\nend\n\n---returns full path to git directory for dir_path or current directory\n---@param dir_path string|nil\n---@return string|nil\nfunction M.find_git_dir(dir_path)\n  local git_dir = vim.env.GIT_DIR\n  if git_dir then\n    update_current_git_dir(git_dir)\n    return git_dir\n  end\n\n  -- get file dir so we can search from that dir\n  local file_dir = dir_path or vim.fn.expand('%:p:h')\n\n  if package.loaded.oil then\n    local oil = require('oil')\n    local ok, dir = pcall(oil.get_current_dir)\n    if ok and dir and dir ~= '' then\n      file_dir = vim.fn.fnamemodify(dir, ':p:h')\n    end\n  end\n\n  -- extract correct file dir from terminals\n  if file_dir and file_dir:match('term://.*') then\n    file_dir = vim.fn.expand(file_dir:gsub('term://(.+)//.+', '%1'))\n  end\n\n  local root_dir = file_dir\n  -- Search upward for .git file or folder\n  while root_dir do\n    if git_dir_cache[root_dir] then\n      git_dir = git_dir_cache[root_dir]\n      break\n    end\n    local git_path = root_dir .. sep .. '.git'\n    local git_file_stat = vim.loop.fs_stat(git_path)\n    if git_file_stat then\n      if git_file_stat.type == 'directory' then\n        git_dir = git_path\n      elseif git_file_stat.type == 'file' then\n        -- separate git-dir or submodule is used\n        local file = io.open(git_path)\n        if file then\n          git_dir = file:read()\n          git_dir = git_dir and git_dir:match('gitdir: (.+)$')\n          file:close()\n        end\n        -- submodule / relative file path\n        if git_dir and git_dir:sub(1, 1) ~= sep and not git_dir:match('^%a:.*$') then\n          git_dir = git_path:match('(.*).git') .. git_dir\n        end\n      end\n      if git_dir then\n        local head_file_stat = vim.loop.fs_stat(git_dir .. sep .. 'HEAD')\n        if head_file_stat and head_file_stat.type == 'file' then\n          break\n        else\n          git_dir = nil\n        end\n      end\n    end\n    root_dir = root_dir:match('(.*)' .. sep .. '.-')\n  end\n\n  git_dir_cache[file_dir] = git_dir\n  if dir_path == nil then\n    update_current_git_dir(git_dir)\n  end\n  return git_dir\nend\n\n---initializes git_branch module\nfunction M.init()\n  -- run watch head on load so branch is present when component is loaded\n  M.find_git_dir()\n  -- update branch state of BufEnter as different Buffer may be on different repos\n  utils.define_autocmd('BufEnter', \"lua require'lualine.components.branch.git_branch'.find_git_dir()\")\nend\nfunction M.get_branch(bufnr)\n  if vim.g.actual_curbuf ~= nil and active_bufnr ~= vim.g.actual_curbuf then\n    -- Workaround for https://github.com/nvim-lualine/lualine.nvim/issues/286\n    -- See upstream issue https://github.com/neovim/neovim/issues/15300\n    -- Diff is out of sync re sync it.\n    M.find_git_dir()\n  end\n  if bufnr then\n    return branch_cache[bufnr] or ''\n  else\n    branch_cache[vim.api.nvim_get_current_buf()] = current_git_branch\n  end\n  return current_git_branch\nend\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/components/branch/init.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\nlocal M = require('lualine.component'):extend()\nlocal modules = require('lualine_require').lazy_require {\n  git_branch = 'lualine.components.branch.git_branch',\n  highlight = 'lualine.highlight',\n  utils = 'lualine.utils.utils',\n}\n\n-- Initializer\nM.init = function(self, options)\n  M.super.init(self, options)\n  if not self.options.icon then\n    self.options.icon = '' -- e0a0\n  end\n  modules.git_branch.init()\nend\n\nM.update_status = function(_, is_focused)\n  local buf = (not is_focused and vim.api.nvim_get_current_buf())\n  local branch = modules.git_branch.get_branch(buf)\n  return modules.utils.stl_escape(branch)\nend\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/components/buffers/buffer.lua",
    "content": "local Buffer = require('lualine.utils.class'):extend()\n\nlocal modules = require('lualine_require').lazy_require {\n  highlight = 'lualine.highlight',\n  utils = 'lualine.utils.utils',\n}\n\n---initialize a new buffer from opts\n---@param opts table\nfunction Buffer:init(opts)\n  assert(opts.bufnr, 'Cannot create Buffer without bufnr')\n  self.bufnr = opts.bufnr\n  self.buf_index = opts.buf_index\n  self.options = opts.options\n  self.highlights = opts.highlights\n  self:get_props()\nend\n\nfunction Buffer:is_current()\n  return vim.api.nvim_get_current_buf() == self.bufnr\nend\n\nfunction Buffer:is_alternate()\n  return vim.fn.bufnr('#') == self.bufnr and not self:is_current()\nend\n\n---setup icons, modified status for buffer\nfunction Buffer:get_props()\n  self.file = modules.utils.stl_escape(vim.api.nvim_buf_get_name(self.bufnr))\n  self.buftype = vim.api.nvim_buf_get_option(self.bufnr, 'buftype')\n  self.filetype = vim.api.nvim_buf_get_option(self.bufnr, 'filetype')\n  local modified = self.options.show_modified_status and vim.api.nvim_buf_get_option(self.bufnr, 'modified')\n  self.modified_icon = modified and self.options.symbols.modified or ''\n  self.alternate_file_icon = self:is_alternate() and self.options.symbols.alternate_file or ''\n  self.icon = ''\n  if self.options.icons_enabled then\n    local dev\n    local status, _ = pcall(require, 'nvim-web-devicons')\n    if not status then\n      dev, _ = '', ''\n    elseif self.filetype == 'TelescopePrompt' then\n      dev, _ = require('nvim-web-devicons').get_icon('telescope')\n    elseif self.filetype == 'fugitive' then\n      dev, _ = require('nvim-web-devicons').get_icon('git')\n    elseif self.filetype == 'vimwiki' then\n      dev, _ = require('nvim-web-devicons').get_icon('markdown')\n    elseif self.buftype == 'terminal' then\n      dev, _ = require('nvim-web-devicons').get_icon('zsh')\n    elseif vim.fn.isdirectory(self.file) == 1 then\n      dev, _ = self.options.symbols.directory, nil\n    else\n      dev, _ = require('nvim-web-devicons').get_icon(self.file, vim.fn.expand('#' .. self.bufnr .. ':e'))\n    end\n    if dev then\n      self.icon = dev .. ' '\n    end\n  end\nend\n\n---returns line configured for handling mouse click\n---@param name string\n---@return string\nfunction Buffer:configure_mouse_click(name)\n  return string.format('%%%s@LualineSwitchBuffer@%s%%T', self.bufnr, name)\nend\n\n---returns rendered buffer\n---@return string\nfunction Buffer:render()\n  local name = self:name()\n  if self.options.fmt then\n    name = self.options.fmt(name or '', self)\n  end\n\n  if self.ellipse then -- show ellipsis\n    name = '...'\n  else\n    name = self:apply_mode(name)\n  end\n  name = Buffer.apply_padding(name, self.options.padding)\n  self.len = vim.fn.strchars(name)\n\n  -- setup for mouse clicks\n  local line = self:configure_mouse_click(name)\n  -- apply highlight\n  line = modules.highlight.component_format_highlight(self.highlights[(self.current and 'active' or 'inactive')])\n    .. line\n\n  -- apply separators\n  if self.options.self.section < 'x' and not self.first then\n    local sep_before = self:separator_before()\n    line = sep_before .. line\n    self.len = self.len + vim.fn.strchars(sep_before)\n  elseif self.options.self.section >= 'x' and not self.last then\n    local sep_after = self:separator_after()\n    line = line .. sep_after\n    self.len = self.len + vim.fn.strchars(sep_after)\n  end\n  return line\nend\n\n---apply separator before current buffer\n---@return string\nfunction Buffer:separator_before()\n  if self.current or self.aftercurrent then\n    return '%Z{' .. self.options.section_separators.left .. '}'\n  else\n    return self.options.component_separators.left\n  end\nend\n\n---apply separator after current buffer\n---@return string\nfunction Buffer:separator_after()\n  if self.current or self.beforecurrent then\n    return '%z{' .. self.options.section_separators.right .. '}'\n  else\n    return self.options.component_separators.right\n  end\nend\n\n---returns name of current buffer after filtering special buffers\n---@return string\nfunction Buffer:name()\n  if self.options.filetype_names[self.filetype] then\n    return self.options.filetype_names[self.filetype]\n  elseif self.buftype == 'help' then\n    return 'help:' .. vim.fn.fnamemodify(self.file, ':t:r')\n  elseif self.buftype == 'terminal' then\n    local match = string.match(vim.split(self.file, ' ')[1], 'term:.*:(%a+)')\n    return match ~= nil and match or vim.fn.fnamemodify(vim.env.SHELL, ':t')\n  elseif self.buftype == 'quickfix' then\n    local is_loclist = 0 ~= vim.fn.getloclist(0, { filewinid = 1 }).filewinid\n    return is_loclist and 'Location list' or 'Quickfix List'\n  elseif vim.fn.isdirectory(self.file) == 1 then\n    return vim.fn.fnamemodify(self.file, ':p:.')\n  elseif self.file == '' then\n    return '[No Name]'\n  end\n\n  local name\n  if self.options.show_filename_only then\n    name = vim.fn.fnamemodify(self.file, ':t')\n  else\n    name = vim.fn.pathshorten(vim.fn.fnamemodify(self.file, ':p:.'))\n  end\n  if self.options.hide_filename_extension then\n    name = vim.fn.fnamemodify(name, ':r')\n  end\n  return name\nend\n\n---adds spaces to left and right\nfunction Buffer.apply_padding(str, padding)\n  local l_padding, r_padding = 1, 1\n  if type(padding) == 'number' then\n    l_padding, r_padding = padding, padding\n  elseif type(padding) == 'table' then\n    l_padding, r_padding = padding.left or 0, padding.right or 0\n  end\n  return string.rep(' ', l_padding) .. str .. string.rep(' ', r_padding)\nend\n\nfunction Buffer:apply_mode(name)\n  if self.options.mode == 0 then\n    return string.format('%s%s%s%s', self.alternate_file_icon, self.icon, name, self.modified_icon)\n  end\n\n  if self.options.mode == 1 then\n    return string.format('%s%s %s%s', self.alternate_file_icon, self.buf_index or '', self.icon, self.modified_icon)\n  end\n\n  if self.options.mode == 2 then\n    return string.format(\n      '%s%s %s%s%s',\n      self.alternate_file_icon,\n      self.buf_index or '',\n      self.icon,\n      name,\n      self.modified_icon\n    )\n  end\n\n  if self.options.mode == 3 then\n    return string.format('%s%s %s%s', self.alternate_file_icon, self.bufnr or '', self.icon, self.modified_icon)\n  end\n\n  -- if self.options.mode == 4 then\n  return string.format('%s%s %s%s%s', self.alternate_file_icon, self.bufnr or '', self.icon, name, self.modified_icon)\nend\n\nreturn Buffer\n"
  },
  {
    "path": "lua/lualine/components/buffers/init.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\nlocal require = require('lualine_require').require\nlocal Buffer = require('lualine.components.buffers.buffer')\nlocal M = require('lualine.component'):extend()\nlocal highlight = require('lualine.highlight')\n\nlocal default_options = {\n  show_filename_only = true,\n  hide_filename_extension = false,\n  show_modified_status = true,\n  mode = 0,\n  max_length = 0,\n  filetype_names = {\n    TelescopePrompt = 'Telescope',\n    dashboard = 'Dashboard',\n    packer = 'Packer',\n    fzf = 'FZF',\n    alpha = 'Alpha',\n  },\n  use_mode_colors = false,\n  buffers_color = {\n    active = nil,\n    inactive = nil,\n  },\n  symbols = {\n    modified = ' ●',\n    alternate_file = '#',\n    directory = '',\n  },\n}\n\n-- This function is duplicated in tabs\n---returns the proper hl for buffer in section. Used for setting default highlights\n---@param section string name of section buffers component is in\n---@param is_active boolean\n---@return string hl name\nlocal function get_hl(section, is_active)\n  local suffix = is_active and highlight.get_mode_suffix() or '_inactive'\n  local section_redirects = {\n    lualine_x = 'lualine_c',\n    lualine_y = 'lualine_b',\n    lualine_z = 'lualine_a',\n  }\n  if section_redirects[section] then\n    section = highlight.highlight_exists(section .. suffix) and section or section_redirects[section]\n  end\n  return section .. suffix\nend\n\nfunction M:init(options)\n  M.super.init(self, options)\n  -- if use_mode_colors is set, use a function so that the colors update\n  local default_active = options.use_mode_colors\n      and function()\n        return get_hl('lualine_' .. options.self.section, true)\n      end\n    or get_hl('lualine_' .. options.self.section, true)\n  default_options.buffers_color = {\n    active = default_active,\n    inactive = get_hl('lualine_' .. options.self.section, false),\n  }\n  self.options = vim.tbl_deep_extend('keep', self.options or {}, default_options)\n  if self.options.component_name == 'buffers' then\n    self.highlights = {\n      active = self:create_hl(self.options.buffers_color.active, 'active'),\n      inactive = self:create_hl(self.options.buffers_color.inactive, 'inactive'),\n    }\n  end\nend\n\nfunction M:new_buffer(bufnr, buf_index)\n  bufnr = bufnr or vim.api.nvim_get_current_buf()\n  buf_index = buf_index or ''\n  return Buffer:new {\n    bufnr = bufnr,\n    buf_index = buf_index,\n    options = self.options,\n    highlights = self.highlights,\n  }\nend\n\nfunction M:buffers()\n  local buffers = {}\n  M.bufpos2nr = {}\n  for b = 1, vim.fn.bufnr('$') do\n    if vim.fn.buflisted(b) ~= 0 and vim.api.nvim_buf_get_option(b, 'buftype') ~= 'quickfix' then\n      buffers[#buffers + 1] = self:new_buffer(b, #buffers + 1)\n      M.bufpos2nr[#buffers] = b\n    end\n  end\n\n  return buffers\nend\n\nfunction M:update_status()\n  local data = {}\n  local buffers = self:buffers()\n  local current = -2\n  -- mark the first, last, current, before current, after current buffers\n  -- for rendering\n  if buffers[1] then\n    buffers[1].first = true\n  end\n  if buffers[#buffers] then\n    buffers[#buffers].last = true\n  end\n  for i, buffer in ipairs(buffers) do\n    if buffer:is_current() then\n      buffer.current = true\n      current = i\n    end\n  end\n  if buffers[current - 1] then\n    buffers[current - 1].beforecurrent = true\n  end\n  if buffers[current + 1] then\n    buffers[current + 1].aftercurrent = true\n  end\n\n  local max_length = self.options.max_length\n  if type(max_length) == 'function' then\n    max_length = max_length(self)\n  end\n\n  if max_length == 0 then\n    max_length = math.floor(2 * vim.o.columns / 3)\n  end\n  local total_length\n  for i, buffer in pairs(buffers) do\n    if buffer.current then\n      current = i\n    end\n  end\n  -- start drawing from current buffer and draw left and right of it until\n  -- all buffers are drawn or max_length has been reached.\n  if current == -2 then\n    local b = self:new_buffer()\n    b.current = true\n    if self.options.self.section < 'x' then\n      b.last = true\n      if #buffers > 0 then\n        buffers[#buffers].last = nil\n      end\n      buffers[#buffers + 1] = b\n      current = #buffers\n    else\n      b.first = true\n      if #buffers > 0 then\n        buffers[1].first = nil\n      end\n      table.insert(buffers, 1, b)\n      current = 1\n    end\n  end\n  local current_buffer = buffers[current]\n  data[#data + 1] = current_buffer:render()\n  total_length = current_buffer.len\n  local i = 0\n  local before, after\n  while true do\n    i = i + 1\n    before = buffers[current - i]\n    after = buffers[current + i]\n    local rendered_before, rendered_after\n    if before == nil and after == nil then\n      break\n    end\n    -- draw left most undrawn buffer if fits in max_length\n    if before then\n      rendered_before = before:render()\n      total_length = total_length + before.len\n      if total_length > max_length then\n        break\n      end\n      table.insert(data, 1, rendered_before)\n    end\n    -- draw right most undrawn buffer if fits in max_length\n    if after then\n      rendered_after = after:render()\n      total_length = total_length + after.len\n      if total_length > max_length then\n        break\n      end\n      data[#data + 1] = rendered_after\n    end\n  end\n  -- draw ellipsis (...) on relevant sides if all buffers don't fit in max_length\n  if total_length > max_length then\n    if before ~= nil then\n      before.ellipse = true\n      before.first = true\n      table.insert(data, 1, before:render())\n    end\n    if after ~= nil then\n      after.ellipse = true\n      after.last = true\n      data[#data + 1] = after:render()\n    end\n  end\n\n  return table.concat(data)\nend\n\nfunction M:draw()\n  self.status = ''\n  self.applied_separator = ''\n\n  if self.options.cond ~= nil and self.options.cond() ~= true then\n    return self.status\n  end\n  local status = self:update_status()\n  if type(status) == 'string' and #status > 0 then\n    self.status = status\n    self:apply_section_separators()\n    self:apply_separator()\n  end\n  return self.status\nend\n\nfunction M.buffer_jump(buf_pos, bang)\n  if buf_pos == '$' then\n    buf_pos = #M.bufpos2nr\n  else\n    buf_pos = tonumber(buf_pos)\n  end\n  if buf_pos < 1 or buf_pos > #M.bufpos2nr then\n    if bang ~= '!' then\n      error('Error: Unable to jump buffer position out of range')\n    else\n      return\n    end\n  end\n  vim.api.nvim_set_current_buf(M.bufpos2nr[buf_pos])\nend\n\nvim.cmd([[\n  function! LualineSwitchBuffer(bufnr, mouseclicks, mousebutton, modifiers)\n    execute \":buffer \" . a:bufnr\n  endfunction\n\n  command! -nargs=1 -bang LualineBuffersJump call v:lua.require'lualine.components.buffers'.buffer_jump(<f-args>, \"<bang>\")\n]])\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/components/datetime.lua",
    "content": "-- Copyright (c) 2023 Willothy\n-- MIT license, see LICENSE for more details.\nlocal lualine_require = require('lualine_require')\nlocal M = lualine_require.require('lualine.component'):extend()\n\nlocal default_options = {\n  -- default, us, uk, iso, or format (ex. \"%d/%m/%Y ...\")\n  style = 'default',\n}\n\nfunction M:init(options)\n  M.super.init(self, options)\n  self.options = vim.tbl_deep_extend('keep', self.options or {}, default_options)\nend\n\nfunction M:update_status()\n  local fmt = self.options.style\n  if self.options.style == 'default' then\n    fmt = '%A, %B %d | %H:%M'\n  elseif self.options.style == 'us' then\n    fmt = '%m/%d/%Y'\n  elseif self.options.style == 'uk' then\n    fmt = '%d/%m/%Y'\n  elseif self.options.style == 'iso' then\n    fmt = '%Y-%m-%d'\n  end\n\n  return os.date(fmt)\nend\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/components/diagnostics/config.lua",
    "content": "local require = require('lualine_require').require\nlocal utils = require('lualine.utils.utils')\nlocal M = {}\n\n-- default symbols for diagnostics component\nM.symbols = {\n  icons = {\n    error = '󰅚 ', -- x000f015a\n    warn = '󰀪 ', -- x000f002a\n    info = '󰋽 ', -- x000f02fd\n    hint = '󰌶 ', -- x000f0336\n  },\n  no_icons = { error = 'E:', warn = 'W:', info = 'I:', hint = 'H:' },\n}\n\n-- default options for diagnostics component\nM.options = {\n  colored = true,\n  update_in_insert = false,\n  always_visible = false,\n  sources = { 'nvim_diagnostic', 'coc' },\n  sections = { 'error', 'warn', 'info', 'hint' },\n}\n\nfunction M.apply_default_colors(opts)\n  local default_diagnostics_color = {\n    error = {\n      fg = utils.extract_color_from_hllist(\n        { 'fg', 'sp' },\n        { 'DiagnosticError', 'LspDiagnosticsDefaultError', 'DiffDelete' },\n        '#e32636'\n      ),\n    },\n    warn = {\n      fg = utils.extract_color_from_hllist(\n        { 'fg', 'sp' },\n        { 'DiagnosticWarn', 'LspDiagnosticsDefaultWarning', 'DiffText' },\n        '#ffa500'\n      ),\n    },\n    info = {\n      fg = utils.extract_color_from_hllist(\n        { 'fg', 'sp' },\n        { 'DiagnosticInfo', 'LspDiagnosticsDefaultInformation', 'Normal' },\n        '#ffffff'\n      ),\n    },\n    hint = {\n      fg = utils.extract_color_from_hllist(\n        { 'fg', 'sp' },\n        { 'DiagnosticHint', 'LspDiagnosticsDefaultHint', 'DiffChange' },\n        '#273faf'\n      ),\n    },\n  }\n  opts.diagnostics_color = vim.tbl_deep_extend('keep', opts.diagnostics_color or {}, default_diagnostics_color)\nend\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/components/diagnostics/init.lua",
    "content": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal lualine_require = require('lualine_require')\nlocal modules = lualine_require.lazy_require {\n  default_config = 'lualine.components.diagnostics.config',\n  sources = 'lualine.components.diagnostics.sources',\n  highlight = 'lualine.highlight',\n  utils = 'lualine.utils.utils',\n  utils_notices = 'lualine.utils.notices',\n}\n\nlocal M = lualine_require.require('lualine.component'):extend()\n\nM.diagnostics_sources = modules.sources.sources\nM.get_diagnostics = modules.sources.get_diagnostics\n\n-- Initializer\nfunction M:init(options)\n  -- Run super()\n  M.super.init(self, options)\n  -- Apply default options\n  modules.default_config.apply_default_colors(self.options)\n  self.options = vim.tbl_deep_extend('keep', self.options or {}, modules.default_config.options)\n  -- Apply default symbols\n  self.symbols = vim.tbl_extend(\n    'keep',\n    self.options.symbols or {},\n    self.options.icons_enabled ~= false and modules.default_config.symbols.icons\n      or modules.default_config.symbols.no_icons\n  )\n  -- Initialize highlight groups\n  if self.options.colored then\n    self.highlight_groups = {\n      error = self:create_hl(self.options.diagnostics_color.error, 'error'),\n      warn = self:create_hl(self.options.diagnostics_color.warn, 'warn'),\n      info = self:create_hl(self.options.diagnostics_color.info, 'info'),\n      hint = self:create_hl(self.options.diagnostics_color.hint, 'hint'),\n    }\n  end\n\n  -- Initialize variable to store last update so we can use it in insert\n  -- mode for no update_in_insert\n  self.last_diagnostics_count = {}\n\n  -- Error out no source\n  if #self.options.sources < 1 then\n    modules.utils_notices.add_notice(\n      '### diagnostics.sources\\n\\nno sources for diagnostics configured.\\nPlease specify which diagnostics source you want lualine to use with `sources` option.\\n'\n    )\n  end\nend\n\nfunction M:update_status()\n  local bufnr = vim.api.nvim_get_current_buf()\n  local diagnostics_count\n  local result = {}\n  if self.options.update_in_insert or vim.api.nvim_get_mode().mode:sub(1, 1) ~= 'i' then\n    local error_count, warning_count, info_count, hint_count = 0, 0, 0, 0\n    local diagnostic_data = modules.sources.get_diagnostics(self.options.sources)\n    -- sum all the counts\n    for _, data in pairs(diagnostic_data) do\n      error_count = error_count + data.error\n      warning_count = warning_count + data.warn\n      info_count = info_count + data.info\n      hint_count = hint_count + data.hint\n    end\n    diagnostics_count = {\n      error = error_count,\n      warn = warning_count,\n      info = info_count,\n      hint = hint_count,\n    }\n    -- Save count for insert mode\n    self.last_diagnostics_count[bufnr] = diagnostics_count\n  else -- Use cached count in insert mode with update_in_insert disabled\n    diagnostics_count = self.last_diagnostics_count[bufnr] or { error = 0, warn = 0, info = 0, hint = 0 }\n  end\n\n  local always_visible = false\n  if type(self.options.always_visible) == 'boolean' then\n    always_visible = self.options.always_visible\n  elseif type(self.options.always_visible) == 'function' then\n    always_visible = self.options.always_visible()\n  end\n\n  -- format the counts with symbols and highlights\n  if self.options.colored then\n    local colors, bgs = {}, {}\n    for name, hl in pairs(self.highlight_groups) do\n      colors[name] = self:format_hl(hl)\n      bgs[name] = modules.utils.extract_highlight_colors(colors[name]:match('%%#(.-)#'), 'bg')\n    end\n    local previous_section, padding\n    for _, section in ipairs(self.options.sections) do\n      if diagnostics_count[section] ~= nil and (always_visible or diagnostics_count[section] > 0) then\n        padding = previous_section and (bgs[previous_section] ~= bgs[section]) and ' ' or ''\n        previous_section = section\n        table.insert(result, colors[section] .. padding .. self.symbols[section] .. diagnostics_count[section])\n      end\n    end\n  else\n    for _, section in ipairs(self.options.sections) do\n      if diagnostics_count[section] ~= nil and (always_visible or diagnostics_count[section] > 0) then\n        table.insert(result, self.symbols[section] .. diagnostics_count[section])\n      end\n    end\n  end\n  return table.concat(result, ' ')\nend\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/components/diagnostics/sources.lua",
    "content": "local M = {}\n\n---functions that how how to retrieve diagnostics from specific source.\n---returns error_count:number, warning_count:number,\n---        info_count:number, hint_count:number\nM.sources = {\n  nvim_lsp = function()\n    local error_count, warning_count, info_count, hint_count\n    local diagnostics = vim.diagnostic.get(0)\n    local count = { 0, 0, 0, 0 }\n    for _, diagnostic in ipairs(diagnostics) do\n      if vim.startswith(vim.diagnostic.get_namespace(diagnostic.namespace).name, 'vim.lsp') then\n        count[diagnostic.severity] = count[diagnostic.severity] + 1\n      end\n    end\n    error_count = count[vim.diagnostic.severity.ERROR]\n    warning_count = count[vim.diagnostic.severity.WARN]\n    info_count = count[vim.diagnostic.severity.INFO]\n    hint_count = count[vim.diagnostic.severity.HINT]\n    return error_count, warning_count, info_count, hint_count\n  end,\n  nvim_workspace_diagnostic = function()\n    local diag_severity = vim.diagnostic.severity\n\n    local function workspace_diag(severity)\n      local count = vim.diagnostic.get(nil, { severity = severity })\n      return vim.tbl_count(count)\n    end\n\n    return workspace_diag(diag_severity.ERROR),\n      workspace_diag(diag_severity.WARN),\n      workspace_diag(diag_severity.INFO),\n      workspace_diag(diag_severity.HINT)\n  end,\n  nvim_diagnostic = function()\n    local count\n\n    if vim.diagnostic.count ~= nil then -- neovim >= 0.10.0\n      count = vim.diagnostic.count(0)\n      return count[vim.diagnostic.severity.ERROR] or 0,\n        count[vim.diagnostic.severity.WARN] or 0,\n        count[vim.diagnostic.severity.INFO] or 0,\n        count[vim.diagnostic.severity.HINT] or 0\n    end\n\n    -- fallback\n    local diagnostics = vim.diagnostic.get(0)\n    count = { 0, 0, 0, 0 }\n    for _, diagnostic in ipairs(diagnostics) do\n      count[diagnostic.severity] = count[diagnostic.severity] + 1\n    end\n    return count[vim.diagnostic.severity.ERROR],\n      count[vim.diagnostic.severity.WARN],\n      count[vim.diagnostic.severity.INFO],\n      count[vim.diagnostic.severity.HINT]\n  end,\n  coc = function()\n    local data = vim.b.coc_diagnostic_info\n    if data then\n      return data.error, data.warning, data.information, data.hint\n    else\n      return 0, 0, 0, 0\n    end\n  end,\n  ale = function()\n    local ok, data = pcall(vim.fn['ale#statusline#Count'], vim.api.nvim_get_current_buf())\n    if ok then\n      return data.error + data.style_error, data.warning + data.style_warning, data.info, 0\n    else\n      return 0, 0, 0, 0\n    end\n  end,\n  vim_lsp = function()\n    local ok, data = pcall(vim.fn['lsp#get_buffer_diagnostics_counts'])\n    if ok then\n      return data.error, data.warning, data.information, data.hint\n    else\n      return 0, 0, 0, 0\n    end\n  end,\n}\n\n---returns list of diagnostics count from all sources\n---@param sources table list of sources\n---@return table {{error_count, warning_count, info_count, hint_count}}\nM.get_diagnostics = function(sources)\n  local result = {}\n  for index, source in ipairs(sources) do\n    if type(source) == 'string' then\n      local error_count, warning_count, info_count, hint_count = M.sources[source]()\n      result[index] = {\n        error = error_count,\n        warn = warning_count,\n        info = info_count,\n        hint = hint_count,\n      }\n    elseif type(source) == 'function' then\n      local source_result = source()\n      source_result = type(source_result) == 'table' and source_result or {}\n      result[index] = {\n        error = source_result.error or 0,\n        warn = source_result.warn or 0,\n        info = source_result.info or 0,\n        hint = source_result.hint or 0,\n      }\n    end\n  end\n  return result\nend\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/components/diff/git_diff.lua",
    "content": "local lualine_require = require('lualine_require')\nlocal modules = lualine_require.lazy_require {\n  utils = 'lualine.utils.utils',\n  Job = 'lualine.utils.job',\n}\n\nlocal M = {}\n\n-- Vars\n-- variable to store git diff stats\nlocal git_diff = nil\n-- accumulates output from diff process\nlocal diff_output_cache = {}\n-- variable to store git_diff job\nlocal diff_job = nil\n\nlocal active_bufnr = '0'\nlocal diff_cache = {} -- Stores last known value of diff of a buffer\n\n---initialize the module\n---param opts table\nfunction M.init(opts)\n  if type(opts.source) == 'function' then\n    M.src = opts.source\n  else\n    modules.utils.define_autocmd('BufEnter', \"lua require'lualine.components.diff.git_diff'.update_diff_args()\")\n    modules.utils.define_autocmd('BufWritePost', \"lua require'lualine.components.diff.git_diff'.update_git_diff()\")\n    M.update_diff_args()\n  end\nend\n\n---Api to get git sign count\n---scheme :\n---{\n---   added = added_count,\n---   modified = modified_count,\n---   removed = removed_count,\n---}\n---error_code = { added = -1, modified = -1, removed = -1 }\n---@param bufnr number|nil\nfunction M.get_sign_count(bufnr)\n  if bufnr then\n    return diff_cache[bufnr]\n  end\n  if M.src then\n    git_diff = M.src()\n    diff_cache[vim.api.nvim_get_current_buf()] = git_diff\n  elseif vim.g.actual_curbuf ~= nil and active_bufnr ~= vim.g.actual_curbuf then\n    -- Workaround for https://github.com/nvim-lualine/lualine.nvim/issues/286\n    -- See upstream issue https://github.com/neovim/neovim/issues/15300\n    -- Diff is out of sync re sync it.\n    M.update_diff_args()\n  end\n  return git_diff\nend\n\n---process diff data and update git_diff{ added, removed, modified }\n---@param data string output on stdout od git diff job\nlocal function process_diff(data)\n  -- Adapted from https://github.com/wbthomason/nvim-vcs.lua\n  local added, removed, modified = 0, 0, 0\n  for _, line in ipairs(data) do\n    if string.find(line, [[^@@ ]]) then\n      local tokens = vim.fn.matchlist(line, [[^@@ -\\v(\\d+),?(\\d*) \\+(\\d+),?(\\d*)]])\n      local line_stats = {\n        mod_count = tokens[3] == nil and 0 or tokens[3] == '' and 1 or tonumber(tokens[3]),\n        new_count = tokens[5] == nil and 0 or tokens[5] == '' and 1 or tonumber(tokens[5]),\n      }\n\n      if line_stats.mod_count == 0 and line_stats.new_count > 0 then\n        added = added + line_stats.new_count\n      elseif line_stats.mod_count > 0 and line_stats.new_count == 0 then\n        removed = removed + line_stats.mod_count\n      else\n        local min = math.min(line_stats.mod_count, line_stats.new_count)\n        modified = modified + min\n        added = added + line_stats.new_count - min\n        removed = removed + line_stats.mod_count - min\n      end\n    end\n  end\n  git_diff = { added = added, modified = modified, removed = removed }\nend\n\n---updates the job args\nfunction M.update_diff_args()\n  -- Don't show git diff when current buffer doesn't have a filename\n  active_bufnr = tostring(vim.api.nvim_get_current_buf())\n  if #vim.fn.expand('%') == 0 then\n    M.diff_args = nil\n    git_diff = nil\n    return\n  end\n  M.diff_args = {\n    cmd = {\n      'git',\n      '-C',\n      vim.fn.expand('%:h'),\n      '--no-pager',\n      'diff',\n      '--no-color',\n      '--no-ext-diff',\n      '-U0',\n      '--',\n      vim.fn.expand('%:t'),\n    },\n    on_stdout = function(_, data)\n      if next(data) then\n        diff_output_cache = vim.list_extend(diff_output_cache, data)\n      end\n    end,\n    on_stderr = function(_, data)\n      data = table.concat(data, '\\n')\n      if #data > 0 then\n        git_diff = nil\n        diff_output_cache = {}\n      end\n    end,\n    on_exit = function()\n      if #diff_output_cache > 0 then\n        process_diff(diff_output_cache)\n      else\n        git_diff = { added = 0, modified = 0, removed = 0 }\n      end\n      diff_cache[vim.api.nvim_get_current_buf()] = git_diff\n    end,\n  }\n  M.update_git_diff()\nend\n\n---update git_diff variable\nfunction M.update_git_diff()\n  if M.diff_args then\n    diff_output_cache = {}\n    if diff_job then\n      diff_job:stop()\n    end\n    diff_job = modules.Job(M.diff_args)\n    if diff_job then\n      diff_job:start()\n    end\n  end\nend\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/components/diff/init.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\nlocal lualine_require = require('lualine_require')\nlocal modules = lualine_require.lazy_require {\n  git_diff = 'lualine.components.diff.git_diff',\n  utils = 'lualine.utils.utils',\n  utils_notices = 'lualine.utils.notices',\n  highlight = 'lualine.highlight',\n}\nlocal M = lualine_require.require('lualine.component'):extend()\n\nlocal default_options = {\n  colored = true,\n  symbols = { added = '+', modified = '~', removed = '-' },\n}\n\nlocal function apply_default_colors(opts)\n  local default_diff_color = {\n    added = {\n      fg = modules.utils.extract_color_from_hllist(\n        'fg',\n        { 'LuaLineDiffAdd', 'GitSignsAdd', 'GitGutterAdd', 'DiffAdded', 'DiffAdd' },\n        '#90ee90'\n      ),\n    },\n    modified = {\n      fg = modules.utils.extract_color_from_hllist(\n        'fg',\n        { 'LuaLineDiffChange', 'GitSignsChange', 'GitGutterChange', 'DiffChanged', 'DiffChange' },\n        '#f0e130'\n      ),\n    },\n    removed = {\n      fg = modules.utils.extract_color_from_hllist(\n        'fg',\n        { 'LuaLineDiffDelete', 'GitSignsDelete', 'GitGutterDelete', 'DiffRemoved', 'DiffDelete' },\n        '#ff0038'\n      ),\n    },\n  }\n  opts.diff_color = vim.tbl_deep_extend('keep', opts.diff_color or {}, default_diff_color)\nend\n\n-- Initializer\nfunction M:init(options)\n  M.super.init(self, options)\n  apply_default_colors(self.options)\n  self.options = vim.tbl_deep_extend('keep', self.options or {}, default_options)\n  -- create highlights and save highlight_name in highlights table\n  if self.options.colored then\n    self.highlights = {\n      added = self:create_hl(self.options.diff_color.added, 'added'),\n      modified = self:create_hl(self.options.diff_color.modified, 'modified'),\n      removed = self:create_hl(self.options.diff_color.removed, 'removed'),\n    }\n  end\n  modules.git_diff.init(self.options)\nend\n\n-- Function that runs every time statusline is updated\nfunction M:update_status(is_focused)\n  local git_diff = modules.git_diff.get_sign_count((not is_focused and vim.api.nvim_get_current_buf()))\n  if git_diff == nil then\n    return ''\n  end\n\n  local colors = {}\n  if self.options.colored then\n    -- load the highlights and store them in colors table\n    for name, highlight_name in pairs(self.highlights) do\n      colors[name] = self:format_hl(highlight_name)\n    end\n  end\n\n  local result = {}\n  -- loop though data and load available sections in result table\n  for _, name in ipairs { 'added', 'modified', 'removed' } do\n    if git_diff[name] and git_diff[name] > 0 then\n      if self.options.colored then\n        table.insert(result, colors[name] .. self.options.symbols[name] .. git_diff[name])\n      else\n        table.insert(result, self.options.symbols[name] .. git_diff[name])\n      end\n    end\n  end\n  if #result > 0 then\n    return table.concat(result, ' ')\n  else\n    return ''\n  end\nend\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/components/encoding.lua",
    "content": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal lualine_require = require('lualine_require')\nlocal M = lualine_require.require('lualine.component'):extend()\n\nlocal default_options = {\n  -- Show '[BOM]' when the file has a byte-order mark\n  show_bomb = false,\n}\n\nfunction M:init(options)\n  M.super.init(self, options)\n  self.options = vim.tbl_deep_extend('keep', self.options or {}, default_options)\nend\n\nfunction M:update_status()\n  local show_bomb = self.options.show_bomb\n\n  local result = vim.opt.fileencoding:get()\n\n  if not show_bomb then\n    return result\n  end\n\n  if vim.opt.bomb:get() then\n    result = result .. ' [BOM]'\n  end\n\n  return result\nend\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/components/fileformat.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\nlocal M = require('lualine.component'):extend()\n\n-- stylua: ignore\nlocal symbols = {\n  unix = '', -- e712\n  dos = '', -- e70f\n  mac = '', -- e711\n}\n\n-- Initializer\nfunction M:init(options)\n  -- Run super()\n  M.super.init(self, options)\n  -- Apply default symbols\n  self.symbols = vim.tbl_extend('keep', self.options.symbols or {}, symbols)\nend\n\n-- Function that runs every time statusline is updated\nfunction M:update_status()\n  local format = vim.bo.fileformat\n  if self.options.icons_enabled then\n    return self.symbols[format] or format\n  else\n    return format\n  end\nend\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/components/filename.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\nlocal M = require('lualine.component'):extend()\n\nlocal modules = require('lualine_require').lazy_require {\n  utils = 'lualine.utils.utils',\n}\n\nlocal default_options = {\n  symbols = {\n    modified = '[+]',\n    readonly = '[-]',\n    unnamed = '[No Name]',\n    newfile = '[New]',\n  },\n  file_status = true,\n  newfile_status = false,\n  path = 0,\n  shorting_target = 40,\n}\n\nlocal function is_new_file()\n  local filename = vim.fn.expand('%')\n  return filename ~= ''\n    and filename:match('^%a+://') == nil\n    and vim.bo.buftype == ''\n    and vim.fn.filereadable(filename) == 0\nend\n\n---shortens path by turning apple/orange -> a/orange\n---@param path string\n---@param sep string path separator\n---@param max_len integer maximum length of the full filename string\n---@return string\nlocal function shorten_path(path, sep, max_len)\n  local len = #path\n  if len <= max_len then\n    return path\n  end\n\n  local segments = vim.split(path, sep)\n  for idx = 1, #segments - 1 do\n    if len <= max_len then\n      break\n    end\n\n    local segment = segments[idx]\n    local shortened = segment:sub(1, vim.startswith(segment, '.') and 2 or 1)\n    segments[idx] = shortened\n    len = len - (#segment - #shortened)\n  end\n\n  return table.concat(segments, sep)\nend\n\nlocal function filename_and_parent(path, sep)\n  local segments = vim.split(path, sep)\n  if #segments == 0 then\n    return path\n  elseif #segments == 1 then\n    return segments[#segments]\n  else\n    return table.concat({ segments[#segments - 1], segments[#segments] }, sep)\n  end\nend\n\nM.init = function(self, options)\n  M.super.init(self, options)\n  self.options = vim.tbl_deep_extend('keep', self.options or {}, default_options)\nend\n\nM.update_status = function(self)\n  local path_separator = package.config:sub(1, 1)\n  local data\n  if self.options.path == 1 then\n    -- relative path\n    data = vim.fn.expand('%:~:.')\n  elseif self.options.path == 2 then\n    -- absolute path\n    data = vim.fn.expand('%:p')\n  elseif self.options.path == 3 then\n    -- absolute path, with tilde\n    data = vim.fn.expand('%:p:~')\n  elseif self.options.path == 4 then\n    -- filename and immediate parent\n    data = filename_and_parent(vim.fn.expand('%:p:~'), path_separator)\n  else\n    -- just filename\n    data = vim.fn.expand('%:t')\n  end\n\n  if data == '' then\n    data = self.options.symbols.unnamed\n  end\n\n  local shorting_target = self.options.shorting_target\n  if type(shorting_target) == 'function' then\n    shorting_target = shorting_target()\n  end\n\n  if shorting_target ~= 0 then\n    local windwidth = self.options.globalstatus and vim.go.columns or vim.fn.winwidth(0)\n    local estimated_space_available = windwidth - shorting_target\n\n    data = shorten_path(data, path_separator, estimated_space_available)\n  end\n\n  data = modules.utils.stl_escape(data)\n\n  local symbols = {}\n  if self.options.file_status then\n    if vim.bo.modified then\n      table.insert(symbols, self.options.symbols.modified)\n    end\n    if vim.bo.modifiable == false or vim.bo.readonly == true then\n      table.insert(symbols, self.options.symbols.readonly)\n    end\n  end\n\n  if self.options.newfile_status and is_new_file() then\n    table.insert(symbols, self.options.symbols.newfile)\n  end\n\n  return data .. (#symbols > 0 and ' ' .. table.concat(symbols, '') or '')\nend\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/components/filesize.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\nlocal function filesize()\n  local file = vim.fn.expand('%:p')\n  if file == nil or #file == 0 then\n    return ''\n  end\n  local size = vim.fn.getfsize(file)\n  if size <= 0 then\n    return ''\n  end\n\n  local suffixes = { 'b', 'k', 'm', 'g' }\n\n  local i = 1\n  while size > 1024 and i < #suffixes do\n    size = size / 1024\n    i = i + 1\n  end\n\n  local format = i == 1 and '%d%s' or '%.1f%s'\n  return string.format(format, size, suffixes[i])\nend\n\nreturn filesize\n"
  },
  {
    "path": "lua/lualine/components/filetype.lua",
    "content": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal lualine_require = require('lualine_require')\nlocal modules = lualine_require.lazy_require {\n  highlight = 'lualine.highlight',\n  utils = 'lualine.utils.utils',\n}\nlocal M = lualine_require.require('lualine.component'):extend()\n\nlocal default_options = {\n  colored = true,\n  icon_only = false,\n}\n\nfunction M:init(options)\n  M.super.init(self, options)\n  self.options = vim.tbl_deep_extend('keep', self.options or {}, default_options)\n  self.icon_hl_cache = {}\nend\n\nfunction M.update_status()\n  local ft = vim.bo.filetype or ''\n  return modules.utils.stl_escape(ft)\nend\n\nfunction M:apply_icon()\n  if not self.options.icons_enabled then\n    return\n  end\n\n  local icon, icon_highlight_group\n  local ok, devicons = pcall(require, 'nvim-web-devicons')\n  if ok then\n    icon, icon_highlight_group = devicons.get_icon(vim.fn.expand('%:t'))\n    if icon == nil then\n      icon, icon_highlight_group = devicons.get_icon_by_filetype(vim.bo.filetype)\n    end\n\n    if icon == nil and icon_highlight_group == nil then\n      icon = ''\n      icon_highlight_group = 'DevIconDefault'\n    end\n    if icon then\n      icon = icon .. ' '\n    end\n    if self.options.colored then\n      local highlight_color = modules.utils.extract_highlight_colors(icon_highlight_group, 'fg')\n      if highlight_color then\n        local default_highlight = self:get_default_hl()\n        local icon_highlight = self.icon_hl_cache[highlight_color]\n        if not icon_highlight or not modules.highlight.highlight_exists(icon_highlight.name .. '_normal') then\n          icon_highlight = self:create_hl({ fg = highlight_color }, icon_highlight_group)\n          self.icon_hl_cache[highlight_color] = icon_highlight\n        end\n\n        icon = self:format_hl(icon_highlight) .. icon .. default_highlight\n      end\n    end\n  else\n    ok = vim.fn.exists('*WebDevIconsGetFileTypeSymbol')\n    if ok ~= 0 then\n      icon = vim.fn.WebDevIconsGetFileTypeSymbol()\n      if icon then\n        icon = icon .. ' '\n      end\n    end\n  end\n\n  if not icon then\n    return\n  end\n\n  if self.options.icon_only then\n    self.status = icon\n  elseif type(self.options.icon) == 'table' and self.options.icon.align == 'right' then\n    self.status = self.status .. ' ' .. icon\n  else\n    self.status = icon .. self.status\n  end\nend\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/components/hostname.lua",
    "content": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal modules = require('lualine_require').lazy_require {\n  utils = 'lualine.utils.utils',\n}\n\nlocal function hostname()\n  return modules.utils.stl_escape(vim.loop.os_gethostname())\nend\n\nreturn hostname\n"
  },
  {
    "path": "lua/lualine/components/location.lua",
    "content": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal function location()\n  local line = vim.fn.line('.')\n  local col = vim.fn.charcol('.')\n  return string.format('%3d:%-2d', line, col)\nend\n\nreturn location\n"
  },
  {
    "path": "lua/lualine/components/lsp_status.lua",
    "content": "local lualine_require = require('lualine_require')\n\nlocal M = lualine_require.require('lualine.component'):extend()\n\nlocal default_options = {\n  icon = '', -- f013\n  symbols = {\n    -- Use standard unicode characters for the spinner and done symbols:\n    spinner = { '⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏' },\n    done = '✓',\n    separator = ' ',\n  },\n  -- List of LSP names to ignore (e.g., `null-ls`):\n  ignore_lsp = {},\n  show_name = true,\n}\n\nfunction M:init(options)\n  -- Run `super()`.\n  M.super.init(self, options)\n\n  -- Apply default options.\n  self.options = vim.tbl_deep_extend('keep', self.options or {}, default_options)\n\n  -- Apply symbols.\n  self.symbols = self.options.symbols or {}\n\n  ---The difference between the `begin` and `end` progress events for each LSP.\n  ---\n  ---@type table<integer, integer>\n  self.lsp_work_by_client_id = {}\n\n  -- Listen to progress updates only if `nvim` supports the `LspProgress` event.\n  pcall(vim.api.nvim_create_autocmd, 'LspProgress', {\n    desc = 'Update the Lualine LSP status component with progress',\n    group = vim.api.nvim_create_augroup('lualine_lsp_progress', {}),\n    ---@param event {data: {client_id: integer, params: lsp.ProgressParams}}\n    callback = function(event)\n      local kind = event.data.params.value.kind\n      local client_id = event.data.client_id\n\n      local work = self.lsp_work_by_client_id[client_id] or 0\n      local work_change = kind == 'begin' and 1 or (kind == 'end' and -1 or 0)\n\n      self.lsp_work_by_client_id[client_id] = math.max(work + work_change, 0)\n\n      -- Refresh Lualine to update the LSP status symbol if it changed.\n      if (work == 0 and work_change > 0) or (work == 1 and work_change < 0) then\n        require('lualine').refresh()\n      end\n    end,\n  })\nend\n\nfunction M:update_status()\n  local result = {}\n  local processed = {}\n\n  -- Backwards-compatible function to get the active LSP clients.\n  ---@diagnostic disable-next-line: deprecated\n  local get_lsp_clients = vim.lsp.get_clients or vim.lsp.get_active_clients\n  local clients = get_lsp_clients { bufnr = vim.api.nvim_get_current_buf() }\n\n  -- Backwards-compatible function to get the current time in nanoseconds.\n  local hrtime = (vim.uv or vim.loop).hrtime\n  -- Advance the spinner every 80ms only once, not for each client (otherwise the spinners will skip steps).\n  -- NOTE: the spinner symbols table is 1-indexed.\n  local spinner_symbol = self.symbols.spinner[math.floor(hrtime() / (1e6 * 80)) % #self.symbols.spinner + 1]\n\n  for _, client in ipairs(clients) do\n    local status\n    local work = self.lsp_work_by_client_id[client.id]\n    if work ~= nil and work > 0 then\n      status = spinner_symbol\n    elseif work ~= nil and work == 0 then\n      status = self.symbols.done\n    end\n\n    -- Backwards-compatible function to check if a list contains a value.\n    local list_contains = vim.list_contains or vim.tbl_contains\n    -- Append the status to the LSP only if it supports progress reporting and is not ignored.\n    if not processed[client.name] and not list_contains(self.options.ignore_lsp, client.name) then\n      local status_display = ((status and status ~= '') and (' ' .. status) or '')\n      if self.options.show_name then\n        table.insert(result, client.name .. status_display)\n      else\n        table.insert(result, status_display)\n      end\n      processed[client.name] = true\n    end\n  end\n\n  return table.concat(result, self.symbols.separator)\nend\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/components/mode.lua",
    "content": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal get_mode = require('lualine.utils.mode').get_mode\nreturn get_mode\n"
  },
  {
    "path": "lua/lualine/components/progress.lua",
    "content": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal function progress()\n  local cur = vim.fn.line('.')\n  local total = vim.fn.line('$')\n  if cur == 1 then\n    return 'Top'\n  elseif cur == total then\n    return 'Bot'\n  else\n    return string.format('%2d%%%%', math.floor(cur / total * 100))\n  end\nend\n\nreturn progress\n"
  },
  {
    "path": "lua/lualine/components/searchcount.lua",
    "content": "local M = require('lualine.component'):extend()\n\nlocal default_options = {\n  maxcount = 999,\n  timeout = 500,\n}\n\n-- Initializer\nfunction M:init(options)\n  -- Run super()\n  M.super.init(self, options)\n  -- Apply default options\n  self.options = vim.tbl_extend('keep', self.options or {}, default_options)\nend\n\n-- Function that runs every time statusline is updated\nfunction M:update_status()\n  if vim.v.hlsearch == 0 then\n    return ''\n  end\n\n  local ok, result = pcall(vim.fn.searchcount, { maxcount = self.options.maxcount, timeout = self.options.timeout })\n  if not ok or next(result) == nil then\n    return ''\n  end\n\n  local denominator = math.min(result.total, result.maxcount)\n  return string.format('[%d/%d]', result.current, denominator)\nend\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/components/selectioncount.lua",
    "content": "local function selectioncount()\n  local mode = vim.fn.mode(true)\n  local line_start, col_start = vim.fn.line('v'), vim.fn.col('v')\n  local line_end, col_end = vim.fn.line('.'), vim.fn.col('.')\n  if mode:match('\u0016') then\n    return string.format('%dx%d', math.abs(line_start - line_end) + 1, math.abs(col_start - col_end) + 1)\n  elseif mode:match('V') or line_start ~= line_end then\n    return math.abs(line_start - line_end) + 1\n  elseif mode:match('v') then\n    return math.abs(col_start - col_end) + 1\n  else\n    return ''\n  end\nend\n\nreturn selectioncount\n"
  },
  {
    "path": "lua/lualine/components/special/eval_func_component.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\nlocal M = require('lualine.component'):extend()\n\nfunction M:update_status()\n  local component = self.options[1]\n  local ok, status\n  if self.options.type == nil then\n    ok, status = pcall(M.lua_eval, component)\n    if not ok then\n      status = M.vim_function(component)\n    end\n  else\n    if self.options.type == 'lua_expr' then\n      ok, status = pcall(M.lua_eval, component)\n      if not ok then\n        status = nil\n      end\n    elseif self.options.type == 'vim_fun' then\n      status = M.vim_function(component)\n    end\n  end\n  return status\nend\n\n---evaluate the lua code and return it's result as string\n---@param code string\n---@return string\nfunction M.lua_eval(code)\n  local result = loadstring('return ' .. code)()\n  assert(result, 'String expected got nil')\n  return tostring(result)\nend\n\n---call vim function (name) and return it's result as string\n---@param name string\n---@return string\nfunction M.vim_function(name)\n  -- vim function component\n  local ok, return_val = pcall(vim.api.nvim_call_function, name, {})\n  if not ok then\n    return ''\n  end -- function call failed\n  ok, return_val = pcall(tostring, return_val)\n  return ok and return_val or ''\nend\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/components/special/function_component.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\nlocal M = require('lualine.component'):extend()\n\nM.update_status = function(self, is_focused)\n  -- 1st element in options table is the function provided by config\n  local ok, retval\n  ok, retval = pcall(self.options[1], self, is_focused)\n  if not ok then\n    return ''\n  end\n  if type(retval) ~= 'string' then\n    ok, retval = pcall(tostring, retval)\n    if not ok then\n      return ''\n    end\n  end\n  return retval\nend\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/components/special/vim_var_component.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\nlocal require = require('lualine_require').require\nlocal M = require('lualine.component'):extend()\nlocal utils = require('lualine.utils.utils')\n\nfunction M:update_status()\n  local component = self.options[1]\n  -- vim variable component\n  -- accepts g:, v:, t:, w:, b:, o, go:, vo:, to:, wo:, bo:\n  -- filters g portion from g:var\n  local scope = component:match('[gvtwb]?o?')\n  -- filters var portion from g:var\n  local var_name = component:sub(#scope + 2, #component)\n  -- Displays nothing when variable aren't present\n  if not (scope and var_name) then\n    return ''\n  end\n  -- Support accessing keys within dictionary\n  -- https://github.com/nvim-lualine/lualine.nvim/issues/25#issuecomment-907374548\n  local name_chunks = vim.split(var_name, '%.')\n  local return_val = vim[scope][name_chunks[1]]\n  for i = 2, #name_chunks do\n    if return_val == nil then\n      break\n    end\n    return_val = return_val[name_chunks[i]]\n  end\n  if return_val == nil then\n    return ''\n  end\n  local ok\n  ok, return_val = pcall(tostring, return_val)\n  return ok and utils.stl_escape(return_val) or ''\nend\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/components/tabs/init.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\nlocal require = require('lualine_require').require\nlocal Tab = require('lualine.components.tabs.tab')\nlocal M = require('lualine.component'):extend()\nlocal highlight = require('lualine.highlight')\n\nlocal default_options = {\n  max_length = 0,\n  tab_max_length = 40,\n  mode = 0,\n  use_mode_colors = false,\n  path = 0,\n  tabs_color = {\n    active = nil,\n    inactive = nil,\n  },\n  show_modified_status = true,\n  symbols = {\n    modified = '[+]',\n  },\n}\n\n-- This function is duplicated in buffers\n---returns the proper hl for tab in section. Used for setting default highlights\n---@param section string name of section tabs component is in\n---@param is_active boolean\n---@return string hl name\nlocal function get_hl(section, is_active)\n  local suffix = is_active and highlight.get_mode_suffix() or '_inactive'\n  local section_redirects = {\n    lualine_x = 'lualine_c',\n    lualine_y = 'lualine_b',\n    lualine_z = 'lualine_a',\n  }\n  if section_redirects[section] then\n    section = highlight.highlight_exists(section .. suffix) and section or section_redirects[section]\n  end\n  return section .. suffix\nend\n\nfunction M:init(options)\n  M.super.init(self, options)\n  -- if use_mode_colors is set, use a function so that the colors update\n  local default_active = options.use_mode_colors\n      and function()\n        return get_hl('lualine_' .. options.self.section, true)\n      end\n    or get_hl('lualine_' .. options.self.section, true)\n  default_options.tabs_color = {\n    active = default_active,\n    inactive = get_hl('lualine_' .. options.self.section, false),\n  }\n  self.options = vim.tbl_deep_extend('keep', self.options or {}, default_options)\n  -- stylua: ignore\n  self.highlights = {\n    active = self:create_hl(self.options.tabs_color.active, 'active'),\n    inactive = self:create_hl(self.options.tabs_color.inactive, 'inactive'),\n  }\nend\n\nfunction M:update_status()\n  local data = {}\n  local tabs = {}\n  for nr, id in ipairs(vim.api.nvim_list_tabpages()) do\n    tabs[#tabs + 1] = Tab { tabId = id, tabnr = nr, options = self.options, highlights = self.highlights }\n  end\n  -- mark the first, last, current, before current, after current tabpages\n  -- for rendering\n  local current = vim.fn.tabpagenr()\n  tabs[1].first = true\n  tabs[#tabs].last = true\n  if tabs[current] then\n    tabs[current].current = true\n  end\n  if tabs[current - 1] then\n    tabs[current - 1].beforecurrent = true\n  end\n  if tabs[current + 1] then\n    tabs[current + 1].aftercurrent = true\n  end\n\n  local max_length = self.options.max_length\n  if type(max_length) == 'function' then\n    max_length = max_length(self)\n  end\n\n  if max_length == 0 then\n    max_length = math.floor(vim.o.columns / 3)\n  end\n  local total_length\n  for i, tab in pairs(tabs) do\n    if tab.current then\n      current = i\n    end\n  end\n  local current_tab = tabs[current]\n  -- start drawing from current tab and draw left and right of it until\n  -- all tabpages are drawn or max_length has been reached.\n  if current_tab == nil then -- maybe redundant code\n    local t = Tab {\n      tabId = vim.api.nvim_get_current_tabpage(),\n      tabnr = vim.fn.tabpagenr(),\n      options = self.options,\n      highlights = self.highlights,\n    }\n    t.current = true\n    t.last = true\n    data[#data + 1] = t:render()\n  else\n    data[#data + 1] = current_tab:render()\n    total_length = current_tab.len\n    local i = 0\n    local before, after\n    while true do\n      i = i + 1\n      before = tabs[current - i]\n      after = tabs[current + i]\n      local rendered_before, rendered_after\n      if before == nil and after == nil then\n        break\n      end\n      -- draw left most undrawn tab if fits in max_length\n      if before then\n        rendered_before = before:render()\n        total_length = total_length + before.len\n        if total_length > max_length then\n          break\n        end\n        table.insert(data, 1, rendered_before)\n      end\n      -- draw right most undrawn tab if fits in max_length\n      if after then\n        rendered_after = after:render()\n        total_length = total_length + after.len\n        if total_length > max_length then\n          break\n        end\n        data[#data + 1] = rendered_after\n      end\n    end\n    -- draw ellipsis (...) on relevant sides if all tabs don't fit in max_length\n    if total_length > max_length then\n      if before ~= nil then\n        before.ellipse = true\n        before.first = true\n        table.insert(data, 1, before:render())\n      end\n      if after ~= nil then\n        after.ellipse = true\n        after.last = true\n        data[#data + 1] = after:render()\n      end\n    end\n  end\n\n  return table.concat(data)\nend\n\nfunction M:draw()\n  self.status = ''\n  self.applied_separator = ''\n\n  if self.options.cond ~= nil and self.options.cond() ~= true then\n    return self.status\n  end\n  local status = self:update_status()\n  if type(status) == 'string' and #status > 0 then\n    self.status = status\n    self:apply_section_separators()\n    self:apply_separator()\n  end\n  return self.status\nend\n\nvim.cmd([[\n  function! LualineSwitchTab(tabnr, mouseclicks, mousebutton, modifiers)\n    execute a:tabnr . \"tabnext\"\n  endfunction\n\n  function! LualineRenameTab(...)\n    if a:0 == 1\n      let t:tabname = a:1\n    else\n      unlet t:tabname\n    end\n    redrawtabline\n  endfunction\n\n  command! -nargs=? LualineRenameTab call LualineRenameTab(\"<args>\")\n]])\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/components/tabs/tab.lua",
    "content": "local Tab = require('lualine.utils.class'):extend()\n\nlocal modules = require('lualine_require').lazy_require {\n  highlight = 'lualine.highlight',\n  utils = 'lualine.utils.utils',\n}\n\n---initialize a new tab from opts\n---@param opts table\nfunction Tab:init(opts)\n  assert(opts.tabnr, 'Cannot create Tab without tabnr')\n  self.tabnr = opts.tabnr\n  self.tabId = opts.tabId\n  self.options = opts.options\n  self.highlights = opts.highlights\n  self.modified_icon = ''\n  self:get_props()\nend\n\nfunction Tab:get_props()\n  local buflist = vim.fn.tabpagebuflist(self.tabnr)\n  local winnr = vim.fn.tabpagewinnr(self.tabnr)\n  local bufnr = buflist[winnr]\n  self.file = modules.utils.stl_escape(vim.api.nvim_buf_get_name(bufnr))\n  self.filetype = vim.api.nvim_buf_get_option(bufnr, 'filetype')\n  self.buftype = vim.api.nvim_buf_get_option(bufnr, 'buftype')\n\n  if self.options.show_modified_status then\n    for _, b in ipairs(buflist) do\n      if vim.api.nvim_buf_get_option(b, 'modified') then\n        self.modified_icon = self.options.symbols.modified or ''\n        break\n      end\n    end\n  end\nend\n\n---returns name for tab. Tabs name is the name of buffer in last active window\n--- of the tab.\n---@return string\nfunction Tab:label()\n  local ok, custom_tabname = pcall(vim.api.nvim_tabpage_get_var, self.tabId, 'tabname')\n  if not ok then\n    custom_tabname = nil\n  end\n  if custom_tabname and custom_tabname ~= '' then\n    return modules.utils.stl_escape(custom_tabname)\n  end\n  if self.filetype == 'fugitive' then\n    return 'fugitive: ' .. vim.fn.fnamemodify(self.file, ':h:h:t')\n  elseif self.buftype == 'help' then\n    return 'help:' .. vim.fn.fnamemodify(self.file, ':t:r')\n  elseif self.buftype == 'terminal' then\n    local match = string.match(vim.split(self.file, ' ')[1], 'term:.*:(%a+)')\n    return match ~= nil and match or vim.fn.fnamemodify(vim.env.SHELL, ':t')\n  elseif self.file == '' then\n    return '[No Name]'\n  end\n  if self.options.path == 1 then\n    return vim.fn.fnamemodify(self.file, ':~:.')\n  elseif self.options.path == 2 then\n    return vim.fn.fnamemodify(self.file, ':p')\n  elseif self.options.path == 3 then\n    return vim.fn.fnamemodify(self.file, ':p:~')\n  else\n    return vim.fn.fnamemodify(self.file, ':t')\n  end\nend\n\n---shortens path by turning apple/orange -> a/orange\n---@param path string\n---@param sep string path separator\n---@param max_len integer maximum length of the full filename string\n---@return string\nlocal function shorten_path(path, sep, max_len)\n  local len = #path\n  if len <= max_len then\n    return path\n  end\n\n  local segments = vim.split(path, sep)\n  for idx = 1, #segments - 1 do\n    if len <= max_len then\n      break\n    end\n\n    local segment = segments[idx]\n    local shortened = segment:sub(1, vim.startswith(segment, '.') and 2 or 1)\n    segments[idx] = shortened\n    len = len - (#segment - #shortened)\n  end\n\n  return table.concat(segments, sep)\nend\n\n---returns rendered tab\n---@return string\nfunction Tab:render()\n  local name = self:label()\n  if self.options.tab_max_length ~= 0 then\n    local path_separator = package.config:sub(1, 1)\n    name = shorten_path(name, path_separator, self.options.tab_max_length)\n  end\n  if self.options.fmt then\n    name = self.options.fmt(name or '', self)\n  end\n  if self.ellipse then -- show ellipsis\n    name = '...'\n  else\n    -- different formats for different modes\n    if self.options.mode == 0 then\n      name = tostring(self.tabnr)\n      if self.modified_icon ~= '' then\n        name = string.format('%s%s', name, self.modified_icon)\n      end\n    elseif self.options.mode == 1 then\n      if self.modified_icon ~= '' then\n        name = string.format('%s %s', self.modified_icon, name)\n      end\n    else\n      name = string.format('%s%s %s', tostring(self.tabnr), self.modified_icon, name)\n    end\n  end\n\n  name = Tab.apply_padding(name, self.options.padding)\n  self.len = vim.fn.strchars(name)\n\n  -- setup for mouse clicks\n  local line = string.format('%%%s@LualineSwitchTab@%s%%T', self.tabnr, name)\n  -- apply highlight\n  line = modules.highlight.component_format_highlight(self.highlights[(self.current and 'active' or 'inactive')])\n    .. line\n\n  -- apply separators\n  if self.options.self.section < 'x' and not self.first then\n    local sep_before = self:separator_before()\n    line = sep_before .. line\n    self.len = self.len + vim.fn.strchars(sep_before)\n  elseif self.options.self.section >= 'x' and not self.last then\n    local sep_after = self:separator_after()\n    line = line .. sep_after\n    self.len = self.len + vim.fn.strchars(sep_after)\n  end\n  return line\nend\n\n---apply separator before current tab\n---@return string\nfunction Tab:separator_before()\n  if self.current or self.aftercurrent then\n    return '%Z{' .. self.options.section_separators.left .. '}'\n  else\n    return self.options.component_separators.left\n  end\nend\n\n---apply separator after current tab\n---@return string\nfunction Tab:separator_after()\n  if self.current or self.beforecurrent then\n    return '%z{' .. self.options.section_separators.right .. '}'\n  else\n    return self.options.component_separators.right\n  end\nend\n\n---adds spaces to left and right\nfunction Tab.apply_padding(str, padding)\n  local l_padding, r_padding = 1, 1\n  if type(padding) == 'number' then\n    l_padding, r_padding = padding, padding\n  elseif type(padding) == 'table' then\n    l_padding, r_padding = padding.left or 0, padding.right or 0\n  end\n  return string.rep(' ', l_padding) .. str .. string.rep(' ', r_padding)\nend\n\nreturn Tab\n"
  },
  {
    "path": "lua/lualine/components/windows/init.lua",
    "content": "local Window = require('lualine.components.windows.window')\nlocal M = require('lualine.components.buffers'):extend()\n\nlocal default_options = {\n  disabled_filetypes = {},\n  disabled_buftypes = { 'quickfix', 'prompt' },\n}\n\nfunction M:init(options)\n  options.buffers_color = nil -- buffers_color isn't windows option.\n  M.super.init(self, options)\n\n  self.options = vim.tbl_deep_extend('keep', self.options or {}, default_options)\n  self.options.windows_color = vim.tbl_deep_extend('keep', self.options.windows_color or {}, self.options.buffers_color)\n  self.options.buffers_color = nil -- this is the default value of colors generated by parent buffers component.\n\n  self.highlights = {\n    active = self:create_hl(self.options.windows_color.active, 'active'),\n    inactive = self:create_hl(self.options.windows_color.inactive, 'inactive'),\n  }\nend\n\nfunction M:new_buffer(winnr)\n  winnr = winnr or vim.api.nvim_get_current_win()\n\n  return Window:new {\n    winnr = winnr,\n    options = self.options,\n    highlights = self.highlights,\n  }\nend\n\n--- Override to only return buffers shown in the windows of the current tab\nfunction M:buffers()\n  local tabnr = vim.api.nvim_get_current_tabpage()\n  local buffers = {}\n\n  for _, winnr in ipairs(vim.api.nvim_tabpage_list_wins(tabnr)) do\n    if not self:should_hide(winnr) then\n      buffers[#buffers + 1] = self:new_buffer(winnr)\n    end\n  end\n\n  return buffers\nend\n\nfunction M:should_hide(winnr)\n  local bufnr = vim.api.nvim_win_get_buf(winnr)\n  local filetype = vim.api.nvim_buf_get_option(bufnr, 'filetype')\n  local buftype = vim.api.nvim_buf_get_option(bufnr, 'buftype')\n  local is_filetype_disabled = vim.tbl_contains(self.options.disabled_filetypes, filetype)\n  local is_buftype_disabled = vim.tbl_contains(self.options.disabled_buftypes, buftype)\n  local is_floating = '' ~= vim.api.nvim_win_get_config(winnr).relative\n\n  return is_floating or is_buftype_disabled or is_filetype_disabled\nend\n\nvim.cmd([[\n  function! LualineSwitchWindow(win_number, mouseclicks, mousebutton, modifiers)\n    execute a:win_number . 'wincmd w'\n  endfunction\n]])\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/components/windows/window.lua",
    "content": "local Window = require('lualine.components.buffers.buffer'):extend()\n\n---initialize a new buffer from opts\n---@param opts table\nfunction Window:init(opts)\n  assert(opts.winnr, 'Cannot create Window without winnr')\n  opts.bufnr = vim.api.nvim_win_get_buf(opts.winnr)\n\n  Window.super.init(self, opts)\n\n  self.winnr = opts.winnr\n  self.win_number = vim.api.nvim_win_get_number(self.winnr)\nend\n\nfunction Window:is_current()\n  return vim.api.nvim_get_current_win() == self.winnr\nend\n\nfunction Window:apply_mode(name)\n  if self.options.mode == 0 then\n    return string.format('%s%s%s', self.icon, name, self.modified_icon)\n  end\n\n  if self.options.mode == 1 then\n    return string.format('%s %s%s', self.win_number, self.icon, self.modified_icon)\n  end\n\n  return string.format('%s %s%s%s', self.win_number, self.icon, name, self.modified_icon)\nend\n\nfunction Window:configure_mouse_click(name)\n  return string.format('%%%s@LualineSwitchWindow@%s%%T', self.win_number, name)\nend\n\nreturn Window\n"
  },
  {
    "path": "lua/lualine/config.lua",
    "content": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal require = require('lualine_require').require\nlocal utils = require('lualine.utils.utils')\nlocal modules = require('lualine_require').lazy_require {\n  utils_notices = 'lualine.utils.notices',\n}\n\nlocal config = {\n  options = {\n    icons_enabled = true,\n    theme = 'auto',\n    component_separators = { left = '', right = '' },\n    section_separators = { left = '', right = '' },\n    disabled_filetypes = {\n      statusline = {},\n      winbar = {},\n    },\n    ignore_focus = {},\n    always_divide_middle = true,\n    always_show_tabline = true,\n    globalstatus = vim.go.laststatus == 3,\n    refresh = {\n      statusline = 1000,\n      tabline = 1000,\n      winbar = 1000,\n      refresh_time = 16, -- ~60fps\n      events = {\n        'WinEnter',\n        'BufEnter',\n        'BufWritePost',\n        'SessionLoadPost',\n        'FileChangedShellPost',\n        'VimResized',\n        'Filetype',\n        'CursorMoved',\n        'CursorMovedI',\n        'ModeChanged',\n      },\n    },\n  },\n  sections = {\n    lualine_a = { 'mode' },\n    lualine_b = { 'branch', 'diff', 'diagnostics' },\n    lualine_c = { 'filename' },\n    lualine_x = { 'encoding', 'fileformat', 'filetype' },\n    lualine_y = { 'progress' },\n    lualine_z = { 'location' },\n  },\n  inactive_sections = {\n    lualine_a = {},\n    lualine_b = {},\n    lualine_c = { 'filename' },\n    lualine_x = { 'location' },\n    lualine_y = {},\n    lualine_z = {},\n  },\n  tabline = {},\n  winbar = {},\n  inactive_winbar = {},\n  extensions = {},\n}\n\n--- Ensure sure user config doesn't disable lualine refresh completely\n---@param refresh_options table | nil\n---@return table | nil\nlocal function fix_refresh_timer(refresh_options)\n  if refresh_options == nil then\n    return\n  end\n  if refresh_options.refresh_time <= 0 then\n    refresh_options.refresh_time = 16\n  end\n  return refresh_options\nend\n\n--- change separator format 'x' to {left='x', right='x'}\n---@param separators string|table\n---@return table\nlocal function fix_separators(separators)\n  if separators ~= nil then\n    if type(separators) == 'string' then\n      return { left = separators, right = separators }\n    end\n  end\n  return separators\nend\n\n---copy raw disabled_filetypes to inner statusline & winbar tables.\n---@param disabled_filetypes table\n---@return table\nlocal function fix_disabled_filetypes(disabled_filetypes)\n  if disabled_filetypes == nil then\n    return\n  end\n  if disabled_filetypes.statusline == nil then\n    disabled_filetypes.statusline = {}\n  end\n  if disabled_filetypes.winbar == nil then\n    disabled_filetypes.winbar = {}\n  end\n  for k, disabled_ft in ipairs(disabled_filetypes) do\n    table.insert(disabled_filetypes.statusline, disabled_ft)\n    table.insert(disabled_filetypes.winbar, disabled_ft)\n    disabled_filetypes[k] = nil\n  end\n  return disabled_filetypes\nend\n---extends config based on config_table\n---@param config_table table\n---@return table copy of config\nlocal function apply_configuration(config_table)\n  if not config_table then\n    return utils.deepcopy(config)\n  end\n  local function parse_sections(section_group_name)\n    if config_table[section_group_name] == nil then\n      return\n    end\n    if not next(config_table[section_group_name]) then\n      config[section_group_name] = {}\n      return\n    end\n    for section_name, section in pairs(config_table[section_group_name]) do\n      if section_name == 'refresh' then\n        config[section_group_name][section_name] =\n          vim.tbl_deep_extend('force', config[section_group_name][section_name], utils.deepcopy(section))\n      else\n        config[section_group_name][section_name] = utils.deepcopy(section)\n      end\n    end\n  end\n  if vim.fn.has('nvim-0.8') == 0 and (next(config_table.winbar or {}) or next(config_table.inactive_winbar or {})) then\n    modules.utils_notices.add_notice('### winbar\\nSorry `winbar can only be used in neovim 0.8 or higher.\\n')\n    config_table.winbar = {}\n    config_table.inactive_winbar = {}\n  end\n  parse_sections('options')\n  parse_sections('sections')\n  parse_sections('inactive_sections')\n  parse_sections('tabline')\n  parse_sections('winbar')\n  parse_sections('inactive_winbar')\n  if config_table.extensions then\n    config.extensions = utils.deepcopy(config_table.extensions)\n  end\n  config.options.refresh = fix_refresh_timer(config.options.refresh)\n  config.options.section_separators = fix_separators(config.options.section_separators)\n  config.options.component_separators = fix_separators(config.options.component_separators)\n  config.options.disabled_filetypes = fix_disabled_filetypes(config.options.disabled_filetypes)\n  return utils.deepcopy(config)\nend\n\n--- returns current active config\n---@return table a copy of config\nlocal function get_current_config()\n  return utils.deepcopy(config)\nend\n\nreturn {\n  get_config = get_current_config,\n  apply_configuration = apply_configuration,\n}\n"
  },
  {
    "path": "lua/lualine/extensions/aerial.lua",
    "content": "-- MIT license, see LICENSE for more details.\n-- Extension for aerial.nvim\nlocal M = {}\n\nM.sections = { lualine_a = { 'filetype' } }\n\nM.filetypes = { 'aerial' }\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/extensions/assistant.lua",
    "content": "-- lualine extension for assistant.nvim\n\nlocal ok, assistant = pcall(require, 'assistant')\n\nif not ok then\n  return nil\nend\n\nlocal M = {}\n\nM.sections = {\n  lualine_a = {\n    function()\n      return 'Assistant'\n    end,\n  },\n  lualine_b = {\n    function()\n      return vim.bo.filetype:match('%w+.(%w+)')\n    end,\n  },\n  lualine_c = {\n    function()\n      return assistant.status()[vim.bo.filetype:match('%w+.(%w+)')] or ''\n    end,\n  },\n}\n\nM.filetypes = {\n  'assistant-panel',\n  'assistant-previewer',\n  'assistant-picker',\n  'assistant-dialog',\n  'assistant-patcher',\n}\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/extensions/avante.lua",
    "content": "-- MIT license, see LICENSE for more details.\n-- Extension for avante.nvim\n\nlocal M = {}\n\nlocal function ft_info()\n  local ft = vim.opt_local.filetype:get()\n  if ft == 'Avante' then\n    return 'Output'\n  elseif ft == 'AvanteInput' then\n    return require('lualine.utils.mode').get_mode()\n  elseif ft == 'AvanteSelectedCode' then\n    local max_shown = vim.api.nvim_win_get_height(0)\n    local avante_ok, avante_config = pcall(require, 'avante.config')\n    if avante_ok and avante_config.windows.sidebar_header.enabled then\n      max_shown = max_shown - 1\n    end\n    local num_lines = vim.api.nvim_buf_line_count(0)\n    return string.format('Code Fragment: %s%d lines', max_shown < num_lines and (max_shown .. '/') or '', num_lines)\n  elseif ft == 'AvanteSelectedFiles' then\n    return 'Total Files: ' .. vim.api.nvim_buf_line_count(0)\n  elseif ft == 'AvanteTodos' then\n    local todos = vim.api.nvim_buf_get_lines(0, 0, -1, false)\n    local completed = vim.iter(todos):fold(0, function(counter, todo)\n      if todo:sub(1, 3) == '[x]' then\n        counter = counter + 1\n      end\n      return counter\n    end)\n    return string.format('Todos: %d/%d', completed, #todos)\n  end\nend\n\nM.sections = { lualine_a = { ft_info } }\n\nM.filetypes = { 'Avante', 'AvanteInput', 'AvanteSelectedCode', 'AvanteSelectedFiles', 'AvanteTodos' }\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/extensions/chadtree.lua",
    "content": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal nerdtree = require('lualine.extensions.nerdtree')\n\nlocal M = {}\n\nM.sections = vim.deepcopy(nerdtree.sections)\n\nM.filetypes = { 'CHADTree' }\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/extensions/ctrlspace.lua",
    "content": "local M = {}\n\nM.sections = {\n  lualine_a = {\n    function()\n      return vim.fn['ctrlspace#context#Configuration']().Symbols.CS\n    end,\n  },\n  lualine_b = { 'ctrlspace#api#StatuslineModeSegment' },\n  lualine_y = { 'ctrlspace#api#StatuslineTabSegment' },\n  lualine_z = {\n    function()\n      return 'CtrlSpace'\n    end,\n  },\n}\n\nM.filetypes = { 'ctrlspace' }\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/extensions/fern.lua",
    "content": "-- MIT license, see LICENSE for more details.\n-- Extension for fern file explorer.\nlocal nerdtree = require('lualine.extensions.nerdtree')\n\nlocal M = {}\n\nM.sections = vim.deepcopy(nerdtree.sections)\n\nM.filetypes = { 'fern' }\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/extensions/fugitive.lua",
    "content": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal M = {}\n\nlocal function fugitive_branch()\n  local icon = '' -- e0a0\n  return icon .. ' ' .. vim.fn.FugitiveHead()\nend\n\nM.sections = {\n  lualine_a = { fugitive_branch },\n  lualine_z = { 'location' },\n}\n\nM.filetypes = { 'fugitive' }\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/extensions/fzf.lua",
    "content": "--[[\nlualine extension for fzf filetypes:\nworks with both https://github.com/junegunn/fzf.vim and https://github.com/ibhagwan/fzf-lua\n\n-- fzf-lua must be set-up in split mode\n]]\n\nlocal function has_fzf()\n  return pcall(require, 'fzf-lua')\nend\n\nlocal function fzf_picker()\n  if not has_fzf() then\n    return ''\n  end\n\n  local info_string = vim.inspect(require('fzf-lua').get_info()['fnc'])\n  return info_string:gsub('\"', '')\nend\n\nlocal function fzf_element()\n  if not has_fzf() then\n    return ''\n  end\n\n  local fzf = require('fzf-lua')\n  local selected = fzf.get_info().selected\n  return fzf.path.entry_to_file(selected).path\nend\n\nlocal function fzf_statusline()\n  return 'FZF'\nend\n\nlocal M = {}\n\nM.sections = {\n  lualine_a = { fzf_statusline },\n  lualine_y = { fzf_element },\n  lualine_z = { fzf_picker },\n}\n\nM.filetypes = { 'fzf' }\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/extensions/lazy.lua",
    "content": "-- lualine extension for lazy.nvim\n\nlocal ok, lazy = pcall(require, 'lazy')\nif not ok then\n  return ''\nend\n\nlocal M = {}\n\nM.sections = {\n  lualine_a = {\n    function()\n      return 'lazy 💤'\n    end,\n  },\n  lualine_b = {\n    function()\n      return 'loaded: ' .. lazy.stats().loaded .. '/' .. lazy.stats().count\n    end,\n  },\n  lualine_c = {\n    {\n      require('lazy.status').updates,\n      cond = require('lazy.status').has_updates,\n    },\n  },\n}\n\nM.filetypes = { 'lazy' }\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/extensions/man.lua",
    "content": "local M = {}\n\nM.sections = {\n  lualine_a = {\n    function()\n      return 'MAN'\n    end,\n  },\n  lualine_b = { { 'filename', file_status = false } },\n  lualine_y = { 'progress' },\n  lualine_z = { 'location' },\n}\n\nM.filetypes = { 'man' }\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/extensions/mason.lua",
    "content": "-- lualine extension for mason.nvim\n\nlocal mason_registry\nlocal function maybe_set_registry()\n  local ok, registry = pcall(require, 'mason-registry')\n  if ok then\n    mason_registry = registry\n  end\nend\n\nlocal M = {}\n\nM.sections = {\n  lualine_a = {\n    function()\n      return 'Mason'\n    end,\n  },\n  lualine_b = {\n    function()\n      maybe_set_registry()\n      return 'Installed: ' .. #mason_registry.get_installed_packages() .. '/' .. #mason_registry.get_all_package_specs()\n    end,\n  },\n}\n\nM.filetypes = { 'mason' }\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/extensions/mundo.lua",
    "content": "local M = {}\n\nM.sections = {\n  lualine_a = {\n    function()\n      local ft = vim.opt_local.filetype:get()\n      return (ft == 'Mundo') and 'Change tree' or (ft == 'MundoDiff') and 'Change diff'\n    end,\n  },\n  lualine_y = { 'progress' },\n  lualine_z = { 'location' },\n}\n\nM.filetypes = {\n  'Mundo',\n  'MundoDiff',\n}\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/extensions/neo-tree.lua",
    "content": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal nerdtree = require('lualine.extensions.nerdtree')\n\nlocal M = {}\n\nM.sections = vim.deepcopy(nerdtree.sections)\n\nM.filetypes = { 'neo-tree' }\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/extensions/nerdtree.lua",
    "content": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal function get_short_cwd()\n  return vim.fn.fnamemodify(vim.fn.getcwd(), ':~')\nend\n\nlocal M = {}\n\nM.sections = {\n  lualine_a = { get_short_cwd },\n}\n\nM.filetypes = { 'nerdtree' }\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/extensions/nvim-dap-ui.lua",
    "content": "-- MIT license, see LICENSE for more details.\n-- Extension for nvim-dap-ui\nlocal M = {}\n\nM.sections = {\n  lualine_a = { { 'filename', file_status = false } },\n}\n\nM.filetypes = {\n  'dap-repl',\n  'dapui_console',\n  'dapui_watches',\n  'dapui_stacks',\n  'dapui_breakpoints',\n  'dapui_scopes',\n}\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/extensions/nvim-tree.lua",
    "content": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal nerdtree = require('lualine.extensions.nerdtree')\n\nlocal M = {}\n\nM.sections = vim.deepcopy(nerdtree.sections)\n\nM.filetypes = { 'NvimTree' }\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/extensions/oil.lua",
    "content": "-- Extension for oil.nvim\n\nlocal M = {}\n\nM.sections = {\n  lualine_a = {\n    function()\n      local ok, oil = pcall(require, 'oil')\n      if ok then\n        return vim.fn.fnamemodify(oil.get_current_dir(), ':~')\n      else\n        return ''\n      end\n    end,\n  },\n}\n\nM.filetypes = { 'oil' }\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/extensions/overseer.lua",
    "content": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\n\nlocal M = {}\n\nM.sections = {\n  lualine_a = {\n    function()\n      return 'OverseerList'\n    end,\n  },\n}\n\nM.filetypes = { 'OverseerList' }\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/extensions/quickfix.lua",
    "content": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\n--\nlocal function is_loclist()\n  return vim.fn.getloclist(0, { filewinid = 1 }).filewinid ~= 0\nend\n\nlocal function label()\n  return is_loclist() and 'Location List' or 'Quickfix List'\nend\n\nlocal function title()\n  if is_loclist() then\n    return vim.fn.getloclist(0, { title = 0 }).title\n  end\n  return vim.fn.getqflist({ title = 0 }).title\nend\n\nlocal M = {}\n\nfunction M.init()\n  -- Make sure ft wf doesn't create a custom statusline\n  vim.g.qf_disable_statusline = true\nend\n\nM.sections = {\n  lualine_a = { label },\n  lualine_b = { title },\n  lualine_z = { 'location' },\n}\n\nM.filetypes = { 'qf' }\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/extensions/symbols-outline.lua",
    "content": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal M = {}\n\nM.sections = { lualine_a = { 'filetype' } }\n\nM.filetypes = { 'Outline' }\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/extensions/toggleterm.lua",
    "content": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\n\nlocal function toggleterm_statusline()\n  return 'ToggleTerm #' .. vim.b.toggle_number\nend\n\nlocal M = {}\n\nM.sections = {\n  lualine_a = { toggleterm_statusline },\n}\n\nM.filetypes = { 'toggleterm' }\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/extensions/trouble.lua",
    "content": "local M = {}\n\n---Format mode, eg: lsp_document_symbols -> Lsp Document Symbols\n---@param mode string\n---@return string\nlocal function _format_mode(mode)\n  local words = vim.split(mode, '[%W]')\n  for i, word in ipairs(words) do\n    words[i] = word:sub(1, 1):upper() .. word:sub(2)\n  end\n\n  return table.concat(words, ' ')\nend\n\nlocal function get_trouble_mode()\n  local opts = require('trouble.config').options\n  if opts ~= nil and opts.mode ~= nil then\n    return _format_mode(opts.mode)\n  end\n\n  local win = vim.api.nvim_get_current_win()\n  if vim.w[win] ~= nil then\n    local trouble = vim.w[win].trouble\n    if trouble ~= nil and trouble.mode ~= nil then\n      return _format_mode(trouble.mode)\n    end\n  end\n\n  return ''\nend\n\nM.sections = {\n  lualine_a = {\n    get_trouble_mode,\n  },\n}\n\nM.filetypes = { 'trouble', 'Trouble' }\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/highlight.lua",
    "content": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal M = {}\nlocal lualine_require = require('lualine_require')\nlocal require = lualine_require.require\nlocal modules = lualine_require.lazy_require {\n  utils = 'lualine.utils.utils',\n  color_utils = 'lualine.utils.color_utils',\n}\n\nlocal section_highlight_map = { x = 'c', y = 'b', z = 'a' }\nlocal active_theme = nil\nlocal theme_hls = {}\nlocal create_cterm_colors = false\n\n-- table to store the highlight names created by lualine\nlocal loaded_highlights = {}\n\n-- table to map mode to highlight suffixes\nlocal mode_to_highlight = {\n  ['VISUAL'] = '_visual',\n  ['V-BLOCK'] = '_visual',\n  ['V-LINE'] = '_visual',\n  ['SELECT'] = '_visual',\n  ['S-LINE'] = '_visual',\n  ['S-BLOCK'] = '_visual',\n  ['REPLACE'] = '_replace',\n  ['V-REPLACE'] = '_replace',\n  ['INSERT'] = '_insert',\n  ['COMMAND'] = '_command',\n  ['EX'] = '_command',\n  ['MORE'] = '_command',\n  ['CONFIRM'] = '_command',\n  ['TERMINAL'] = '_terminal',\n}\n\n--- Get highlight suffix for current mode, or inactive if not focused\n---@return string mode_suffix\nfunction M.get_mode_suffix()\n  local mode = require('lualine.utils.mode').get_mode()\n  return mode_to_highlight[mode] or '_normal'\nend\n\n--- determine if an highlight exist and isn't cleared\n---@param highlight_name string\n---@return boolean whether hl_group was defined with highlight_name\nfunction M.highlight_exists(highlight_name)\n  return loaded_highlights[highlight_name] or false\nend\n\n--- Creates lualine owned Normal mirror. Used for transparent background\nlocal function create_transparent_hlgroup()\n  local base_color = modules.utils.extract_highlight_colors('Normal')\n  if base_color.reverse then\n    base_color.fg, base_color.bg = base_color.bg, base_color.fg\n  end\n  M.highlight('lualine_transparent', base_color.fg, base_color.bg, nil, nil)\nend\n\n--- clears loaded_highlights table and highlights\nlocal function clear_highlights()\n  for highlight_name, _ in pairs(loaded_highlights) do\n    vim.cmd('highlight clear ' .. highlight_name)\n  end\n  loaded_highlights = {}\n  create_transparent_hlgroup()\nend\n\n---converts cterm, color_name type colors to #rrggbb format\n---@param color string|number\n---@return string\nlocal function sanitize_color(color)\n  if color == nil or color == '' or (type(color) == 'string' and color:lower() == 'none') then\n    return 'None'\n  end\n  if type(color) == 'string' then\n    if color:sub(1, 1) == '#' then\n      return color\n    end -- RGB value\n    return modules.color_utils.color_name2rgb(color)\n  elseif type(color) == 'number' then\n    if color > 255 then\n      error(\"What's this it can't be higher then 255 and you've given \" .. color)\n    end\n    return modules.color_utils.cterm2rgb(color)\n  end\nend\n\n---converts color_name type colors to cterm format and let cterm color pass through\n---@param color string|number\n---@return string\nlocal function sanitize_color_for_cterm(color)\n  if type(color) == 'number' then\n    if color > 255 then\n      error(\"What's this it can't be higher then 255 and you've given \" .. color)\n    end\n    return color\n  end\n  return modules.color_utils.rgb2cterm(sanitize_color(color))\nend\n\nfunction M.get_lualine_hl(name)\n  local hl = loaded_highlights[name]\n  if hl and not hl.empty then\n    if hl.link then\n      return modules.utils.extract_highlight_colors(hl.link)\n    end\n    local hl_def = {\n      fg = hl.fg ~= 'None' and vim.deepcopy(hl.fg) or nil,\n      bg = hl.bg ~= 'None' and vim.deepcopy(hl.bg) or nil,\n      sp = hl.sp ~= 'None' and vim.deepcopy(hl.sp) or nil,\n    }\n    if hl.gui then\n      for _, flag in ipairs(vim.split(hl.gui, ',')) do\n        if flag ~= 'None' then\n          hl_def[flag] = true\n        end\n      end\n    end\n\n    return hl_def\n  end\nend\n\n--- Define a hl_group\n---@param name string\n---@param foreground string|number: color\n---@param background string|number: color\n---@param gui table cterm/gui options like bold/italic etc.\n---@param link string hl_group name to link new hl to\nfunction M.highlight(name, foreground, background, gui, link)\n  local command = { 'highlight!' }\n  if link and #link > 0 then\n    if loaded_highlights[name] and loaded_highlights[name].link == link then\n      return\n    end\n    vim.list_extend(command, { 'link', name, link })\n  else\n    local foreground_rgb = sanitize_color(foreground)\n    local background_rgb = sanitize_color(background)\n    gui = gui or ''\n    if string.find(gui, 'nocombine') == nil then\n      gui = gui ~= '' and gui .. ',nocombine' or 'nocombine'\n    end\n    if\n      loaded_highlights[name]\n      and loaded_highlights[name].fg == foreground_rgb\n      and loaded_highlights[name].bg == background_rgb\n      and loaded_highlights[name].gui == gui\n    then\n      return -- color is already defined why are we doing this anyway ?\n    end\n    table.insert(command, name)\n    table.insert(command, 'guifg=' .. foreground_rgb)\n    table.insert(command, 'guibg=' .. background_rgb)\n    table.insert(command, 'gui=' .. gui)\n    if create_cterm_colors then\n      -- Not setting color from xxxground_rgb to let possible user 256 number through\n      table.insert(command, 'ctermfg=' .. sanitize_color_for_cterm(foreground))\n      table.insert(command, 'ctermbg=' .. sanitize_color_for_cterm(background))\n      table.insert(command, 'cterm=' .. gui)\n    end\n  end\n  vim.cmd(table.concat(command, ' '))\n\n  -- update attached hl groups\n  local old_hl_def = loaded_highlights[name]\n  if old_hl_def and next(old_hl_def.attached) then\n    -- Update attached hl groups as they announced to depend on hl_group 'name'\n    -- 'hl' being in 'name's attached table means 'hl'\n    -- depends of 'name'.\n    -- 'hl' key in attached table will contain a table that\n    -- defines the relation between 'hl' & 'name'.\n    -- name.attached.hl = { bg = 'fg' } means\n    -- hl's fg is same as 'names' bg . So 'hl's fg should\n    -- be updated when ever 'name' changes it's 'bg'\n    local bg_changed = old_hl_def.bg ~= background\n    local fg_changed = old_hl_def.bg ~= foreground\n    local gui_changed = old_hl_def.gui ~= gui\n    for attach_name, attach_desc in pairs(old_hl_def.attached) do\n      if bg_changed and attach_desc.bg and loaded_highlights[attach_name] then\n        M.highlight(\n          attach_name,\n          attach_desc.bg == 'fg' and background or loaded_highlights[attach_name].fg,\n          attach_desc.bg == 'bg' and background or loaded_highlights[attach_name].bg,\n          loaded_highlights[attach_name].gui,\n          loaded_highlights[attach_name].link\n        )\n      end\n      if fg_changed and attach_desc.fg and loaded_highlights[attach_name] then\n        M.highlight(\n          attach_name,\n          attach_desc.fg == 'fg' and foreground or loaded_highlights[attach_name].fg,\n          attach_desc.fg == 'bg' and foreground or loaded_highlights[attach_name].bg,\n          loaded_highlights[attach_name].gui,\n          loaded_highlights[attach_name].link\n        )\n      end\n      if gui_changed and attach_desc.gui and loaded_highlights[attach_name] then\n        M.highlight(\n          attach_name,\n          loaded_highlights[attach_name].fg,\n          loaded_highlights[attach_name].bg,\n          gui,\n          loaded_highlights[attach_name].link\n        )\n      end\n    end\n  end\n  -- store current hl state\n  loaded_highlights[name] = {\n    fg = foreground,\n    bg = background,\n    gui = gui,\n    link = link,\n    attached = old_hl_def and old_hl_def.attached or {},\n  }\nend\n\n---Attach a hl to another, so the attached auto updates on change to hl that it's attached too.\n---@param provider string the hl receiver is getting attached to\n---@param receiver string the hl that will be auto updated upon change to provider\n---@param provider_el_type string (fg/bg) what element receiver relates to of provider\n---@param receiver_el_type string (fg/bg) what element provider relates to of receiver\nlocal function attach_hl(provider, receiver, provider_el_type, receiver_el_type)\n  if loaded_highlights[provider] == nil then\n    loaded_highlights[provider] = { empty = true, attached = {} }\n  end\n  loaded_highlights[provider].attached[receiver] = { [provider_el_type] = receiver_el_type }\nend\n---define hl_groups for a theme\n---@param theme table\nfunction M.create_highlight_groups(theme)\n  clear_highlights()\n  active_theme = theme\n  theme_hls = {}\n  local psudo_options = { self = { section = 'a' } }\n  create_cterm_colors = not vim.go.termguicolors\n  for mode, sections in pairs(theme) do\n    theme_hls[mode] = {}\n    for section, color in pairs(sections) do\n      local hl_tag = mode\n      psudo_options.self.section = section\n      theme_hls[mode][section] = M.create_component_highlight_group(color, hl_tag, psudo_options, true)\n    end\n  end\nend\n\n---@description: adds '_mode' at end of highlight_group\n---@param highlight_group string name of highlight group\n---@return string highlight group name with mode\nlocal function append_mode(highlight_group, is_focused)\n  if is_focused == nil then\n    is_focused = modules.utils.is_focused()\n  end\n  if is_focused == false then\n    return highlight_group .. '_inactive'\n  end\n  return highlight_group .. M.get_mode_suffix()\nend\n\n-- Helper function for create component highlight\n---Handles fall back of colors when creating highlight group\n---@param hl_name string name of highlight that we are setting default values for\n---@param mode string mode which default component color should be given.\n---@param section string the lualine section component is in.\n---@param color table color passed for creating component highlight\n---@param options table Options table of component this is first fall back\nlocal function get_default_component_color(hl_name, mode, section, color, options)\n  local default_theme_color\n  if active_theme[mode] and active_theme[mode][section] then\n    default_theme_color = active_theme[mode][section]\n  elseif section >= 'c' and active_theme[mode] and active_theme[mode][section_highlight_map[section]] then\n    default_theme_color = active_theme[mode][section_highlight_map[section]]\n  elseif section >= 'c' and active_theme.normal[section_highlight_map[section]] then\n    default_theme_color = active_theme.normal[section_highlight_map[section]]\n  else\n    default_theme_color = active_theme.normal[section]\n  end\n\n  local ret = { fg = color.fg, bg = color.bg, gui = color.gui }\n  if ret.fg and ret.bg then\n    return ret\n  end\n\n  local function apply_default(def_color, def_name)\n    if type(def_color) == 'function' and loaded_highlights[def_name] and not loaded_highlights[def_name].empty then\n      if loaded_highlights[def_name].link then\n        def_color = loaded_highlights[def_name].link\n      else\n        def_color = loaded_highlights[def_name]\n      end\n    end\n    if type(def_color) == 'function' then\n      def_color = def_color { section = section }\n    end\n    if type(def_color) == 'string' then\n      def_color = modules.utils.extract_highlight_colors(def_color)\n    end\n    if type(def_color) == 'table' then\n      if not ret.fg then\n        ret.fg = def_color.fg\n        attach_hl(def_name, hl_name, 'fg', 'fg')\n      end\n      if not ret.bg then\n        ret.bg = def_color.bg\n        attach_hl(def_name, hl_name, 'bg', 'bg')\n      end\n    end\n  end\n\n  if\n    options.color\n    and options.color_highlight\n    and options.color_highlight.name\n    and options.color_highlight.name .. '_' .. mode ~= hl_name\n  then\n    apply_default(options.color, options.color_highlight.name .. '_' .. mode)\n  end\n\n  if not ret.fg or not ret.bg then\n    apply_default(default_theme_color, string.format('lualine_%s_%s', section, mode))\n  end\n  ret.fg = sanitize_color(ret.fg)\n  ret.bg = sanitize_color(ret.bg)\n  return ret\nend\n\n---Create highlight group with fg bg and gui from theme\n---@param color table has to be { fg = \"#rrggbb\", bg=\"#rrggbb\" gui = \"effect\" }\n---       all the color elements are optional if fg or bg is not given options\n---       must be provided So fg and bg can default the themes colors\n---@param highlight_tag string is unique tag for highlight group\n---returns the name of highlight group\n---@param options table is parameter of component.init() function\n---@return table that can be used by component_format_highlight\n---  to retrieve highlight group\nfunction M.create_component_highlight_group(color, highlight_tag, options, apply_no_default)\n  local section = options.self.section\n  local tag_id = 1\n  local highlight_tag_counted = highlight_tag\n  while\n    M.highlight_exists(table.concat({ 'lualine', section, highlight_tag_counted }, '_'))\n    or (section and M.highlight_exists(table.concat({ 'lualine', section, highlight_tag_counted, 'normal' }, '_')))\n  do\n    highlight_tag_counted = highlight_tag .. '_' .. tostring(tag_id)\n    tag_id = tag_id + 1\n  end\n  highlight_tag = highlight_tag_counted\n\n  if type(color) == 'string' then\n    local highlight_group_name = table.concat({ 'lualine', section, highlight_tag }, '_')\n    M.highlight(highlight_group_name, nil, nil, nil, color) -- link to group\n    return {\n      name = highlight_group_name,\n      fn = nil,\n      no_mode = true,\n      link = true,\n      section = section,\n      options = options,\n      no_default = apply_no_default,\n    }\n  end\n\n  if type(color) ~= 'function' and (apply_no_default or (color.bg and color.fg)) then\n    -- When bg and fg are both present we don't need to set highlights for\n    -- each mode as they will surely look the same. So we can work without options\n    local highlight_group_name = table.concat({ 'lualine', section, highlight_tag }, '_')\n    M.highlight(highlight_group_name, color.fg, color.bg, color.gui, nil)\n    return {\n      name = highlight_group_name,\n      fn = nil,\n      no_mode = true,\n      section = section,\n      options = options,\n      no_default = apply_no_default,\n    }\n  end\n\n  local modes = {\n    'normal',\n    'insert',\n    'visual',\n    'replace',\n    'command',\n    'terminal',\n    'inactive',\n  }\n  for _, mode in ipairs(modes) do\n    local hl_name = table.concat({ 'lualine', section, highlight_tag, mode }, '_')\n    local cl = color\n    if type(color) == 'function' then\n      cl = color { section = section } or {}\n    end\n    if type(cl) == 'string' then\n      cl = { link = cl }\n    else\n      cl = get_default_component_color(hl_name, mode, section, cl, options)\n    end\n    M.highlight(hl_name, cl.fg, cl.bg, cl.gui, cl.link)\n  end\n  return {\n    name = table.concat({ 'lualine', section, highlight_tag }, '_'),\n    fn = type(color) == 'function' and color,\n    no_mode = false,\n    link = false,\n    section = section,\n    options = options,\n    no_default = apply_no_default,\n  }\nend\n\n---@description: retrieve highlight_groups for components\n---@param highlight table return value of create_component_highlight_group\n---  return value of create_component_highlight_group is to be passed in\n---  this parameter to receive highlight that was created\n---@return string formatted highlight group name\nfunction M.component_format_highlight(highlight, is_focused)\n  if not highlight.fn then\n    local highlight_group = highlight.name\n    if highlight.no_mode then\n      return '%#' .. highlight_group .. '#'\n    end\n    highlight_group = append_mode(highlight_group, is_focused)\n    return '%#' .. highlight_group .. '#'\n  else\n    local color = highlight.fn { section = highlight.section } or {}\n    local hl_name = highlight.name\n    if type(color) == 'string' then\n      M.highlight(hl_name .. M.get_mode_suffix(), nil, nil, nil, color)\n      return '%#' .. hl_name .. M.get_mode_suffix() .. '#'\n    elseif type(color) == 'table' then\n      if not highlight.no_default and not (color.fg and color.bg) then\n        hl_name = append_mode(highlight.name, is_focused)\n        color =\n          get_default_component_color(hl_name, M.get_mode_suffix():sub(2), highlight.section, color, highlight.options)\n      end\n      M.highlight(hl_name, color.fg, color.bg, color.gui, color.link)\n      return '%#' .. hl_name .. '#', color\n    end\n  end\nend\n\n---@description: retrieve highlight_groups for section\n---@param section string highlight group name without mode\n---  return value of create_component_highlight_group is to be passed in\n---  this parameter to receive highlight that was created\n---@param is_focused boolean\n---@return string formatted highlight group name\nfunction M.format_highlight(section, is_focused)\n  local mode = append_mode('', is_focused):sub(2)\n  local ret = ''\n\n  if theme_hls[mode] and theme_hls[mode][section] then\n    ret = M.component_format_highlight(theme_hls[mode][section], is_focused)\n  elseif theme_hls[mode] and section > 'c' and theme_hls[mode][section_highlight_map[section]] then\n    ret = M.component_format_highlight(theme_hls[mode][section_highlight_map[section]], is_focused)\n  elseif theme_hls['normal'] and theme_hls['normal'][section] then\n    ret = M.component_format_highlight(theme_hls['normal'][section], is_focused)\n  elseif theme_hls['normal'] and section > 'c' and theme_hls['normal'][section_highlight_map[section]] then\n    ret = M.component_format_highlight(theme_hls['normal'][section_highlight_map[section]], is_focused)\n  end\n\n  return ret\nend\n\n---@description : Provides transitional highlights for section separators.\n---@param left_hl string this highlights bg is used for fg of transitional hl\n---@param right_hl string this highlights bg is used for bg of transitional hl\n---   '▶️' and '◀️' ' needs reverse colors so the caller should swap left and right\n---@return string formatted highlight group name\nfunction M.get_transitional_highlights(left_hl, right_hl)\n  -- When both left and right highlights are same or one is absent\n  -- nothing to transition to.\n  if left_hl == nil or right_hl == nil or left_hl == right_hl then\n    return nil\n  end\n\n  -- construct the name of highlight group\n  local highlight_name = table.concat({ 'lualine_transitional', left_hl, 'to', right_hl }, '_')\n  if not M.highlight_exists(highlight_name) then\n    -- Create the highlight_group if needed\n    -- Get colors from highlights\n    local fg = modules.utils.extract_highlight_colors(left_hl, 'bg')\n    local bg = modules.utils.extract_highlight_colors(right_hl, 'bg')\n    if not fg and not bg then\n      return nil -- Color retrieval failed\n    end\n    if bg == fg then\n      return nil -- Separator won't be visible anyway\n    end\n    M.highlight(highlight_name, fg, bg, nil, nil)\n    attach_hl(left_hl, highlight_name, 'bg', 'fg')\n    attach_hl(right_hl, highlight_name, 'bg', 'bg')\n  end\n  return '%#' .. highlight_name .. '#'\nend\n\nfunction M.get_stl_default_hl(focused)\n  if focused == 3 then\n    return 'TabLineFill'\n  elseif not focused then\n    return 'StatusLineNC'\n  else\n    return 'StatusLine'\n  end\nend\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/themes/16color.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Credit itchyny, jackno (lightline)\n-- stylua: ignore\nlocal colors = {\n  black   = '#000000',\n  maroon  = '#800000',\n  green   = '#008000',\n  olive   = '#808000',\n  navy    = '#000080',\n  purple  = '#800080',\n  teal    = '#008080',\n  silver  = '#c0c0c0',\n  gray    = '#808080',\n  red     = '#ff0000',\n  lime    = '#00ff00',\n  yellow  = '#ffff00',\n  blue    = '#0000ff',\n  fuchsia = '#ff00ff',\n  aqua    = '#00ffff',\n  white   = '#ffffff',\n}\n\nreturn {\n  normal = {\n    a = { fg = colors.white, bg = colors.blue, gui = 'bold' },\n    b = { fg = colors.white, bg = colors.gray },\n    c = { fg = colors.silver, bg = colors.black },\n  },\n  insert = { a = { fg = colors.white, bg = colors.green, gui = 'bold' } },\n  visual = { a = { fg = colors.white, bg = colors.purple, gui = 'bold' } },\n  replace = { a = { fg = colors.white, bg = colors.red, gui = 'bold' } },\n  inactive = {\n    a = { fg = colors.silver, bg = colors.gray, gui = 'bold' },\n    b = { fg = colors.gray, bg = colors.black },\n    c = { fg = colors.silver, bg = colors.black },\n  },\n}\n"
  },
  {
    "path": "lua/lualine/themes/OceanicNext.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Generated by lightline to lualine theme converter\n-- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9\n-- stylua: ignore\nlocal colors = {\n  color0   = '#ffffff',\n  color1   = '#99c794',\n  color2   = '#65737e',\n  color3   = '#343d46',\n  color4   = '#6699cc',\n  color5   = '#d8dee9',\n  color6   = '#f99157',\n  color7   = '#ec5f67',\n}\n\nreturn {\n  insert = {\n    a = { fg = colors.color0, bg = colors.color1, gui = 'bold' },\n    b = { fg = colors.color0, bg = colors.color2 },\n    c = { fg = colors.color0, bg = colors.color3 },\n  },\n  normal = {\n    a = { fg = colors.color0, bg = colors.color4, gui = 'bold' },\n    b = { fg = colors.color0, bg = colors.color2 },\n    c = { fg = colors.color0, bg = colors.color3 },\n  },\n  inactive = {\n    a = { fg = colors.color5, bg = colors.color2, gui = 'bold' },\n    b = { fg = colors.color5, bg = colors.color3 },\n    c = { fg = colors.color2, bg = colors.color3 },\n  },\n  visual = {\n    a = { fg = colors.color0, bg = colors.color6, gui = 'bold' },\n    b = { fg = colors.color0, bg = colors.color2 },\n    c = { fg = colors.color0, bg = colors.color3 },\n  },\n  replace = {\n    a = { fg = colors.color0, bg = colors.color7, gui = 'bold' },\n    b = { fg = colors.color0, bg = colors.color2 },\n    c = { fg = colors.color0, bg = colors.color3 },\n  },\n}\n"
  },
  {
    "path": "lua/lualine/themes/PaperColor.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Credit: itchyny(lightline)\nlocal background = vim.opt.background:get()\n\nreturn require('lualine.themes.papercolor_' .. background)\n"
  },
  {
    "path": "lua/lualine/themes/Tomorrow.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Generated by lightline to lualine theme converter\n-- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9\n-- stylua: ignore\nlocal colors = {\n  color14  = '#718c00',\n  color0   = '#666666',\n  color1   = '#c8c8c8',\n  color2   = '#808080',\n  color3   = '#fafafa',\n  color4   = '#4271ae',\n  color5   = '#4d4d4c',\n  color6   = '#b4b4b4',\n  color7   = '#555555',\n  color8   = '#8959a8',\n  color11  = '#f5871f',\n}\n\nreturn {\n  inactive = {\n    a = { fg = colors.color0, bg = colors.color1, gui = 'bold' },\n    b = { fg = colors.color2, bg = colors.color3 },\n    c = { fg = colors.color0, bg = colors.color1 },\n  },\n  normal = {\n    a = { fg = colors.color1, bg = colors.color4, gui = 'bold' },\n    b = { fg = colors.color5, bg = colors.color6 },\n    c = { fg = colors.color7, bg = colors.color1 },\n  },\n  visual = {\n    a = { fg = colors.color1, bg = colors.color8, gui = 'bold' },\n    b = { fg = colors.color5, bg = colors.color6 },\n  },\n  replace = {\n    a = { fg = colors.color1, bg = colors.color11, gui = 'bold' },\n    b = { fg = colors.color5, bg = colors.color6 },\n  },\n  insert = {\n    a = { fg = colors.color1, bg = colors.color14, gui = 'bold' },\n    b = { fg = colors.color5, bg = colors.color6 },\n  },\n}\n"
  },
  {
    "path": "lua/lualine/themes/auto.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\nlocal utils = require('lualine.utils.utils')\nlocal loader = require('lualine.utils.loader')\n\nlocal color_name = vim.g.colors_name\nif color_name then\n  -- All base16 colorschemes share the same theme\n  if 'base16' == color_name:sub(1, 6) then\n    color_name = 'base16'\n  end\n\n  -- Check if there's a theme for current colorscheme\n  -- If there is load that instead of generating a new one\n  local ok, theme = pcall(loader.load_theme, color_name)\n  if ok and theme then\n    return theme\n  end\nend\n\n---------------\n-- Constants --\n---------------\n-- fg and bg must have this much contrast range 0 < contrast_threshold < 0.5\nlocal contrast_threshold = 0.3\n-- how much brightness is changed in percentage for light and dark themes\nlocal brightness_modifier_parameter = 10\n\n-- Turns #rrggbb -> { red, green, blue }\nlocal function rgb_str2num(rgb_color_str)\n  if rgb_color_str:find('#') == 1 then\n    rgb_color_str = rgb_color_str:sub(2, #rgb_color_str)\n  end\n  local red = tonumber(rgb_color_str:sub(1, 2), 16)\n  local green = tonumber(rgb_color_str:sub(3, 4), 16)\n  local blue = tonumber(rgb_color_str:sub(5, 6), 16)\n  return { red = red, green = green, blue = blue }\nend\n\n-- Turns { red, green, blue } -> #rrggbb\nlocal function rgb_num2str(rgb_color_num)\n  local rgb_color_str = string.format('#%02x%02x%02x', rgb_color_num.red, rgb_color_num.green, rgb_color_num.blue)\n  return rgb_color_str\nend\n\n-- Returns brightness level of color in range 0 to 1\n-- arbitrary value it's basically an weighted average\nlocal function get_color_brightness(rgb_color)\n  local color = rgb_str2num(rgb_color)\n  local brightness = (color.red * 2 + color.green * 3 + color.blue) / 6\n  return brightness / 256\nend\n\n-- returns average of colors in range 0 to 1\n-- used to determine contrast level\nlocal function get_color_avg(rgb_color)\n  local color = rgb_str2num(rgb_color)\n  return (color.red + color.green + color.blue) / 3 / 256\nend\n\n-- Clamps the val between left and right\nlocal function clamp(val, left, right)\n  if val > right then\n    return right\n  end\n  if val < left then\n    return left\n  end\n  return val\nend\n\n-- Changes brightness of rgb_color by percentage\nlocal function brightness_modifier(rgb_color, percentage)\n  local color = rgb_str2num(rgb_color)\n  color.red = clamp(color.red + (color.red * percentage / 100), 0, 255)\n  color.green = clamp(color.green + (color.green * percentage / 100), 0, 255)\n  color.blue = clamp(color.blue + (color.blue * percentage / 100), 0, 255)\n  return rgb_num2str(color)\nend\n\n-- Changes contrast of rgb_color by amount\nlocal function contrast_modifier(rgb_color, amount)\n  local color = rgb_str2num(rgb_color)\n  color.red = clamp(color.red + amount, 0, 255)\n  color.green = clamp(color.green + amount, 0, 255)\n  color.blue = clamp(color.blue + amount, 0, 255)\n  return rgb_num2str(color)\nend\n\n-- Changes brightness of foreground color to achieve contrast\n-- without changing the color\nlocal function apply_contrast(highlight)\n  local highlight_bg_avg = get_color_avg(highlight.bg)\n  local contrast_threshold_config = clamp(contrast_threshold, 0, 0.5)\n  local contrast_change_step = 5\n  if highlight_bg_avg > 0.5 then\n    contrast_change_step = -contrast_change_step\n  end\n\n  -- Don't waste too much time here max 25 iteration should be more than enough\n  local iteration_count = 1\n  while math.abs(get_color_avg(highlight.fg) - highlight_bg_avg) < contrast_threshold_config and iteration_count < 25 do\n    highlight.fg = contrast_modifier(highlight.fg, contrast_change_step)\n    iteration_count = iteration_count + 1\n  end\nend\n\n-- Get the colors to create theme\n-- stylua: ignore\nlocal colors = {\n  normal  = utils.extract_color_from_hllist('bg', { 'PmenuSel', 'PmenuThumb', 'TabLineSel' }, '#000000'),\n  insert  = utils.extract_color_from_hllist('fg', { 'String', 'MoreMsg' }, '#000000'),\n  replace = utils.extract_color_from_hllist('fg', { 'Number', 'Type' }, '#000000'),\n  visual  = utils.extract_color_from_hllist('fg', { 'Special', 'Boolean', 'Constant' }, '#000000'),\n  command = utils.extract_color_from_hllist('fg', { 'Identifier' }, '#000000'),\n  back1   = utils.extract_color_from_hllist('bg', { 'Normal', 'StatusLineNC' }, '#000000'),\n  fore    = utils.extract_color_from_hllist('fg', { 'Normal', 'StatusLine' }, '#000000'),\n  back2   = utils.extract_color_from_hllist('bg', { 'StatusLine' }, '#000000'),\n}\n\n-- Change brightness of colors\n-- Darken if light theme (or) Lighten if dark theme\nlocal normal_color = utils.extract_highlight_colors('Normal', 'bg')\nif normal_color ~= nil then\n  if get_color_brightness(normal_color) > 0.5 then\n    brightness_modifier_parameter = -brightness_modifier_parameter\n  end\n  for name, color in pairs(colors) do\n    colors[name] = brightness_modifier(color, brightness_modifier_parameter)\n  end\nend\n\n-- Basic theme definition\nlocal M = {\n  normal = {\n    a = { bg = colors.normal, fg = colors.back1, gui = 'bold' },\n    b = { bg = colors.back1, fg = colors.normal },\n    c = { bg = colors.back2, fg = colors.fore },\n  },\n  insert = {\n    a = { bg = colors.insert, fg = colors.back1, gui = 'bold' },\n    b = { bg = colors.back1, fg = colors.insert },\n    c = { bg = colors.back2, fg = colors.fore },\n  },\n  replace = {\n    a = { bg = colors.replace, fg = colors.back1, gui = 'bold' },\n    b = { bg = colors.back1, fg = colors.replace },\n    c = { bg = colors.back2, fg = colors.fore },\n  },\n  visual = {\n    a = { bg = colors.visual, fg = colors.back1, gui = 'bold' },\n    b = { bg = colors.back1, fg = colors.visual },\n    c = { bg = colors.back2, fg = colors.fore },\n  },\n  command = {\n    a = { bg = colors.command, fg = colors.back1, gui = 'bold' },\n    b = { bg = colors.back1, fg = colors.command },\n    c = { bg = colors.back2, fg = colors.fore },\n  },\n}\n\nM.terminal = M.command\nM.inactive = M.normal\n\n-- Apply proper contrast so text is readable\nfor _, section in pairs(M) do\n  for _, highlight in pairs(section) do\n    apply_contrast(highlight)\n  end\nend\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/themes/ayu.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Credit: itchyny(lightline)\n-- License: MIT License\nlocal background = vim.opt.background:get()\nlocal style = vim.g.ayucolor or ((background == 'dark') and vim.g.ayuprefermirage and 'mirage' or background)\n\nreturn require('lualine.themes.ayu_' .. style)\n"
  },
  {
    "path": "lua/lualine/themes/ayu_dark.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Generated by lightline to lualine theme converter\n-- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9\n-- stylua: ignore\nlocal colors = {\n  color2   = '#0f1419',\n  color3   = '#ffee99',\n  color4   = '#e6e1cf',\n  color5   = '#14191f',\n  color13  = '#b8cc52',\n  color10  = '#36a3d9',\n  color8   = '#f07178',\n  color9   = '#3e4b59',\n}\n\nreturn {\n  visual = {\n    a = { fg = colors.color2, bg = colors.color3, gui = 'bold' },\n    b = { fg = colors.color4, bg = colors.color5 },\n  },\n  replace = {\n    a = { fg = colors.color2, bg = colors.color8, gui = 'bold' },\n    b = { fg = colors.color4, bg = colors.color5 },\n  },\n  inactive = {\n    c = { fg = colors.color4, bg = colors.color2 },\n    a = { fg = colors.color4, bg = colors.color5, gui = 'bold' },\n    b = { fg = colors.color4, bg = colors.color5 },\n  },\n  normal = {\n    c = { fg = colors.color9, bg = colors.color2 },\n    a = { fg = colors.color2, bg = colors.color10, gui = 'bold' },\n    b = { fg = colors.color4, bg = colors.color5 },\n  },\n  insert = {\n    a = { fg = colors.color2, bg = colors.color13, gui = 'bold' },\n    b = { fg = colors.color4, bg = colors.color5 },\n  },\n}\n"
  },
  {
    "path": "lua/lualine/themes/ayu_light.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Generated by lightline to lualine theme converter\n-- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9\n-- stylua: ignore\nlocal colors = {\n  color2   = '#f3f3f3',\n  color3   = '#A37ACC',\n  color4   = '#5C6773',\n  color5   = '#d3d3d3',\n  color13  = '#86B300',\n  color10  = '#59c2ff',\n  color8   = '#f07178',\n  color9   = '#828C99',\n}\n\nreturn {\n  visual = {\n    a = { fg = colors.color2, bg = colors.color3, gui = 'bold' },\n    b = { fg = colors.color4, bg = colors.color5 },\n  },\n  replace = {\n    a = { fg = colors.color2, bg = colors.color8, gui = 'bold' },\n    b = { fg = colors.color4, bg = colors.color5 },\n  },\n  inactive = {\n    c = { fg = colors.color4, bg = colors.color2 },\n    a = { fg = colors.color4, bg = colors.color5, gui = 'bold' },\n    b = { fg = colors.color4, bg = colors.color5 },\n  },\n  normal = {\n    c = { fg = colors.color9, bg = colors.color2 },\n    a = { fg = colors.color2, bg = colors.color10, gui = 'bold' },\n    b = { fg = colors.color4, bg = colors.color5 },\n  },\n  insert = {\n    a = { fg = colors.color2, bg = colors.color13, gui = 'bold' },\n    b = { fg = colors.color4, bg = colors.color5 },\n  },\n}\n"
  },
  {
    "path": "lua/lualine/themes/ayu_mirage.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Generated by lightline to lualine theme converter\n-- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9\n-- stylua: ignore\nlocal colors = {\n  color2   = '#242b38',\n  color3   = '#d4bfff',\n  color4   = '#d9d7ce',\n  color5   = '#272d38',\n  color13  = '#bbe67e',\n  color10  = '#59c2ff',\n  color8   = '#f07178',\n  color9   = '#607080',\n}\n\nreturn {\n  visual = {\n    a = { fg = colors.color2, bg = colors.color3, gui = 'bold' },\n    b = { fg = colors.color4, bg = colors.color5 },\n  },\n  replace = {\n    a = { fg = colors.color2, bg = colors.color8, gui = 'bold' },\n    b = { fg = colors.color4, bg = colors.color5 },\n  },\n  inactive = {\n    c = { fg = colors.color4, bg = colors.color2 },\n    a = { fg = colors.color4, bg = colors.color5, gui = 'bold' },\n    b = { fg = colors.color4, bg = colors.color5 },\n  },\n  normal = {\n    c = { fg = colors.color9, bg = colors.color2 },\n    a = { fg = colors.color2, bg = colors.color10, gui = 'bold' },\n    b = { fg = colors.color4, bg = colors.color5 },\n  },\n  insert = {\n    a = { fg = colors.color2, bg = colors.color13, gui = 'bold' },\n    b = { fg = colors.color4, bg = colors.color5 },\n  },\n}\n"
  },
  {
    "path": "lua/lualine/themes/base16.lua",
    "content": "local modules = require('lualine_require').lazy_require { notices = 'lualine.utils.notices' }\n\nlocal function add_notice(notice)\n  modules.notices.add_notice('theme(base16): ' .. notice)\nend\n\nlocal function setup(colors)\n  local theme = {\n    normal = {\n      a = { fg = colors.bg, bg = colors.normal },\n      b = { fg = colors.light_fg, bg = colors.alt_bg },\n      c = { fg = colors.fg, bg = colors.bg },\n    },\n    replace = {\n      a = { fg = colors.bg, bg = colors.replace },\n      b = { fg = colors.light_fg, bg = colors.alt_bg },\n    },\n    insert = {\n      a = { fg = colors.bg, bg = colors.insert },\n      b = { fg = colors.light_fg, bg = colors.alt_bg },\n    },\n    visual = {\n      a = { fg = colors.bg, bg = colors.visual },\n      b = { fg = colors.light_fg, bg = colors.alt_bg },\n    },\n    inactive = {\n      a = { fg = colors.dark_fg, bg = colors.bg },\n      b = { fg = colors.dark_fg, bg = colors.bg },\n      c = { fg = colors.dark_fg, bg = colors.bg },\n    },\n  }\n\n  theme.command = theme.normal\n  theme.terminal = theme.insert\n\n  return theme\nend\n\nlocal function setup_default()\n  return setup {\n    bg = '#282a2e',\n    alt_bg = '#373b41',\n    dark_fg = '#969896',\n    fg = '#b4b7b4',\n    light_fg = '#c5c8c6',\n    normal = '#81a2be',\n    insert = '#b5bd68',\n    visual = '#b294bb',\n    replace = '#de935f',\n  }\nend\n\nlocal function setup_base16_nvim()\n  -- Continue to load nvim-base16\n  local loaded, base16 = pcall(require, 'base16-colorscheme')\n\n  if not loaded then\n    add_notice(\n      'nvim-base16 is not currently present in your runtimepath, make sure it is properly installed,'\n        .. ' fallback to default colors.'\n    )\n\n    return nil\n  end\n\n  if not base16.colors and not vim.env.BASE16_THEME then\n    add_notice(\n      'nvim-base16 is not loaded yet, you should update your configuration to load it before lualine'\n        .. ' so that the colors from your colorscheme can be used, fallback to \"tomorrow-night\" theme.'\n    )\n  elseif not base16.colors and not base16.colorschemes[vim.env.BASE16_THEME] then\n    add_notice(\n      'The colorscheme \"%s\" defined by the environment variable \"BASE16_THEME\" is not handled by'\n        .. ' nvim-base16, fallback to \"tomorrow-night\" theme.'\n    )\n  end\n\n  local colors = base16.colors or base16.colorschemes[vim.env.BASE16_THEME or 'tomorrow-night']\n\n  return setup {\n    bg = colors.base01,\n    alt_bg = colors.base02,\n    dark_fg = colors.base03,\n    fg = colors.base04,\n    light_fg = colors.base05,\n    normal = colors.base0D,\n    insert = colors.base0B,\n    visual = colors.base0E,\n    replace = colors.base09,\n  }\nend\n\nlocal function setup_base16_vim()\n  -- Check if tinted-theming/base16-vim is already loaded\n  if vim.g.base16_gui00 and vim.g.base16_gui0F then\n    return setup {\n      bg = vim.g.base16_gui01,\n      alt_bg = vim.g.base16_gui02,\n      dark_fg = vim.g.base16_gui03,\n      fg = vim.g.base16_gui04,\n      light_fg = vim.g.base16_gui05,\n      normal = vim.g.base16_gui0D,\n      insert = vim.g.base16_gui0B,\n      visual = vim.g.base16_gui0E,\n      replace = vim.g.base16_gui09,\n    }\n  end\n\n  -- base16-vim has been renamed to tinted-vim along with colors\n  -- context: https://github.com/nvim-lualine/lualine.nvim/pull/1352\n  if vim.g.tinted_gui00 and vim.g.tinted_gui0F then\n    return setup {\n      bg = vim.g.tinted_gui01,\n      alt_bg = vim.g.tinted_gui02,\n      dark_fg = vim.g.tinted_gui03,\n      fg = vim.g.tinted_gui04,\n      light_fg = vim.g.tinted_gui05,\n      normal = vim.g.tinted_gui0D,\n      insert = vim.g.tinted_gui0B,\n      visual = vim.g.tinted_gui0E,\n      replace = vim.g.tinted_gui09,\n    }\n  end\n  return nil\nend\n\nreturn setup_base16_vim() or setup_base16_nvim() or setup_default()\n"
  },
  {
    "path": "lua/lualine/themes/codedark.lua",
    "content": "-- Copyright (c) 2020-2021 Shatur95\n-- MIT license, see LICENSE for more details.\n-- stylua: ignore\nlocal colors = {\n  gray     = '#3C3C3C',\n  lightred = '#D16969',\n  blue     = '#569CD6',\n  pink     = '#C586C0',\n  black    = '#262626',\n  white    = '#D4D4D4',\n  green    = '#608B4E',\n}\n\nreturn {\n  normal = {\n    b = { fg = colors.green, bg = colors.black },\n    a = { fg = colors.black, bg = colors.green, gui = 'bold' },\n    c = { fg = colors.white, bg = colors.black },\n  },\n  visual = {\n    b = { fg = colors.pink, bg = colors.black },\n    a = { fg = colors.black, bg = colors.pink, gui = 'bold' },\n  },\n  inactive = {\n    b = { fg = colors.black, bg = colors.blue },\n    a = { fg = colors.white, bg = colors.gray, gui = 'bold' },\n  },\n  replace = {\n    b = { fg = colors.lightred, bg = colors.black },\n    a = { fg = colors.black, bg = colors.lightred, gui = 'bold' },\n    c = { fg = colors.white, bg = colors.black },\n  },\n  insert = {\n    b = { fg = colors.blue, bg = colors.black },\n    a = { fg = colors.black, bg = colors.blue, gui = 'bold' },\n    c = { fg = colors.white, bg = colors.black },\n  },\n}\n"
  },
  {
    "path": "lua/lualine/themes/dracula.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Credit itchyny, jackno (lightline)\n-- stylua: ignore\nlocal colors = {\n  gray       = '#44475a',\n  lightgray  = '#5f6a8e',\n  orange     = '#ffb86c',\n  purple     = '#bd93f9',\n  red        = '#ff5555',\n  yellow     = '#f1fa8c',\n  green      = '#50fa7b',\n  white      = '#f8f8f2',\n  black      = '#282a36',\n}\n\nreturn {\n  normal = {\n    a = { bg = colors.purple, fg = colors.black, gui = 'bold' },\n    b = { bg = colors.lightgray, fg = colors.white },\n    c = { bg = colors.gray, fg = colors.white },\n  },\n  insert = {\n    a = { bg = colors.green, fg = colors.black, gui = 'bold' },\n    b = { bg = colors.lightgray, fg = colors.white },\n    c = { bg = colors.gray, fg = colors.white },\n  },\n  visual = {\n    a = { bg = colors.yellow, fg = colors.black, gui = 'bold' },\n    b = { bg = colors.lightgray, fg = colors.white },\n    c = { bg = colors.gray, fg = colors.white },\n  },\n  replace = {\n    a = { bg = colors.red, fg = colors.black, gui = 'bold' },\n    b = { bg = colors.lightgray, fg = colors.white },\n    c = { bg = colors.gray, fg = colors.white },\n  },\n  command = {\n    a = { bg = colors.orange, fg = colors.black, gui = 'bold' },\n    b = { bg = colors.lightgray, fg = colors.white },\n    c = { bg = colors.gray, fg = colors.white },\n  },\n  inactive = {\n    a = { bg = colors.gray, fg = colors.white, gui = 'bold' },\n    b = { bg = colors.lightgray, fg = colors.white },\n    c = { bg = colors.gray, fg = colors.white },\n  },\n}\n"
  },
  {
    "path": "lua/lualine/themes/everforest.lua",
    "content": "-- Copyright (c) 2020-2021 gnuyent\n-- MIT license, see LICENSE for more details.\n-- stylua: ignore\nlocal colors = {\n  bg0    = '#323d43',\n  bg1    = '#3c474d',\n  bg3    = '#505a60',\n  fg     = '#d8caac',\n  aqua   = '#87c095',\n  green  = '#a7c080',\n  orange = '#e39b7b',\n  purple = '#d39bb6',\n  red    = '#e68183',\n  grey1  = '#868d80',\n}\n\nreturn {\n  normal = {\n    a = { bg = colors.green, fg = colors.bg0, gui = 'bold' },\n    b = { bg = colors.bg3, fg = colors.fg },\n    c = { bg = colors.bg1, fg = colors.fg },\n  },\n  insert = {\n    a = { bg = colors.fg, fg = colors.bg0, gui = 'bold' },\n    b = { bg = colors.bg3, fg = colors.fg },\n    c = { bg = colors.bg1, fg = colors.fg },\n  },\n  visual = {\n    a = { bg = colors.red, fg = colors.bg0, gui = 'bold' },\n    b = { bg = colors.bg3, fg = colors.fg },\n    c = { bg = colors.bg1, fg = colors.fg },\n  },\n  replace = {\n    a = { bg = colors.orange, fg = colors.bg0, gui = 'bold' },\n    b = { bg = colors.bg3, fg = colors.fg },\n    c = { bg = colors.bg1, fg = colors.fg },\n  },\n  command = {\n    a = { bg = colors.aqua, fg = colors.bg0, gui = 'bold' },\n    b = { bg = colors.bg3, fg = colors.fg },\n    c = { bg = colors.bg1, fg = colors.fg },\n  },\n  terminal = {\n    a = { bg = colors.purple, fg = colors.bg0, gui = 'bold' },\n    b = { bg = colors.bg3, fg = colors.fg },\n    c = { bg = colors.bg1, fg = colors.fg },\n  },\n  inactive = {\n    a = { bg = colors.bg1, fg = colors.grey1, gui = 'bold' },\n    b = { bg = colors.bg1, fg = colors.grey1 },\n    c = { bg = colors.bg1, fg = colors.grey1 },\n  },\n}\n"
  },
  {
    "path": "lua/lualine/themes/gruvbox-material.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- stylua: ignore\nlocal colors = {\n  fg1    = '#282828',\n  color2 = '#504945',\n  fg2    = '#ddc7a1',\n  color3 = '#32302f',\n  color4 = '#a89984',\n  color5 = '#7daea3',\n  color6 = '#a9b665',\n  color7 = '#d8a657',\n  color8 = '#d3869b',\n  color9 = '#ea6962',\n}\n\nreturn {\n  normal = {\n    a = { fg = colors.fg1, bg = colors.color4, gui = 'bold' },\n    b = { fg = colors.fg2, bg = colors.color2 },\n    c = { fg = colors.fg2, bg = colors.color3 },\n  },\n  command = { a = { fg = colors.fg1, bg = colors.color5, gui = 'bold' } },\n  inactive = { a = { fg = colors.fg2, bg = colors.color2 } },\n  insert = { a = { fg = colors.fg1, bg = colors.color6, gui = 'bold' } },\n  replace = { a = { fg = colors.fg1, bg = colors.color7, gui = 'bold' } },\n  terminal = { a = { fg = colors.fg1, bg = colors.color8, gui = 'bold' } },\n  visual = { a = { fg = colors.fg1, bg = colors.color9, gui = 'bold' } },\n}\n"
  },
  {
    "path": "lua/lualine/themes/gruvbox.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Credit: itchyny(lightline)\n-- License: MIT License\nlocal background = vim.opt.background:get()\n\nreturn require('lualine.themes.gruvbox_' .. background)\n"
  },
  {
    "path": "lua/lualine/themes/gruvbox_dark.lua",
    "content": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\n-- stylua: ignore\nlocal colors = {\n  black        = '#282828',\n  white        = '#ebdbb2',\n  red          = '#fb4934',\n  green        = '#b8bb26',\n  blue         = '#83a598',\n  yellow       = '#fe8019',\n  gray         = '#a89984',\n  darkgray     = '#3c3836',\n  lightgray    = '#504945',\n  inactivegray = '#7c6f64',\n}\n\nreturn {\n  normal = {\n    a = { bg = colors.gray, fg = colors.black, gui = 'bold' },\n    b = { bg = colors.lightgray, fg = colors.white },\n    c = { bg = colors.darkgray, fg = colors.gray },\n  },\n  insert = {\n    a = { bg = colors.blue, fg = colors.black, gui = 'bold' },\n    b = { bg = colors.lightgray, fg = colors.white },\n    c = { bg = colors.lightgray, fg = colors.white },\n  },\n  visual = {\n    a = { bg = colors.yellow, fg = colors.black, gui = 'bold' },\n    b = { bg = colors.lightgray, fg = colors.white },\n    c = { bg = colors.inactivegray, fg = colors.black },\n  },\n  replace = {\n    a = { bg = colors.red, fg = colors.black, gui = 'bold' },\n    b = { bg = colors.lightgray, fg = colors.white },\n    c = { bg = colors.black, fg = colors.white },\n  },\n  command = {\n    a = { bg = colors.green, fg = colors.black, gui = 'bold' },\n    b = { bg = colors.lightgray, fg = colors.white },\n    c = { bg = colors.inactivegray, fg = colors.black },\n  },\n  inactive = {\n    a = { bg = colors.darkgray, fg = colors.gray, gui = 'bold' },\n    b = { bg = colors.darkgray, fg = colors.gray },\n    c = { bg = colors.darkgray, fg = colors.gray },\n  },\n}\n"
  },
  {
    "path": "lua/lualine/themes/gruvbox_light.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- stylua: ignore\nlocal colors = {\n  black        = '#3c3836',\n  white        = '#f9f5d7',\n  orange       = '#af3a03',\n  green        = '#427b58',\n  blue         = '#076678',\n  gray         = '#d5c4a1',\n  darkgray     = '#7c6f64',\n  lightgray    = '#ebdbb2',\n  inactivegray = '#a89984'\n}\n\nreturn {\n  normal = {\n    a = { bg = colors.darkgray, fg = colors.white, gui = 'bold' },\n    b = { bg = colors.gray, fg = colors.darkgray },\n    c = { bg = colors.lightgray, fg = colors.darkgray },\n  },\n  insert = {\n    a = { bg = colors.blue, fg = colors.white, gui = 'bold' },\n    b = { bg = colors.gray, fg = colors.darkgray },\n    c = { bg = colors.gray, fg = colors.black },\n  },\n  visual = {\n    a = { bg = colors.orange, fg = colors.white, gui = 'bold' },\n    b = { bg = colors.gray, fg = colors.darkgray },\n    c = { bg = colors.darkgray, fg = colors.white },\n  },\n  replace = {\n    a = { bg = colors.green, fg = colors.white, gui = 'bold' },\n    b = { bg = colors.gray, fg = colors.darkgray },\n    c = { bg = colors.gray, fg = colors.black },\n  },\n  command = {\n    a = { bg = colors.darkgray, fg = colors.white, gui = 'bold' },\n    b = { bg = colors.gray, fg = colors.darkgray },\n    c = { bg = colors.lightgray, fg = colors.darkgray },\n  },\n  inactive = {\n    a = { bg = colors.lightgray, fg = colors.inactivegray },\n    b = { bg = colors.lightgray, fg = colors.inactivegray },\n    c = { bg = colors.lightgray, fg = colors.inactivegray },\n  },\n}\n"
  },
  {
    "path": "lua/lualine/themes/horizon.lua",
    "content": "-- Copyright (c) 2021 Jnhtr\n-- MIT license, see LICENSE for more details.\n-- stylua: ignore\nlocal colors = {\n  black        = '#1c1e26',\n  white        = '#6C6F93',\n  red          = '#F43E5C',\n  green        = '#09F7A0',\n  blue         = '#25B2BC',\n  yellow       = '#F09383',\n  gray         = '#E95678',\n  darkgray     = '#1A1C23',\n  lightgray    = '#2E303E',\n  inactivegray = '#1C1E26',\n}\n\nreturn {\n  normal = {\n    a = { bg = colors.gray, fg = colors.black, gui = 'bold' },\n    b = { bg = colors.lightgray, fg = colors.white },\n    c = { bg = colors.darkgray, fg = colors.white },\n  },\n  insert = {\n    a = { bg = colors.blue, fg = colors.black, gui = 'bold' },\n    b = { bg = colors.lightgray, fg = colors.white },\n    c = { bg = colors.darkgray, fg = colors.white },\n  },\n  visual = {\n    a = { bg = colors.yellow, fg = colors.black, gui = 'bold' },\n    b = { bg = colors.lightgray, fg = colors.white },\n    c = { bg = colors.darkgray, fg = colors.white },\n  },\n  replace = {\n    a = { bg = colors.red, fg = colors.black, gui = 'bold' },\n    b = { bg = colors.lightgray, fg = colors.white },\n    c = { bg = colors.darkgray, fg = colors.white },\n  },\n  command = {\n    a = { bg = colors.green, fg = colors.black, gui = 'bold' },\n    b = { bg = colors.lightgray, fg = colors.white },\n    c = { bg = colors.darkgray, fg = colors.white },\n  },\n  inactive = {\n    a = { bg = colors.inactivegray, fg = colors.lightgray, gui = 'bold' },\n    b = { bg = colors.inactivegray, fg = colors.lightgray },\n    c = { bg = colors.inactivegray, fg = colors.lightgray },\n  },\n}\n"
  },
  {
    "path": "lua/lualine/themes/iceberg.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Credit: itchyny(lightline)\n-- License: MIT License\nlocal background = vim.opt.background:get()\n\nreturn require('lualine.themes.iceberg_' .. background)\n"
  },
  {
    "path": "lua/lualine/themes/iceberg_dark.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Generated by lightline to lualine theme converter\n-- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9\n-- stylua: ignore\nlocal colors = {\n  color2   = '#161821',\n  color3   = '#b4be82',\n  color4   = '#c6c8d1',\n  color5   = '#2e313f',\n  color8   = '#e2a478',\n  color9   = '#3e445e',\n  color10  = '#0f1117',\n  color11  = '#17171b',\n  color12  = '#818596',\n  color15  = '#84a0c6',\n}\n\nreturn {\n  visual = {\n    a = { fg = colors.color2, bg = colors.color3, gui = 'bold' },\n    b = { fg = colors.color4, bg = colors.color5 },\n  },\n  replace = {\n    a = { fg = colors.color2, bg = colors.color8, gui = 'bold' },\n    b = { fg = colors.color4, bg = colors.color5 },\n  },\n  inactive = {\n    a = { fg = colors.color9, bg = colors.color10, gui = 'bold' },\n    b = { fg = colors.color9, bg = colors.color10 },\n    c = { fg = colors.color9, bg = colors.color10 },\n  },\n  normal = {\n    a = { fg = colors.color11, bg = colors.color12, gui = 'bold' },\n    b = { fg = colors.color4, bg = colors.color5 },\n    c = { fg = colors.color4, bg = colors.color10 },\n  },\n  insert = {\n    a = { fg = colors.color2, bg = colors.color15, gui = 'bold' },\n    b = { fg = colors.color4, bg = colors.color5 },\n  },\n}\n"
  },
  {
    "path": "lua/lualine/themes/iceberg_light.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Generated by lightline to lualine theme converter\n-- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9\n-- stylua: ignore\nlocal colors = {\n  color5   = '#668e3d',\n  color8   = '#757ca3',\n  color9   = '#8b98b6',\n  color10  = '#cad0de',\n  color11  = '#2d539e',\n  color0   = '#e8e9ec',\n  color1   = '#9fa6c0',\n  color2   = '#c57339',\n}\n\nreturn {\n  replace = {\n    b = { fg = colors.color0, bg = colors.color1 },\n    a = { fg = colors.color0, bg = colors.color2, gui = 'bold' },\n  },\n  visual = {\n    b = { fg = colors.color0, bg = colors.color1 },\n    a = { fg = colors.color0, bg = colors.color5, gui = 'bold' },\n  },\n  normal = {\n    b = { fg = colors.color0, bg = colors.color1 },\n    a = { fg = colors.color0, bg = colors.color8, gui = 'bold' },\n    c = { fg = colors.color9, bg = colors.color10 },\n  },\n  inactive = {\n    b = { fg = colors.color9, bg = colors.color10 },\n    a = { fg = colors.color9, bg = colors.color10, gui = 'bold' },\n    c = { fg = colors.color9, bg = colors.color10 },\n  },\n  insert = {\n    b = { fg = colors.color0, bg = colors.color1 },\n    a = { fg = colors.color0, bg = colors.color11, gui = 'bold' },\n  },\n}\n"
  },
  {
    "path": "lua/lualine/themes/jellybeans.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Generated by lightline to lualine theme converter\n-- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9\n-- stylua: ignore\nlocal colors = {\n  color2   = '#30302c',\n  color3   = '#f0a0c0',\n  color4   = '#e8e8d3',\n  color5   = '#4e4e43',\n  color8   = '#cf6a4c',\n  color9   = '#666656',\n  color10  = '#808070',\n  color11  = '#8197bf',\n  color14  = '#99ad6a',\n}\n\nreturn {\n  visual = {\n    a = { fg = colors.color2, bg = colors.color3, gui = 'bold' },\n    b = { fg = colors.color4, bg = colors.color5 },\n  },\n  replace = {\n    a = { fg = colors.color2, bg = colors.color8, gui = 'bold' },\n    b = { fg = colors.color4, bg = colors.color5 },\n  },\n  inactive = {\n    c = { fg = colors.color9, bg = colors.color2 },\n    a = { fg = colors.color10, bg = colors.color2, gui = 'bold' },\n    b = { fg = colors.color9, bg = colors.color2 },\n  },\n  normal = {\n    c = { fg = colors.color10, bg = colors.color2 },\n    a = { fg = colors.color2, bg = colors.color11, gui = 'bold' },\n    b = { fg = colors.color4, bg = colors.color5 },\n  },\n  insert = {\n    a = { fg = colors.color2, bg = colors.color14, gui = 'bold' },\n    b = { fg = colors.color4, bg = colors.color5 },\n  },\n}\n"
  },
  {
    "path": "lua/lualine/themes/material.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Credit: Lokesh Krishna(lightline)\n-- stylua: ignore\nlocal colors = {\n  fg     = '#eeffff',\n  bg     = '#263238',\n  blue   = '#82aaff',\n  green  = '#c3e88d',\n  purple = '#c792ea',\n  red1   = '#f07178',\n  red2   = '#ff5370',\n  yellow = '#ffcb6b',\n  gray1  = '#314549',\n  gray2  = '#2E3C43',\n  gray3  = '#515559',\n}\n\nreturn {\n  normal = {\n    a = { fg = colors.bg, bg = colors.blue, gui = 'bold' },\n    b = { fg = colors.fg, bg = colors.gray3 },\n    c = { fg = colors.fg, bg = colors.gray2 },\n  },\n  insert = {\n    a = { fg = colors.bg, bg = colors.green, gui = 'bold' },\n    b = { fg = colors.fg, bg = colors.gray3 },\n  },\n  visual = {\n    a = { fg = colors.bg, bg = colors.purple, gui = 'bold' },\n    b = { fg = colors.fg, bg = colors.gray3 },\n  },\n  replace = {\n    a = { fg = colors.bg, bg = colors.red1, gui = 'bold' },\n    b = { fg = colors.fg, bg = colors.gray3 },\n  },\n  inactive = {\n    a = { fg = colors.fg, bg = colors.bg, gui = 'bold' },\n    b = { fg = colors.fg, bg = colors.bg },\n    c = { fg = colors.fg, bg = colors.gray2 },\n  },\n}\n"
  },
  {
    "path": "lua/lualine/themes/modus-vivendi.lua",
    "content": "-- Copyright (c) 2020-2021 ronniedroid\n-- MIT license, see LICENSE for more details.\n-- stylua: ignore\nlocal colors = {\n    black     = '#000000',\n    white     = '#eeeeee',\n    red       = '#ffa0a0',\n    green     = '#88cf88',\n    blue      = '#92baff',\n    magenta   = '#feacd0',\n    cyan      = '#a0bfdf',\n    gray      = '#2f2f2f',\n    darkgray  = '#202020',\n    lightgray = '#434343'\n}\n\nreturn {\n  normal = {\n    a = { bg = colors.blue, fg = colors.lightgray, gui = 'bold' },\n    b = { bg = colors.lightgray, fg = colors.blue },\n    c = { bg = colors.gray, fg = colors.white },\n  },\n  insert = {\n    a = { bg = colors.cyan, fg = colors.lightgray, gui = 'bold' },\n    b = { bg = colors.lightgray, fg = colors.cyan },\n    c = { bg = colors.gray, fg = colors.white },\n  },\n  visual = {\n    a = { bg = colors.magenta, fg = colors.lightgray, gui = 'bold' },\n    b = { bg = colors.lightgray, fg = colors.magenta },\n    c = { bg = colors.gray, fg = colors.white },\n  },\n  replace = {\n    a = { bg = colors.red, fg = colors.lightgray, gui = 'bold' },\n    b = { bg = colors.lightgray, fg = colors.red },\n    c = { bg = colors.gray, fg = colors.white },\n  },\n  command = {\n    a = { bg = colors.green, fg = colors.lightgray, gui = 'bold' },\n    b = { bg = colors.lightgray, fg = colors.green },\n    c = { bg = colors.gray, fg = colors.white },\n  },\n  inactive = {\n    a = { bg = colors.darkgray, fg = colors.lightgray, gui = 'bold' },\n    b = { bg = colors.darkgray, fg = colors.lightgray },\n    c = { bg = colors.darkgray, fg = colors.lightgray },\n  },\n}\n"
  },
  {
    "path": "lua/lualine/themes/molokai.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Credit: challsted(lightline)\n-- stylua: ignore\nlocal colors = {\n  black  = '#232526',\n  gray   = '#808080',\n  white  = '#f8f8f2',\n  cyan   = '#66d9ef',\n  green  = '#a6e22e',\n  orange = '#ef5939',\n  pink   = '#f92672',\n  red    = '#ff0000',\n  yellow = '#e6db74',\n}\n\nreturn {\n  normal = {\n    a = { fg = colors.black, bg = colors.cyan, gui = 'bold' },\n    b = { fg = colors.black, bg = colors.pink },\n    c = { fg = colors.orange, bg = colors.black },\n  },\n  insert = { a = { fg = colors.black, bg = colors.green, gui = 'bold' } },\n  visual = { a = { fg = colors.black, bg = colors.yellow, gui = 'bold' } },\n  replace = { a = { fg = colors.black, bg = colors.red, gui = 'bold' } },\n  inactive = {\n    a = { fg = colors.pink, bg = colors.black, gui = 'bold' },\n    b = { fg = colors.white, bg = colors.pink },\n    c = { fg = colors.gray, bg = colors.black },\n  },\n}\n"
  },
  {
    "path": "lua/lualine/themes/moonfly.lua",
    "content": "-- moonfly color scheme for lualine\n--\n-- URL:     github.com/bluz71/vim-moonfly-colors\n-- License: MIT (https://opensource.org/licenses/MIT)\n\n-- stylua: ignore\nlocal colors = {\n  color3   = '#303030',\n  color6   = '#9e9e9e',\n  color7   = '#80a0ff',\n  color8   = '#ae81ff',\n  color0   = '#1c1c1c',\n  color1   = '#ff5189',\n  color2   = '#c6c6c6',\n}\n\nreturn {\n  replace = {\n    a = { fg = colors.color0, bg = colors.color1, gui = 'bold' },\n    b = { fg = colors.color2, bg = colors.color3 },\n  },\n  inactive = {\n    a = { fg = colors.color6, bg = colors.color3, gui = 'bold' },\n    b = { fg = colors.color6, bg = colors.color3 },\n    c = { fg = colors.color6, bg = colors.color3 },\n  },\n  normal = {\n    a = { fg = colors.color0, bg = colors.color7, gui = 'bold' },\n    b = { fg = colors.color2, bg = colors.color3 },\n    c = { fg = colors.color2, bg = colors.color3 },\n  },\n  visual = {\n    a = { fg = colors.color0, bg = colors.color8, gui = 'bold' },\n    b = { fg = colors.color2, bg = colors.color3 },\n  },\n  insert = {\n    a = { fg = colors.color0, bg = colors.color2, gui = 'bold' },\n    b = { fg = colors.color2, bg = colors.color3 },\n  },\n}\n"
  },
  {
    "path": "lua/lualine/themes/nightfly.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- stylua: ignore\nlocal colors = {\n  color3   = '#2c3043',\n  color6   = '#a1aab8',\n  color7   = '#82aaff',\n  color8   = '#ae81ff',\n  color0   = '#092236',\n  color1   = '#ff5874',\n  color2   = '#c3ccdc',\n}\n\nreturn {\n  replace = {\n    a = { fg = colors.color0, bg = colors.color1, gui = 'bold' },\n    b = { fg = colors.color2, bg = colors.color3 },\n  },\n  inactive = {\n    a = { fg = colors.color6, bg = colors.color3, gui = 'bold' },\n    b = { fg = colors.color6, bg = colors.color3 },\n    c = { fg = colors.color6, bg = colors.color3 },\n  },\n  normal = {\n    a = { fg = colors.color0, bg = colors.color7, gui = 'bold' },\n    b = { fg = colors.color2, bg = colors.color3 },\n    c = { fg = colors.color2, bg = colors.color3 },\n  },\n  visual = {\n    a = { fg = colors.color0, bg = colors.color8, gui = 'bold' },\n    b = { fg = colors.color2, bg = colors.color3 },\n  },\n  insert = {\n    a = { fg = colors.color0, bg = colors.color2, gui = 'bold' },\n    b = { fg = colors.color2, bg = colors.color3 },\n  },\n}\n"
  },
  {
    "path": "lua/lualine/themes/nord.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- stylua: ignore\nlocal colors = {\n  nord1  = '#3B4252',\n  nord3  = '#4C566A',\n  nord5  = '#E5E9F0',\n  nord6  = '#ECEFF4',\n  nord7  = '#8FBCBB',\n  nord8  = '#88C0D0',\n  nord13 = '#EBCB8B',\n}\n\nreturn {\n  normal = {\n    a = { fg = colors.nord1, bg = colors.nord8, gui = 'bold' },\n    b = { fg = colors.nord5, bg = colors.nord1 },\n    c = { fg = colors.nord5, bg = colors.nord3 },\n  },\n  insert = { a = { fg = colors.nord1, bg = colors.nord6, gui = 'bold' } },\n  visual = { a = { fg = colors.nord1, bg = colors.nord7, gui = 'bold' } },\n  replace = { a = { fg = colors.nord1, bg = colors.nord13, gui = 'bold' } },\n  inactive = {\n    a = { fg = colors.nord1, bg = colors.nord8, gui = 'bold' },\n    b = { fg = colors.nord5, bg = colors.nord1 },\n    c = { fg = colors.nord5, bg = colors.nord1 },\n  },\n}\n"
  },
  {
    "path": "lua/lualine/themes/onedark.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Credit: Zoltan Dalmadi(lightline)\n-- stylua: ignore\nlocal colors = {\n  blue   = '#61afef',\n  green  = '#98c379',\n  purple = '#c678dd',\n  cyan   = '#56b6c2',\n  red1   = '#e06c75',\n  red2   = '#be5046',\n  yellow = '#e5c07b',\n  fg     = '#abb2bf',\n  bg     = '#282c34',\n  gray1  = '#828997',\n  gray2  = '#2c323c',\n  gray3  = '#3e4452',\n}\n\nreturn {\n  normal = {\n    a = { fg = colors.bg, bg = colors.green, gui = 'bold' },\n    b = { fg = colors.fg, bg = colors.gray3 },\n    c = { fg = colors.fg, bg = colors.gray2 },\n  },\n  command = { a = { fg = colors.bg, bg = colors.yellow, gui = 'bold' } },\n  insert = { a = { fg = colors.bg, bg = colors.blue, gui = 'bold' } },\n  visual = { a = { fg = colors.bg, bg = colors.purple, gui = 'bold' } },\n  terminal = { a = { fg = colors.bg, bg = colors.cyan, gui = 'bold' } },\n  replace = { a = { fg = colors.bg, bg = colors.red1, gui = 'bold' } },\n  inactive = {\n    a = { fg = colors.gray1, bg = colors.bg, gui = 'bold' },\n    b = { fg = colors.gray1, bg = colors.bg },\n    c = { fg = colors.gray1, bg = colors.gray2 },\n  },\n}\n"
  },
  {
    "path": "lua/lualine/themes/onelight.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Credit: Zoltan Dalmadi(lightline)\n-- stylua: ignore\nlocal colors = {\n  blue   = '#4078f2',\n  green  = '#50a14f',\n  purple = '#a626a4',\n  red1   = '#e45649',\n  red2   = '#ca1243',\n  yellow = '#c18401',\n  fg     = '#494b53',\n  bg     = '#fafafa',\n  gray1  = '#696c77',\n  gray2  = '#f0f0f0',\n  gray3  = '#d0d0d0',\n}\n\nreturn {\n  normal = {\n    a = { fg = colors.bg, bg = colors.green, gui = 'bold' },\n    b = { fg = colors.fg, bg = colors.gray3 },\n    c = { fg = colors.fg, bg = colors.gray2 },\n  },\n  command = { a = { fg = colors.bg, bg = colors.yellow, gui = 'bold' } },\n  insert = { a = { fg = colors.bg, bg = colors.blue, gui = 'bold' } },\n  visual = { a = { fg = colors.bg, bg = colors.purple, gui = 'bold' } },\n  replace = { a = { fg = colors.bg, bg = colors.red1, gui = 'bold' } },\n  inactive = {\n    a = { fg = colors.bg, bg = colors.gray3, gui = 'bold' },\n    b = { fg = colors.bg, bg = colors.gray3 },\n    c = { fg = colors.gray3, bg = colors.gray2 },\n  },\n}\n"
  },
  {
    "path": "lua/lualine/themes/palenight.lua",
    "content": "-- Copyright (c) 2020-2021 IGI-111\n-- MIT license, see LICENSE for more details.\n-- stylua: ignore\nlocal colors = {\n  vertsplit      = '#181A1F',\n  special_grey   = '#3B4048',\n  menu_grey      = '#3E4452',\n  cursor_grey    = '#2C323C',\n  gutter_fg_grey = '#4B5263',\n  blue           = '#82b1ff',\n  dark_red       = '#BE5046',\n  white          = '#bfc7d5',\n  green          = '#C3E88D',\n  purple         = '#c792ea',\n  yellow         = '#ffcb6b',\n  light_red      = '#ff869a',\n  red            = '#ff5370',\n  dark_yellow    = '#F78C6C',\n  cyan           = '#89DDFF',\n  comment_grey   = '#697098',\n  black          = '#292D3E',\n}\n\nreturn {\n  normal = {\n    a = { fg = colors.black, bg = colors.purple, gui = 'bold' },\n    b = { fg = colors.purple, bg = colors.menu_grey },\n    c = { fg = colors.comment_grey, bg = colors.black },\n  },\n  insert = {\n    a = { fg = colors.black, bg = colors.blue, gui = 'bold' },\n    b = { fg = colors.blue, bg = colors.menu_grey },\n  },\n  visual = {\n    a = { fg = colors.black, bg = colors.cyan, gui = 'bold' },\n    b = { fg = colors.cyan, bg = colors.menu_grey },\n  },\n  replace = {\n    a = { fg = colors.black, bg = colors.green, gui = 'bold' },\n    b = { fg = colors.green, bg = colors.menu_grey },\n  },\n  inactive = {\n    a = { fg = colors.black, bg = colors.menu_grey, gui = 'bold' },\n    b = { fg = colors.black, bg = colors.menu_grey },\n    c = { fg = colors.black, bg = colors.menu_grey },\n  },\n}\n"
  },
  {
    "path": "lua/lualine/themes/papercolor_dark.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Credit: TKNGUE(lightline)\n-- stylua: ignore\nlocal colors = {\n  red                    = '#df0000',\n  green                  = '#008700',\n  blue                   = '#00afaf',\n  pink                   = '#afdf00',\n  olive                  = '#dfaf5f',\n  navy                   = '#df875f',\n  orange                 = '#d75f00',\n  purple                 = '#8959a8',\n  aqua                   = '#3e999f',\n  foreground             = '#d0d0d0',\n  background             = '#444444',\n  window                 = '#efefef',\n  status                 = '#c6c6c6',\n  error                  = '#5f0000',\n  statusline_active_fg   = '#1c1c1c',\n  statusline_active_bg   = '#5f8787',\n  statusline_inactive_fg = '#c6c6c6',\n  statusline_inactive_bg = '#444444',\n  visual_fg              = '#000000',\n  visual_bg              = '#8787af',\n}\n\nreturn {\n  normal = {\n    a = { fg = colors.foreground, bg = colors.background, gui = 'bold' },\n    b = { fg = colors.statusline_active_fg, bg = colors.status },\n    c = { fg = colors.statusline_active_fg, bg = colors.statusline_active_bg },\n  },\n  insert = { a = { fg = colors.background, bg = colors.blue, gui = 'bold' } },\n  visual = { a = { fg = colors.visual_fg, bg = colors.visual_bg, gui = 'bold' } },\n  replace = { a = { fg = colors.background, bg = colors.pink, gui = 'bold' } },\n  inactive = {\n    a = { fg = colors.foreground, bg = colors.background, gui = 'bold' },\n    b = { fg = colors.foreground, bg = colors.background },\n    c = { fg = colors.foreground, bg = colors.background },\n  },\n}\n"
  },
  {
    "path": "lua/lualine/themes/papercolor_light.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Credit: TKNGUE(lightline)\n-- stylua: ignore\nlocal colors = {\n  red                    = '#df0000',\n  green                  = '#008700',\n  blue                   = '#4271ae',\n  pink                   = '#d7005f',\n  olive                  = '#718c00',\n  navy                   = '#005f87',\n  orange                 = '#d75f00',\n  purple                 = '#8959a8',\n  aqua                   = '#3e999f',\n  foreground             = '#4d4d4c',\n  background             = '#F5F5F5',\n  window                 = '#efefef',\n  status                 =  '#3e999f',\n  error                  = '#ffafdf',\n  statusline_active_fg   =  '#efefef',\n  statusline_active_bg   =  '#005f87',\n  statusline_inactive_fg =  '#4d4d4c',\n  statusline_inactive_bg = '#dadada',\n}\n\nreturn {\n  normal = {\n    a = { fg = colors.foreground, bg = colors.background, gui = 'bold' },\n    b = { fg = colors.statusline_active_fg, bg = colors.status },\n    c = { fg = colors.statusline_active_fg, bg = colors.statusline_active_bg },\n  },\n  insert = { a = { fg = colors.blue, bg = colors.background, gui = 'bold' } },\n  visual = { a = { fg = colors.background, bg = colors.orange, gui = 'bold' } },\n  replace = { a = { fg = colors.background, bg = colors.pink, gui = 'bold' } },\n  inactive = {\n    a = { fg = colors.foreground, bg = colors.background, gui = 'bold' },\n    b = { fg = colors.foreground, bg = colors.background },\n    c = { fg = colors.foreground, bg = colors.background },\n  },\n}\n"
  },
  {
    "path": "lua/lualine/themes/powerline.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- stylua: ignore\nlocal Colors = {\n  white          = '#ffffff',\n  darkestgreen   = '#005f00',\n  brightgreen    = '#afdf00',\n  darkestcyan    = '#005f5f',\n  mediumcyan     = '#87dfff',\n  darkestblue    = '#005f87',\n  darkred        = '#870000',\n  brightred      = '#df0000',\n  brightorange   = '#ff8700',\n  gray1          = '#262626',\n  gray2          = '#303030',\n  gray4          = '#585858',\n  gray5          = '#606060',\n  gray7          = '#9e9e9e',\n  gray10         = '#f0f0f0',\n}\n\nlocal M = {\n  normal = {\n    a = { fg = Colors.darkestgreen, bg = Colors.brightgreen, gui = 'bold' },\n    b = { fg = Colors.gray10, bg = Colors.gray5 },\n    c = { fg = Colors.gray7, bg = Colors.gray2 },\n  },\n  insert = {\n    a = { fg = Colors.darkestcyan, bg = Colors.white, gui = 'bold' },\n    b = { fg = Colors.darkestcyan, bg = Colors.mediumcyan },\n    c = { fg = Colors.mediumcyan, bg = Colors.darkestblue },\n  },\n  visual = { a = { fg = Colors.darkred, bg = Colors.brightorange, gui = 'bold' } },\n  replace = { a = { fg = Colors.white, bg = Colors.brightred, gui = 'bold' } },\n  inactive = {\n    a = { fg = Colors.gray1, bg = Colors.gray5, gui = 'bold' },\n    b = { fg = Colors.gray1, bg = Colors.gray5 },\n    c = { bg = Colors.gray1, fg = Colors.gray5 },\n  },\n}\n\nM.terminal = M.insert\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/themes/powerline_dark.lua",
    "content": "-- Copyright (c) 2021 Ashish Panigrahi\n-- MIT license, see LICENSE for more details.\n-- stylua: ignore\nlocal colors = {\n  black        = '#202020',\n  neon         = '#DFFF00',\n  white        = '#FFFFFF',\n  green        = '#00D700',\n  purple       = '#5F005F',\n  blue         = '#00DFFF',\n  darkblue     = '#00005F',\n  navyblue     = '#000080',\n  brightgreen  = '#9CFFD3',\n  gray         = '#444444',\n  darkgray     = '#3c3836',\n  lightgray    = '#504945',\n  inactivegray = '#7c6f64',\n  orange       = '#FFAF00',\n  red          = '#5F0000',\n  brightorange = '#C08A20',\n  brightred    = '#AF0000',\n  cyan         = '#00DFFF',\n}\n\nlocal M = {\n  normal = {\n    a = { bg = colors.neon, fg = colors.black, gui = 'bold' },\n    b = { bg = colors.gray, fg = colors.white },\n    c = { bg = colors.black, fg = colors.brightgreen },\n  },\n  insert = {\n    a = { bg = colors.blue, fg = colors.darkblue, gui = 'bold' },\n    b = { bg = colors.navyblue, fg = colors.white },\n    c = { bg = colors.purple, fg = colors.white },\n  },\n  visual = {\n    a = { bg = colors.orange, fg = colors.black, gui = 'bold' },\n    b = { bg = colors.darkgray, fg = colors.white },\n    c = { bg = colors.red, fg = colors.white },\n  },\n  replace = {\n    a = { bg = colors.brightred, fg = colors.white, gui = 'bold' },\n    b = { bg = colors.cyan, fg = colors.darkblue },\n    c = { bg = colors.navyblue, fg = colors.white },\n  },\n  command = {\n    a = { bg = colors.green, fg = colors.black, gui = 'bold' },\n    b = { bg = colors.darkgray, fg = colors.white },\n    c = { bg = colors.black, fg = colors.brightgreen },\n  },\n  inactive = {\n    a = { bg = colors.darkgray, fg = colors.gray, gui = 'bold' },\n    b = { bg = colors.darkgray, fg = colors.gray },\n    c = { bg = colors.darkgray, fg = colors.gray },\n  },\n}\n\nM.terminal = M.insert\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/themes/pywal.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n\nlocal lualine_require = require('lualine_require')\nlocal modules = lualine_require.lazy_require {\n  utils_notices = 'lualine.utils.notices',\n}\nlocal sep = package.config:sub(1, 1)\nlocal wal_colors_path = table.concat({ os.getenv('HOME'), '.cache', 'wal', 'colors.sh' }, sep)\nlocal wal_colors_file = io.open(wal_colors_path, 'r')\n\nif wal_colors_file == nil then\n  modules.utils_notices.add_notice('lualine.nvim: ' .. wal_colors_path .. ' not found')\n  error('')\nend\n\nlocal ok, wal_colors_text = pcall(wal_colors_file.read, wal_colors_file, '*a')\nwal_colors_file:close()\n\nif not ok then\n  modules.utils_notices.add_notice('lualine.nvim: ' .. wal_colors_path .. ' could not be read: ' .. wal_colors_text)\n  error('')\nend\n\nlocal colors = {}\n\nfor line in vim.gsplit(wal_colors_text, '\\n') do\n  if line:match(\"^[a-z0-9]+='#[a-fA-F0-9]+'$\") ~= nil then\n    local i = line:find('=')\n    local key = line:sub(0, i - 1)\n    local value = line:sub(i + 2, #line - 1)\n    colors[key] = value\n  end\nend\n\nreturn {\n  normal = {\n    a = { fg = colors.background, bg = colors.color4, gui = 'bold' },\n    b = { fg = colors.foreground, bg = colors.color8 },\n    c = { fg = colors.foreground, bg = colors.background },\n  },\n  insert = { a = { fg = colors.background, bg = colors.color2, gui = 'bold' } },\n  visual = { a = { fg = colors.background, bg = colors.color3, gui = 'bold' } },\n  replace = { a = { fg = colors.background, bg = colors.color1, gui = 'bold' } },\n  inactive = {\n    a = { fg = colors.foreground, bg = colors.background, gui = 'bold' },\n    b = { fg = colors.foreground, bg = colors.background },\n    c = { fg = colors.foreground, bg = colors.background },\n  },\n}\n"
  },
  {
    "path": "lua/lualine/themes/seoul256.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Generated by lightline to lualine theme converter\n-- https://gist.github.com/shadmansaleh/000871c9a608a012721c6acc6d7a19b9\n-- stylua: ignore\nlocal colors = {\n  color5   = '#d7afaf',\n  color6   = '#666656',\n  color7   = '#808070',\n  color10  = '#87af87',\n  color13  = '#df5f87',\n  color14  = '#87afaf',\n  color0   = '#e8e8d3',\n  color1   = '#4e4e43',\n  color4   = '#30302c',\n}\n\nreturn {\n  visual = {\n    b = { fg = colors.color0, bg = colors.color1 },\n    a = { fg = colors.color4, bg = colors.color5, gui = 'bold' },\n  },\n  inactive = {\n    b = { fg = colors.color6, bg = colors.color4 },\n    c = { fg = colors.color6, bg = colors.color4 },\n    a = { fg = colors.color7, bg = colors.color4, gui = 'bold' },\n  },\n  insert = {\n    b = { fg = colors.color0, bg = colors.color1 },\n    a = { fg = colors.color4, bg = colors.color10, gui = 'bold' },\n  },\n  replace = {\n    b = { fg = colors.color0, bg = colors.color1 },\n    a = { fg = colors.color4, bg = colors.color13, gui = 'bold' },\n  },\n  normal = {\n    b = { fg = colors.color0, bg = colors.color1 },\n    c = { fg = colors.color7, bg = colors.color4 },\n    a = { fg = colors.color4, bg = colors.color14, gui = 'bold' },\n  },\n}\n"
  },
  {
    "path": "lua/lualine/themes/solarized.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Credit: itchyny(lightline)\n-- License: MIT License\nlocal background = vim.opt.background:get()\n\nreturn require('lualine.themes.solarized_' .. background)\n"
  },
  {
    "path": "lua/lualine/themes/solarized_dark.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Credit: itchyny(lightline)\n-- stylua: ignore\nlocal colors = {\n  base03  =  '#002b36',\n  base02  =  '#073642',\n  base01  =  '#586e75',\n  base00  =  '#657b83',\n  base0   =  '#839496',\n  base1   =  '#93a1a1',\n  base2   =  '#eee8d5',\n  base3   =  '#fdf6e3',\n  yellow  =  '#b58900',\n  orange  =  '#cb4b16',\n  red     =  '#dc322f',\n  magenta =  '#d33682',\n  violet  =  '#6c71c4',\n  blue    =  '#268bd2',\n  cyan    =  '#2aa198',\n  green   =  '#859900',\n}\n\nreturn {\n  normal = {\n    a = { fg = colors.base03, bg = colors.blue, gui = 'bold' },\n    b = { fg = colors.base03, bg = colors.base1 },\n    c = { fg = colors.base1, bg = colors.base02 },\n  },\n  insert = { a = { fg = colors.base03, bg = colors.green, gui = 'bold' } },\n  visual = { a = { fg = colors.base03, bg = colors.magenta, gui = 'bold' } },\n  replace = { a = { fg = colors.base03, bg = colors.red, gui = 'bold' } },\n  inactive = {\n    a = { fg = colors.base0, bg = colors.base02, gui = 'bold' },\n    b = { fg = colors.base03, bg = colors.base00 },\n    c = { fg = colors.base01, bg = colors.base02 },\n  },\n}\n"
  },
  {
    "path": "lua/lualine/themes/solarized_light.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Credit: itchyny(lightline)\n-- stylua: ignore\nlocal colors = {\n  base3   =  '#002b36',\n  base2   =  '#073642',\n  base1   =  '#586e75',\n  base0   =  '#657b83',\n  base00  =  '#839496',\n  base01  =  '#93a1a1',\n  base02  =  '#eee8d5',\n  base03  =  '#fdf6e3',\n  yellow  =  '#b58900',\n  orange  =  '#cb4b16',\n  red     =  '#dc322f',\n  magenta =  '#d33682',\n  violet  =  '#6c71c4',\n  blue    =  '#268bd2',\n  cyan    =  '#2aa198',\n  green   =  '#859900',\n}\n\nreturn {\n  normal = {\n    a = { fg = colors.base03, bg = colors.blue, gui = 'bold' },\n    b = { fg = colors.base03, bg = colors.base1 },\n    c = { fg = colors.base1, bg = colors.base02 },\n  },\n  insert = { a = { fg = colors.base03, bg = colors.green, gui = 'bold' } },\n  visual = { a = { fg = colors.base03, bg = colors.magenta, gui = 'bold' } },\n  replace = { a = { fg = colors.base03, bg = colors.red, gui = 'bold' } },\n  inactive = {\n    a = { fg = colors.base0, bg = colors.base02, gui = 'bold' },\n    b = { fg = colors.base03, bg = colors.base00 },\n    c = { fg = colors.base01, bg = colors.base02 },\n  },\n}\n"
  },
  {
    "path": "lua/lualine/themes/tomorrow_night.lua",
    "content": "local colors = {\n  bg = '#282a2e',\n  alt_bg = '#373b41',\n  dark_fg = '#969896',\n  fg = '#b4b7b4',\n  light_fg = '#c5c8c6',\n  normal = '#81a2be',\n  insert = '#b5bd68',\n  visual = '#b294bb',\n  replace = '#de935f',\n}\n\nlocal theme = {\n  normal = {\n    a = { fg = colors.bg, bg = colors.normal },\n    b = { fg = colors.light_fg, bg = colors.alt_bg },\n    c = { fg = colors.fg, bg = colors.bg },\n  },\n  replace = {\n    a = { fg = colors.bg, bg = colors.replace },\n    b = { fg = colors.light_fg, bg = colors.alt_bg },\n  },\n  insert = {\n    a = { fg = colors.bg, bg = colors.insert },\n    b = { fg = colors.light_fg, bg = colors.alt_bg },\n  },\n  visual = {\n    a = { fg = colors.bg, bg = colors.visual },\n    b = { fg = colors.light_fg, bg = colors.alt_bg },\n  },\n  inactive = {\n    a = { fg = colors.dark_fg, bg = colors.bg },\n    b = { fg = colors.dark_fg, bg = colors.bg },\n    c = { fg = colors.dark_fg, bg = colors.bg },\n  },\n}\n\ntheme.command = theme.normal\ntheme.terminal = theme.insert\n\nreturn theme\n"
  },
  {
    "path": "lua/lualine/themes/wombat.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n-- Credit: itchyny(lightline)\n-- stylua: ignore\nlocal colors = {\n  base03  = '#242424',\n  base023 = '#353535',\n  base02  = '#444444',\n  base01  = '#585858',\n  base00  = '#666666',\n  base0   = '#808080',\n  base1   = '#969696',\n  base2   = '#a8a8a8',\n  base3   = '#d0d0d0',\n  yellow  = '#cae682',\n  orange  = '#e5786d',\n  red     = '#e5786d',\n  magenta = '#f2c68a',\n  blue    = '#8ac6f2',\n  cyan    = '#8ac6f2',\n  green   = '#95e454',\n}\n\nreturn {\n  normal = {\n    a = { fg = colors.base02, bg = colors.blue, gui = 'bold' },\n    b = { fg = colors.base02, bg = colors.base0 },\n    c = { fg = colors.base2, bg = colors.base02 },\n  },\n  insert = { a = { fg = colors.base02, bg = colors.green, gui = 'bold' } },\n  visual = { a = { fg = colors.base02, bg = colors.magenta, gui = 'bold' } },\n  replace = { a = { fg = colors.base023, bg = colors.red, gui = 'bold' } },\n  inactive = {\n    a = { fg = colors.base1, bg = colors.base02, gui = 'bold' },\n    b = { fg = colors.base023, bg = colors.base01 },\n    c = { fg = colors.base1, bg = colors.base023 },\n  },\n}\n"
  },
  {
    "path": "lua/lualine/utils/class.lua",
    "content": "-- Adapted from https://github.com/rxi/classic/blob/master/classic.lua\nlocal Object = {}\n\nObject.__index = Object\n\n-- luacheck: push no unused args\n---Initializer\nfunction Object:init(...) end\n-- luacheck: pop\n\n---Extend base class to create a child class\nfunction Object:extend()\n  local cls = {}\n  for k, v in pairs(self) do\n    if k:find('__') == 1 then\n      cls[k] = v\n    end\n  end\n  cls.__index = cls\n  cls.super = self\n  setmetatable(cls, self)\n  return cls\nend\n\n-- luacheck: push no unused args\nfunction Object:__tostring()\n  return 'Object'\nend\n-- luacheck: pop\n\n---Creates a new object\nfunction Object:new(...)\n  local obj = setmetatable({}, self)\n  obj:init(...)\n  return obj\nend\n\n---Creates a new object\nfunction Object:__call(...)\n  return self:new(...)\nend\n\nreturn Object\n"
  },
  {
    "path": "lua/lualine/utils/color_utils.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\nlocal M = {}\n\n-- stylua: ignore start\n-- color conversion\nlocal color_table = {\n  -- lookup table for cterm colors\n  -- format {'color_code', {r,g,b}}\n\n  -- Primary 3-bit (8 colors). Unique representation!\n  {'00', {   0,   0,   0 }},\n  {'01', { 128,   0,   0 }},\n  {'02', {   0, 128,   0 }},\n  {'03', { 128, 128,   0 }},\n  {'04', {   0,   0, 128 }},\n  {'05', { 128,   0, 128 }},\n  {'06', {   0, 128, 128 }},\n  {'07', { 192, 192, 192 }},\n\n  -- equivalent \"bright\" versions of original 8 colors.\n  {'08', { 128, 128, 128 }},\n  {'09', { 255,   0,   0 }},\n  {'10', {   0, 255,   0 }},\n  {'11', { 255, 255,   0 }},\n  {'12', {   0,   0, 255 }},\n  {'13', { 255,   0, 255 }},\n  {'14', {   0, 255, 255 }},\n  {'15', { 255, 255, 255 }},\n\n  -- Strictly ascending.\n  {'16', {   0,   0,   0 }},\n  {'17', {   0,   0,  95 }},\n  {'18', {   0,   0, 135 }},\n  {'19', {   0,   0, 175 }},\n  {'20', {   0,   0, 215 }},\n  {'21', {   0,   0, 255 }},\n  {'22', {   0,  95,   0 }},\n  {'23', {   0,  95,  95 }},\n  {'24', {   0,  95, 135 }},\n  {'25', {   0,  95, 175 }},\n  {'26', {   0,  95, 215 }},\n  {'27', {   0,  95, 255 }},\n  {'28', {   0, 135,   0 }},\n  {'29', {   0, 135,  95 }},\n  {'30', {   0, 135, 135 }},\n  {'31', {   0, 135, 175 }},\n  {'32', {   0, 135, 215 }},\n  {'33', {   0, 135, 255 }},\n  {'34', {   0, 175,   0 }},\n  {'35', {   0, 175,  95 }},\n  {'36', {   0, 175, 135 }},\n  {'37', {   0, 175, 175 }},\n  {'38', {   0, 175, 215 }},\n  {'39', {   0, 175, 255 }},\n  {'40', {   0, 215,   0 }},\n  {'41', {   0, 215,  95 }},\n  {'42', {   0, 215, 135 }},\n  {'43', {   0, 215, 175 }},\n  {'44', {   0, 215, 215 }},\n  {'45', {   0, 215, 255 }},\n  {'46', {   0, 255,   0 }},\n  {'47', {   0, 255,  95 }},\n  {'48', {   0, 255, 135 }},\n  {'49', {   0, 255, 175 }},\n  {'50', {   0, 255, 215 }},\n  {'51', {   0, 255, 255 }},\n  {'52', {  95,   0,   0 }},\n  {'53', {  95,   0,  95 }},\n  {'54', {  95,   0, 135 }},\n  {'55', {  95,   0, 175 }},\n  {'56', {  95,   0, 215 }},\n  {'57', {  95,   0, 255 }},\n  {'58', {  95,  95,   0 }},\n  {'59', {  95,  95,  95 }},\n  {'60', {  95,  95, 135 }},\n  {'61', {  95,  95, 175 }},\n  {'62', {  95,  95, 215 }},\n  {'63', {  95,  95, 255 }},\n  {'64', {  95, 135,   0 }},\n  {'65', {  95, 135,  95 }},\n  {'66', {  95, 135, 135 }},\n  {'67', {  95, 135, 175 }},\n  {'68', {  95, 135, 215 }},\n  {'69', {  95, 135, 255 }},\n  {'70', {  95, 175,   0 }},\n  {'71', {  95, 175,  95 }},\n  {'72', {  95, 175, 135 }},\n  {'73', {  95, 175, 175 }},\n  {'74', {  95, 175, 215 }},\n  {'75', {  95, 175, 255 }},\n  {'76', {  95, 215,   0 }},\n  {'77', {  95, 215,  95 }},\n  {'78', {  95, 215, 135 }},\n  {'79', {  95, 215, 175 }},\n  {'80', {  95, 215, 215 }},\n  {'81', {  95, 215, 255 }},\n  {'82', {  95, 255,   0 }},\n  {'83', {  95, 255,  95 }},\n  {'84', {  95, 255, 135 }},\n  {'85', {  95, 255, 175 }},\n  {'86', {  95, 255, 215 }},\n  {'87', {  95, 255, 255 }},\n  {'88', { 135,   0,   0 }},\n  {'89', { 135,   0,  95 }},\n  {'90', { 135,   0, 135 }},\n  {'91', { 135,   0, 175 }},\n  {'92', { 135,   0, 215 }},\n  {'93', { 135,   0, 255 }},\n  {'94', { 135,  95,   0 }},\n  {'95', { 135,  95,  95 }},\n  {'96', { 135,  95, 135 }},\n  {'97', { 135,  95, 175 }},\n  {'98', { 135,  95, 215 }},\n  {'99', { 135,  95, 255 }},\n  {'100', { 135, 135,   0 }},\n  {'101', { 135, 135,  95 }},\n  {'102', { 135, 135, 135 }},\n  {'103', { 135, 135, 175 }},\n  {'104', { 135, 135, 215 }},\n  {'105', { 135, 135, 255 }},\n  {'106', { 135, 175,   0 }},\n  {'107', { 135, 175,  95 }},\n  {'108', { 135, 175, 135 }},\n  {'109', { 135, 175, 175 }},\n  {'110', { 135, 175, 215 }},\n  {'111', { 135, 175, 255 }},\n  {'112', { 135, 215,   0 }},\n  {'113', { 135, 215,  95 }},\n  {'114', { 135, 215, 135 }},\n  {'115', { 135, 215, 175 }},\n  {'116', { 135, 215, 215 }},\n  {'117', { 135, 215, 255 }},\n  {'118', { 135, 255,   0 }},\n  {'119', { 135, 255,  95 }},\n  {'120', { 135, 255, 135 }},\n  {'121', { 135, 255, 175 }},\n  {'122', { 135, 255, 215 }},\n  {'123', { 135, 255, 255 }},\n  {'124', { 175,   0,   0 }},\n  {'125', { 175,   0,  95 }},\n  {'126', { 175,   0, 135 }},\n  {'127', { 175,   0, 175 }},\n  {'128', { 175,   0, 215 }},\n  {'129', { 175,   0, 255 }},\n  {'130', { 175,  95,   0 }},\n  {'131', { 175,  95,  95 }},\n  {'132', { 175,  95, 135 }},\n  {'133', { 175,  95, 175 }},\n  {'134', { 175,  95, 215 }},\n  {'135', { 175,  95, 255 }},\n  {'136', { 175, 135,   0 }},\n  {'137', { 175, 135,  95 }},\n  {'138', { 175, 135, 135 }},\n  {'139', { 175, 135, 175 }},\n  {'140', { 175, 135, 215 }},\n  {'141', { 175, 135, 255 }},\n  {'142', { 175, 175,   0 }},\n  {'143', { 175, 175,  95 }},\n  {'144', { 175, 175, 135 }},\n  {'145', { 175, 175, 175 }},\n  {'146', { 175, 175, 215 }},\n  {'147', { 175, 175, 255 }},\n  {'148', { 175, 215,   0 }},\n  {'149', { 175, 215,  95 }},\n  {'150', { 175, 215, 135 }},\n  {'151', { 175, 215, 175 }},\n  {'152', { 175, 215, 215 }},\n  {'153', { 175, 215, 255 }},\n  {'154', { 175, 255,   0 }},\n  {'155', { 175, 255,  95 }},\n  {'156', { 175, 255, 135 }},\n  {'157', { 175, 255, 175 }},\n  {'158', { 175, 255, 215 }},\n  {'159', { 175, 255, 255 }},\n  {'160', { 215,   0,   0 }},\n  {'161', { 215,   0,  95 }},\n  {'162', { 215,   0, 135 }},\n  {'163', { 215,   0, 175 }},\n  {'164', { 215,   0, 215 }},\n  {'165', { 215,   0, 255 }},\n  {'166', { 215,  95,   0 }},\n  {'167', { 215,  95,  95 }},\n  {'168', { 215,  95, 135 }},\n  {'169', { 215,  95, 175 }},\n  {'170', { 215,  95, 215 }},\n  {'171', { 215,  95, 255 }},\n  {'172', { 215, 135,   0 }},\n  {'173', { 215, 135,  95 }},\n  {'174', { 215, 135, 135 }},\n  {'175', { 215, 135, 175 }},\n  {'176', { 215, 135, 215 }},\n  {'177', { 215, 135, 255 }},\n  {'178', { 215, 175,   0 }},\n  {'179', { 215, 175,  95 }},\n  {'180', { 215, 175, 135 }},\n  {'181', { 215, 175, 175 }},\n  {'182', { 215, 175, 215 }},\n  {'183', { 215, 175, 255 }},\n  {'184', { 215, 215,   0 }},\n  {'185', { 215, 215,  95 }},\n  {'186', { 215, 215, 135 }},\n  {'187', { 215, 215, 175 }},\n  {'188', { 215, 215, 215 }},\n  {'189', { 215, 215, 255 }},\n  {'190', { 215, 255,   0 }},\n  {'191', { 215, 255,  95 }},\n  {'192', { 215, 255, 135 }},\n  {'193', { 215, 255, 175 }},\n  {'194', { 215, 255, 215 }},\n  {'195', { 215, 255, 255 }},\n  {'196', { 255,   0,   0 }},\n  {'197', { 255,   0,  95 }},\n  {'198', { 255,   0, 135 }},\n  {'199', { 255,   0, 175 }},\n  {'200', { 255,   0, 215 }},\n  {'201', { 255,   0, 255 }},\n  {'202', { 255,  95,   0 }},\n  {'203', { 255,  95,  95 }},\n  {'204', { 255,  95, 135 }},\n  {'205', { 255,  95, 175 }},\n  {'206', { 255,  95, 215 }},\n  {'207', { 255,  95, 255 }},\n  {'208', { 255, 135,   0 }},\n  {'209', { 255, 135,  95 }},\n  {'210', { 255, 135, 135 }},\n  {'211', { 255, 135, 175 }},\n  {'212', { 255, 135, 215 }},\n  {'213', { 255, 135, 255 }},\n  {'214', { 255, 175,   0 }},\n  {'215', { 255, 175,  95 }},\n  {'216', { 255, 175, 135 }},\n  {'217', { 255, 175, 175 }},\n  {'218', { 255, 175, 215 }},\n  {'219', { 255, 175, 255 }},\n  {'220', { 255, 215,   0 }},\n  {'221', { 255, 215,  95 }},\n  {'222', { 255, 215, 135 }},\n  {'223', { 255, 215, 175 }},\n  {'224', { 255, 215, 215 }},\n  {'225', { 255, 215, 255 }},\n  {'226', { 255, 255,   0 }},\n  {'227', { 255, 255,  95 }},\n  {'228', { 255, 255, 135 }},\n  {'229', { 255, 255, 175 }},\n  {'230', { 255, 255, 215 }},\n  {'231', { 255, 255, 255 }},\n\n  -- Gray-scale range.\n  {'232', {   8,   8,   8 }},\n  {'233', {  18,  18,  18 }},\n  {'234', {  28,  28,  28 }},\n  {'235', {  38,  38,  38 }},\n  {'236', {  48,  48,  48 }},\n  {'237', {  58,  58,  58 }},\n  {'238', {  68,  68,  68 }},\n  {'239', {  78,  78,  78 }},\n  {'240', {  88,  88,  88 }},\n  {'241', {  98,  98,  98 }},\n  {'242', { 108, 108, 108 }},\n  {'243', { 118, 118, 118 }},\n  {'244', { 128, 128, 128 }},\n  {'245', { 138, 138, 138 }},\n  {'246', { 148, 148, 148 }},\n  {'247', { 158, 158, 158 }},\n  {'248', { 168, 168, 168 }},\n  {'249', { 178, 178, 178 }},\n  {'250', { 188, 188, 188 }},\n  {'251', { 198, 198, 198 }},\n  {'252', { 208, 208, 208 }},\n  {'253', { 218, 218, 218 }},\n  {'254', { 228, 228, 228 }},\n  {'255', { 238, 238, 238 }},\n}\n-- stylua: ignore end\n\n---converts #rrggbb formatted color to cterm ('0'-'255') color\n---@param hex_color string\n---@return string\nfunction M.rgb2cterm(hex_color)\n  if hex_color == 'None' then\n    return 'None'\n  end\n  local function get_color_distance(color1, color2)\n    -- returns how much color2 deviates from color1\n    local dr = math.abs(color1[1] - color2[1]) / (color1[1] + 1) * 100\n    local dg = math.abs(color1[2] - color2[2]) / (color1[2] + 1) * 100\n    local db = math.abs(color1[3] - color2[3]) / (color1[3] + 1) * 100\n    return (dr + dg + db)\n  end\n\n  local r = tonumber(hex_color:sub(2, 3), 16)\n  local g = tonumber(hex_color:sub(4, 5), 16)\n  local b = tonumber(hex_color:sub(6, 7), 16)\n\n  -- check which cterm color is closest to hex colors in terms of rgb values\n  local closest_cterm_color = 0\n  local min_distance = 10000\n  for _, color in ipairs(color_table) do\n    local current_distance = get_color_distance(color[2], { r, g, b })\n    if current_distance < min_distance then\n      min_distance = current_distance\n      closest_cterm_color = color[1]\n    end\n  end\n  return closest_cterm_color\nend\n\n---converts color name (only ones supported by neovim) formatted colors to #rrggbb\n---@param name string like red,green,grey\n---@return string\nfunction M.color_name2rgb(name)\n  local color_val = vim.api.nvim_get_color_by_name(name)\n  if color_val == -1 then\n    return '#' .. name -- Assuming it's 'rrggbb' without # not rad instead of red\n  end\n  return string.format('#%06x', color_val)\nend\n\n---converts cterm(0-255) to #rrggbb\n---@param color number\n---@return string\nfunction M.cterm2rgb(color)\n  local color_data = color_table[color + 1]\n  if color_data ~= nil then\n    color_data = color_data[2]\n    return string.format('#%02x%02x%02x', color_data[1], color_data[2], color_data[3])\n  end\nend\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/utils/fn_store.lua",
    "content": "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 now we are only doing one fn per component)\n---@param fn function the actual function to store.\n---@return number same id that was provided.\nfunction M.register_fn(id, fn)\n  vim.validate {\n    id = { id, 'n' },\n    fn = { fn, 'f' },\n  }\n  fns[id] = fn\n  return id\nend\n\n---Get the function with id\n---@param id number id of the fn to retrieve\n---@return function\nfunction M.get_fn(id)\n  vim.validate { id = { id, 'n' } }\n  return fns[id] or function() end\nend\n\n---Call the function of id with args\n---@param id number\n---@param ... any\n---@return any\nfunction M.call_fn(id, ...)\n  return M.get_fn(id)(...)\nend\n\n---Clear the fns table\nfunction M.clear_fns()\n  fns = {}\nend\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/utils/job.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n\n--- wrapper around job api\n--- creates a job handler when called\nlocal Job = setmetatable({\n  --- start the job\n  start = function(self)\n    self.job_id = vim.fn.jobstart(self.args.cmd, self.args)\n    return self.job_id > 0\n  end,\n  --- stop the job. Also immediately disables io from the job.\n  stop = function(self)\n    if self.killed then\n      return\n    end\n    if self.job_id and self.job_id > 0 then\n      vim.fn.jobstop(self.job_id)\n    end\n    self.job_id = 0\n    self.killed = true\n  end,\n  -- Wraps callbacks so they are only called when job is alive\n  -- This avoids race conditions\n  wrap_cb_alive = function(self, name)\n    local original_cb = self.args[name]\n    if original_cb then\n      self.args[name] = function(...)\n        if not self.killed then\n          return original_cb(...)\n        end\n      end\n    end\n  end,\n}, {\n  ---create new job handler\n  ---@param self table base job table\n  ---@param args table same args as jobstart except cmd is also passed in part of it\n  ---@return table new job handler\n  __call = function(self, args)\n    args = vim.deepcopy(args or {})\n    if type(args.cmd) == 'string' then\n      args.cmd = vim.split(args.cmd, ' ')\n    end\n    self.__index = self\n    local job = setmetatable({ args = args }, self)\n    job:wrap_cb_alive('on_stdout')\n    job:wrap_cb_alive('on_stderr')\n    job:wrap_cb_alive('on_stdin')\n    return job\n  end,\n})\n\nreturn Job\n"
  },
  {
    "path": "lua/lualine/utils/loader.lua",
    "content": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\n\nlocal lualine_require = require('lualine_require')\nlocal require = lualine_require.require\nlocal modules = lualine_require.lazy_require {\n  utils = 'lualine.utils.utils',\n  notice = 'lualine.utils.notices',\n  fn_store = 'lualine.utils.fn_store',\n}\nlocal is_valid_filename = lualine_require.is_valid_filename\nlocal sep = lualine_require.sep\n\n--- function that loads specific type of component\nlocal component_types = {\n  -- loads custom component\n  custom = function(component)\n    return component[1](component)\n  end,\n  --- loads lua functions as component\n  lua_fun = function(component)\n    return require('lualine.components.special.function_component')(component)\n  end,\n  --- loads lua modules as components (ones in /lua/lualine/components/)\n  mod = function(component)\n    local ok, loaded_component = pcall(require, 'lualine.components.' .. component[1])\n    if ok then\n      component.component_name = component[1]\n      if type(loaded_component) == 'table' then\n        loaded_component = loaded_component(component)\n      elseif type(loaded_component) == 'function' then\n        component[1] = loaded_component\n        loaded_component = require('lualine.components.special.function_component')(component)\n      end\n      return loaded_component\n    end\n  end,\n  --- loads builtin statusline patterns as component\n  stl = function(component)\n    local stl_expr = component[1] -- Vim's %p %l statusline elements\n    component[1] = function()\n      return stl_expr\n    end\n    return require('lualine.components.special.function_component')(component)\n  end,\n  --- loads variables & options (g:,go:,b:,bo:...) as components\n  var = function(component)\n    return require('lualine.components.special.vim_var_component')(component)\n  end,\n  --- loads vim functions and lua expressions as components\n  ['_'] = function(component)\n    return require('lualine.components.special.eval_func_component')(component)\n  end,\n}\n\n---load a component from component config\n---@param component table component + component options\n---@return table the loaded & initialized component\nlocal function component_loader(component)\n  if type(component[1]) == 'function' then\n    return component_types.lua_fun(component)\n  elseif type(component[1]) == 'string' then\n    -- load the component\n    if component.type ~= nil then\n      if component_types[component.type] and component.type ~= 'lua_fun' then\n        return component_types[component.type](component)\n      elseif component.type == 'vim_fun' or component.type == 'lua_expr' then\n        return component_types['_'](component)\n      else\n        modules.notice.add_notice(string.format(\n          [[\n### component.type\n\ncomponent type '%s' isn't recognised. Check if spelling is correct.]],\n          component.type\n        ))\n      end\n    end\n    local loaded_component = component_types.mod(component)\n    if loaded_component then\n      return loaded_component\n    elseif string.char(component[1]:byte(1)) == '%' then\n      return component_types.stl(component)\n    elseif component[1]:find('[gvtwb]?o?:') == 1 then\n      return component_types.var(component)\n    else\n      return component_types['_'](component)\n    end\n  elseif type(component[1]) == 'table' then\n    return component_types.custom(component)\n  end\nend\n\n--- Shows notice about invalid types passed as component\n--- @param index number the index of component in section table\n--- @param component table containing component elements\n--- return bool whether check passed or not\nlocal function is_valid_component_type(index, component)\n  if type(component_types) == 'table' and type(index) == 'number' then\n    return true\n  end\n  modules.notice.add_notice(string.format(\n    [[\n### Unrecognized component\nOnly functions, strings and tables can be used as component.\nYou seem to have a `%s` as component indexed as `%s`.\nSomething like:\n```lua\n    %s = %s,\n```\n\nThis commonly occurs when you forget to pass table with option for component.\nWhen a component has option that component needs to be a table which holds\nthe component as first element and the options as key value pairs.\nFor example:\n```lua\nlualine_c = {\n    {'diagnostics',\n        sources = {'nvim'},\n    }\n}\n```\nNotice the inner extra {} surrounding the component and it's options.\nMake sure your config follows this.\n]],\n    type(component),\n    index,\n    index,\n    vim.inspect(component)\n  ))\n  return false\nend\n\n---loads all the section from a config\n---@param sections table list of sections\n---@param options table global options table\nlocal function load_sections(sections, options)\n  for section_name, section in pairs(sections) do\n    for index, component in pairs(section) do\n      if (type(component) == 'string' or type(component) == 'function') or modules.utils.is_component(component) then\n        component = { component }\n      end\n      if is_valid_component_type(index, component) then\n        component.self = {}\n        component.self.section = section_name:match('lualine_(.*)')\n        -- apply default args\n        component = vim.tbl_extend('keep', component, options)\n        section[index] = component_loader(component)\n      end\n    end\n  end\nend\n\n---loads all the configs (active, inactive, tabline)\n---@param config table user config\nlocal function load_components(config)\n  local sec_names = { 'sections', 'inactive_sections', 'tabline', 'winbar', 'inactive_winbar' }\n  for _, section in ipairs(sec_names) do\n    load_sections(config[section], config.options)\n  end\nend\n\n---loads all the extensions\n---@param config table user config\nlocal function load_extensions(config)\n  local loaded_extensions = {}\n  local sec_names = { 'sections', 'inactive_sections', 'winbar', 'inactive_winbar' }\n  for _, extension in pairs(config.extensions) do\n    if type(extension) == 'string' then\n      local ok\n      ok, extension = pcall(require, 'lualine.extensions.' .. extension)\n      if not ok then\n        modules.notice.add_notice(string.format(\n          [[\n### Extensions\nExtension named `%s` was not found . Check if spelling is correct.\n]],\n          extension\n        ))\n      end\n    end\n    if type(extension) == 'table' then\n      local local_extension = modules.utils.deepcopy(extension)\n      for _, section in ipairs(sec_names) do\n        if local_extension[section] then\n          load_sections(local_extension[section], config.options)\n        end\n      end\n      if type(local_extension.init) == 'function' then\n        local_extension.init()\n      end\n      table.insert(loaded_extensions, local_extension)\n    end\n  end\n  config.extensions = loaded_extensions\nend\n\n---loads sections and extensions or entire user config\n---@param config table user config\nlocal function load_all(config)\n  require('lualine.component')._reset_components()\n  modules.fn_store.clear_fns()\n  require('lualine.utils.nvim_opts').reset_cache()\n  load_components(config)\n  load_extensions(config)\nend\n\n---loads a theme from lua module\n---prioritizes external themes (from user config or other plugins) over the bundled ones\n---@param theme_name string\n---@return table theme definition from module\nlocal function load_theme(theme_name)\n  assert(is_valid_filename(theme_name), 'Invalid filename')\n  local retval\n  local path = table.concat { 'lua/lualine/themes/', theme_name, '.lua' }\n  local files = vim.api.nvim_get_runtime_file(path, true)\n  if #files <= 0 then\n    path = table.concat { 'lua/lualine/themes/', theme_name, '/init.lua' }\n    files = vim.api.nvim_get_runtime_file(path, true)\n  end\n  local n_files = #files\n  if n_files == 0 then\n    -- No match found on runtimepath. Fall back to package.path\n    local file =\n      assert(package.searchpath('lualine.themes.' .. theme_name, package.path), 'Theme ' .. theme_name .. ' not found')\n    retval = dofile(file)\n  elseif n_files == 1 then\n    -- when only one is found run that and return it's return value\n    retval = dofile(files[1])\n  else\n    -- put entries from user config path in front\n    local user_config_path = vim.fn.stdpath('config')\n    table.sort(files, function(a, b)\n      local pattern = table.concat { user_config_path, sep }\n      return string.match(a, pattern) or not string.match(b, pattern)\n    end)\n    -- More then 1 found . Use the first one that isn't in lualines repo\n    local lualine_repo_pattern = table.concat({ 'lualine.nvim', 'lua', 'lualine' }, sep)\n    local file_found = false\n    for _, file in ipairs(files) do\n      if not file:find(lualine_repo_pattern) then\n        retval = dofile(file)\n        file_found = true\n        break\n      end\n    end\n    if not file_found then\n      -- This shouldn't happen but somehow we have multiple files but they\n      -- appear to be in lualines repo . Just run the first one\n      retval = dofile(files[1])\n    end\n  end\n  return retval\nend\n\nreturn {\n  load_all = load_all,\n  load_theme = load_theme,\n}\n"
  },
  {
    "path": "lua/lualine/utils/mode.lua",
    "content": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal Mode = {}\n\n-- stylua: ignore\nMode.map = {\n  ['n']      = 'NORMAL',\n  ['no']     = 'O-PENDING',\n  ['nov']    = 'O-PENDING',\n  ['noV']    = 'O-PENDING',\n  ['no\\22'] = 'O-PENDING',\n  ['niI']    = 'NORMAL',\n  ['niR']    = 'NORMAL',\n  ['niV']    = 'NORMAL',\n  ['nt']     = 'NORMAL',\n  ['ntT']    = 'NORMAL',\n  ['v']      = 'VISUAL',\n  ['vs']     = 'VISUAL',\n  ['V']      = 'V-LINE',\n  ['Vs']     = 'V-LINE',\n  ['\\22']   = 'V-BLOCK',\n  ['\\22s']  = 'V-BLOCK',\n  ['s']      = 'SELECT',\n  ['S']      = 'S-LINE',\n  ['\\19']   = 'S-BLOCK',\n  ['i']      = 'INSERT',\n  ['ic']     = 'INSERT',\n  ['ix']     = 'INSERT',\n  ['R']      = 'REPLACE',\n  ['Rc']     = 'REPLACE',\n  ['Rx']     = 'REPLACE',\n  ['Rv']     = 'V-REPLACE',\n  ['Rvc']    = 'V-REPLACE',\n  ['Rvx']    = 'V-REPLACE',\n  ['c']      = 'COMMAND',\n  ['cv']     = 'EX',\n  ['ce']     = 'EX',\n  ['r']      = 'REPLACE',\n  ['rm']     = 'MORE',\n  ['r?']     = 'CONFIRM',\n  ['!']      = 'SHELL',\n  ['t']      = 'TERMINAL',\n}\n\n---@return string current mode name\nfunction Mode.get_mode()\n  local mode_code = vim.api.nvim_get_mode().mode\n  if Mode.map[mode_code] == nil then\n    return mode_code\n  end\n  return Mode.map[mode_code]\nend\n\nreturn Mode\n"
  },
  {
    "path": "lua/lualine/utils/notices.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n\n-- To provide notices for user\nlocal M = {}\nlocal notices = {}\nlocal persistent_notices = {}\n\n---append new notice\n---@param notice string|table table is a list of strings\nfunction M.add_notice(notice)\n  if type(notice) == 'string' then\n    notice = vim.split(notice, '\\n')\n  end\n  if notice[#notice] ~= '' then\n    notice[#notice + 1] = ''\n  end\n  table.insert(notices, notice)\nend\n\n---appends persistent notice. These don't get cleared on setup\n---@param notice string|table table is a list of strings\nfunction M.add_persistent_notice(notice)\n  if type(notice) == 'string' then\n    notice = vim.split(notice, '\\n')\n  end\n  if not vim.tbl_contains(persistent_notices, notice) then\n    table.insert(persistent_notices, notice)\n  end\nend\n\n---show setup :LuaLineNotices and show notification about error when there\n---are notices available\nlocal notify_done = false\nfunction M.notice_message_startup()\n  notify_done = false\n  vim.defer_fn(function()\n    if notify_done then\n      return\n    end\n    if #notices > 0 or #persistent_notices > 0 then\n      vim.cmd('command! -nargs=0 LualineNotices lua require\"lualine.utils.notices\".show_notices()')\n      vim.notify(\n        'lualine: There are some issues with your config. Run :LualineNotices for details',\n        vim.log.levels.WARN,\n        {}\n      )\n    end\n    notify_done = true\n  end, 2000)\nend\n\n---create notice view\nfunction M.show_notices()\n  vim.cmd('silent! keepalt split')\n\n  local winid = vim.api.nvim_get_current_win()\n  local bufnr = vim.api.nvim_create_buf(false, true)\n  vim.api.nvim_win_set_buf(winid, bufnr)\n\n  vim.wo[winid].winfixheight = true\n  vim.wo[winid].winfixwidth = true\n  vim.wo[winid].number = false\n  vim.wo[winid].foldcolumn = '0'\n  vim.wo[winid].relativenumber = false\n  vim.wo[winid].signcolumn = 'no'\n  vim.bo[bufnr].filetype = 'markdown'\n\n  vim.api.nvim_buf_set_keymap(bufnr, 'n', 'q', '<Cmd>bd<CR>', { noremap = true, silent = true })\n\n  local ok, _ = pcall(vim.api.nvim_buf_set_name, 0, 'Lualine Notices')\n  if not ok then\n    vim.notify('Lualine Notices is already open in another buffer', vim.log.levels.ERROR, {})\n    vim.cmd('normal q')\n    return\n  end\n  local notice = vim.tbl_flatten(persistent_notices)\n  notice = vim.list_extend(notice, vim.tbl_flatten(notices))\n  vim.fn.appendbufline(bufnr, 0, notice)\n\n  vim.fn.deletebufline(bufnr, #notice, vim.fn.line('$'))\n  vim.api.nvim_win_set_cursor(winid, { 1, 0 })\n  vim.bo[bufnr].modified = false\n  vim.bo[bufnr].modifiable = false\nend\n\nfunction M.clear_notices()\n  notices = {}\nend\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/utils/nvim_opts.lua",
    "content": "local M = {}\n\n-- keeps backup of options that we cahge so we can restore it.\n-- format:\n-- options {\n--   global = <1> {\n--     name = {prev, set}\n--   },\n--   buffer = {\n--     buf1 = <1>,\n--     buf2 = <1>\n--   },\n--   window = {\n--     win1 = <1>,\n--     win2 = <1>\n--   }\n-- }\n---@class LualineNvimOptCacheOptStore\n---@field prev any\n---@field set any\n---@alias LualineNvimOptCacheOpt table<string, LualineNvimOptCacheOptStore>\n---@class LualineNvimOptCache\n---@field global LualineNvimOptCacheOptStore[]\n---@field buffer table<number, LualineNvimOptCacheOptStore[]>\n---@field window table<number, LualineNvimOptCacheOptStore[]>\n---@type LualineNvimOptCache\nlocal options = { global = {}, buffer = {}, window = {} }\n\n-- helper function for M.set\nlocal function set_opt(name, val, getter_fn, setter_fn, cache_tbl)\n  -- before nvim 0.7 nvim_win_get_option... didn't return default value when\n  -- the option wasn't set instead threw error.\n  -- So we need pcall (probably just for test)\n  local ok, cur = pcall(getter_fn, name)\n  if not ok then\n    cur = nil\n  end\n  if cur == val then\n    return\n  end\n  if cache_tbl[name] == nil then\n    cache_tbl[name] = {}\n  end\n\n  if cache_tbl[name].set ~= cur then\n    if type(cur) ~= 'string' or not cur:find('lualine') then\n      cache_tbl[name].prev = cur\n    end\n  end\n  cache_tbl[name].set = val\n  setter_fn(name, val)\n\n  --  Mitigation for https://github.com/nvim-lualine/lualine.nvim/issues/1323\n  --  when redrawstatus is ran and winbar usues some eval syntax %{} for some\n  --  odd reason nvim renders the winbar in statusline first then actual statusline\n  --  replaces it. Also it doesn't happen on top window. Might be some bug in\n  --  neovims rendering. Also it doesn't seem to happend with laststatus=2 or\n  --  global status turned off in lualine. lualines rendering might be at fault\n  --  too. but we should never be evaluating an externally set winbar so that\n  --  doen't make much sense either.\n  --  Tested: nvim v0.9.5\n  --  TODO: Needs further investigation.\n  if vim.api.nvim_get_mode().mode == 'c' then\n    if name == 'statusline' or name == 'winbar' then\n      vim.cmd('redrawstatus')\n    end\n    if name == 'tabline' then\n      vim.cmd('redrawtabline')\n    end\n  end\nend\n\n-- set a option value\n---@param name string\n---@param val any\n---@param opts table|nil when table can be {global=true | buffer = bufnr | window = winnr}\n---                      when nil it's treated as {global = true}\nfunction M.set(name, val, opts)\n  if opts == nil or opts.global then\n    set_opt(name, val, vim.api.nvim_get_option, vim.api.nvim_set_option, options.global)\n  elseif opts.buffer then\n    if options.buffer[opts.buffer] == nil then\n      options.buffer[opts.buffer] = {}\n    end\n    set_opt(name, val, function(nm)\n      if not vim.tbl_contains(vim.api.nvim_list_bufs(), opts.buffer) then\n        return nil\n      end\n      return vim.api.nvim_buf_get_option(opts.buffer, nm)\n    end, function(nm, vl)\n      if not vim.tbl_contains(vim.api.nvim_list_bufs(), opts.buffer) then\n        return nil\n      end\n      vim.api.nvim_buf_set_option(opts.buffer, nm, vl)\n    end, options.buffer[opts.buffer])\n  elseif opts.window then\n    if options.window[opts.window] == nil then\n      options.window[opts.window] = {}\n    end\n    set_opt(name, val, function(nm)\n      if not vim.tbl_contains(vim.api.nvim_list_wins(), opts.window) then\n        return nil\n      end\n      return vim.api.nvim_win_get_option(opts.window, nm)\n    end, function(nm, vl)\n      if not vim.tbl_contains(vim.api.nvim_list_wins(), opts.window) then\n        return nil\n      end\n      vim.api.nvim_win_set_option(opts.window, nm, vl)\n    end, options.window[opts.window])\n  end\nend\n\n-- resoters old value of option name\n---@param name string\n---@param opts table|nil same as M.set\nfunction M.restore(name, opts)\n  if opts == nil or opts.global then\n    if options.global[name] ~= nil and options.global[name].prev ~= nil then\n      local restore_to = options.global[name].prev\n      if type(restore_to) == 'string' and restore_to:find('lualine') then\n        restore_to = ''\n      end\n      vim.api.nvim_set_option(name, restore_to)\n    end\n  elseif opts.buffer then\n    if\n      options.buffer[opts.buffer] ~= nil\n      and options.buffer[opts.buffer][name] ~= nil\n      and options.buffer[opts.buffer][name].prev ~= nil\n    then\n      local restore_to = options.buffer[opts.buffer][name].prev\n      if type(restore_to) == 'string' and restore_to:find('lualine') then\n        restore_to = ''\n      end\n      vim.api.nvim_buf_set_option(opts.buffer, name, restore_to)\n    end\n  elseif opts.window then\n    if\n      options.window[opts.window] ~= nil\n      and options.window[opts.window][name] ~= nil\n      and options.window[opts.window][name].prev ~= nil\n    then\n      local restore_to = options.window[opts.window][name].prev\n      if type(restore_to) == 'string' and restore_to:find('lualine') then\n        restore_to = ''\n      end\n      vim.api.nvim_win_set_option(opts.window, name, restore_to)\n    end\n  end\nend\n\n-- returns cache for the option name\n---@param name string\n---@param opts table|nil same as M.set\nfunction M.get_cache(name, opts)\n  if opts == nil or opts.global then\n    if options.global[name] ~= nil and options.global[name].prev ~= nil then\n      return options.global[name].prev\n    end\n  elseif opts.buffer then\n    if\n      options.buffer[opts.buffer] ~= nil\n      and options.buffer[opts.buffer][name] ~= nil\n      and options.buffer[opts.buffer][name].prev ~= nil\n    then\n      return options.buffer[opts.buffer][name].prev\n    end\n  elseif opts.window then\n    if\n      options.window[opts.window] ~= nil\n      and options.window[opts.window][name] ~= nil\n      and options.window[opts.window][name].prev ~= nil\n    then\n      return options.window[opts.window][name].prev\n    end\n  end\nend\n\n-- resets cache for options\nfunction M.reset_cache()\n  options = { global = {}, buffer = {}, window = {} }\nend\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/utils/section.lua",
    "content": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal M = {}\nlocal require = require('lualine_require').require\nlocal utils = require('lualine.utils.utils')\nlocal highlight = require('lualine.highlight')\n\n---runs draw function on components in section\n---handles separator edge cases :/\n---also handles default transitional separators at section boundaries\n---(why? I don't know)\n---@param section table list of components\n---@param section_name string used for getting proper hl\n---@param is_focused boolean\n---@return string formatted string for a section\n--TODO Clean this up this does lots of messy stuff.\nfunction M.draw_section(section, section_name, is_focused)\n  local highlight_name = highlight.format_highlight(section_name, is_focused)\n\n  local status = {}\n  for _, component in pairs(section) do\n    -- load components into status table\n    if type(component) ~= 'table' or (type(component) == 'table' and not component.component_no) then\n      return '' -- unknown element in section. section possibly not yet loaded\n    end\n    table.insert(status, component:draw(highlight_name, is_focused))\n  end\n\n  local section_color = utils.extract_highlight_colors(string.match(highlight_name, '%%#(.*)#'))\n\n  -- Flags required for knowing when to remove component separator\n  local strip_next_component = false\n  local last_component_found = false\n  local first_component_no = #section\n\n  -- Check through components to see when component separator need to be removed\n  for component_no = #section, 1, -1 do\n    if #status[component_no] > 0 then\n      first_component_no = component_no\n    end\n    -- Remove component separator with highlight for last component\n    if not last_component_found and #status[component_no] > 0 then\n      last_component_found = true\n      status[component_no] = section[component_no]:strip_separator()\n      if section_name < 'c' then\n        if\n          type(section[first_component_no].options.separator) ~= 'table'\n          and (section[1].options.section_separators.left ~= nil and section[1].options.section_separators.left ~= '')\n        then\n          status[component_no] =\n            string.format('%s%%Z{%s}', status[component_no], section[1].options.section_separators.left)\n        end\n      end\n    end\n    -- Remove component separator when color option is used in next component\n    if strip_next_component then\n      strip_next_component = false\n      status[component_no] = section[component_no]:strip_separator()\n    end\n    -- Remove component separator when color option is used to color background\n    if\n      (\n        type(section[component_no].options.color) == 'table'\n        and section[component_no].options.color.bg\n        and section[component_no].options.color.bg ~= section_color.bg\n      )\n      or type(section[component_no].options.color) == 'string'\n      or (\n        type(section[component_no].options.color) == 'function'\n        and section[component_no].color_fn_cache\n        and section[component_no].color_fn_cache.bg\n        and section[component_no].color_fn_cache.bg ~= section_color.bg\n      )\n    then\n      strip_next_component = true\n      status[component_no] = section[component_no]:strip_separator()\n    end\n\n    if section[component_no].strip_previous_separator == true then\n      strip_next_component = true\n    end\n  end\n\n  local left_separator_string = ''\n  if\n    section_name > 'x'\n    and section[first_component_no]\n    and type(section[first_component_no].options.separator) ~= 'table'\n    and (section[1].options.section_separators.right ~= nil and section[1].options.section_separators.right ~= '')\n  then\n    left_separator_string = string.format(\n      '%%z{%s}',\n      section[first_component_no].options.ls_separator or section[1].options.section_separators.right\n    )\n  end\n\n  -- Remove empty strings from status\n  status = utils.list_shrink(status)\n  local status_str = table.concat(status)\n\n  if #status_str == 0 then\n    return ''\n  end\n\n  local needs_hl\n\n  local find_start_trans_sep_start, find_start_trans_sep_end = status_str:find('^%%z{.-}')\n  if find_start_trans_sep_start then\n    -- the section doesn't need to be prepended with default hl when sections\n    -- first component has transitional sep\n    needs_hl = status_str:find('^%%#', find_start_trans_sep_end + 1)\n  else\n    needs_hl = status_str:find('^%%#')\n  end\n\n  if needs_hl then\n    -- Don't prepend with old highlight when the component changes it immediately\n    return left_separator_string .. status_str\n  else\n    return left_separator_string .. highlight_name .. status_str\n  end\nend\n\nreturn M\n"
  },
  {
    "path": "lua/lualine/utils/utils.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\nlocal M = {}\n\n-- Note for now only works for termguicolors scope can be bg or fg or any other\n-- attr parameter like bold/italic/reverse\n---@param color_group string hl_group name\n---@param scope       string bg | fg | sp\n---@return table|string returns #rrggbb formatted color when scope is specified\n----                       or complete color table when scope isn't specified\nfunction M.extract_highlight_colors(color_group, scope)\n  local color = require('lualine.highlight').get_lualine_hl(color_group)\n  if not color then\n    if vim.fn.hlexists(color_group) == 0 then\n      return nil\n    end\n    color = vim.api.nvim_get_hl_by_name(color_group, true)\n    if color.background ~= nil then\n      color.bg = string.format('#%06x', color.background)\n      color.background = nil\n    end\n    if color.foreground ~= nil then\n      color.fg = string.format('#%06x', color.foreground)\n      color.foreground = nil\n    end\n    if color.special ~= nil then\n      color.sp = string.format('#%06x', color.special)\n      color.special = nil\n    end\n  end\n  if scope then\n    return color[scope]\n  end\n  return color\nend\n\n--- retrieves color value from highlight group name in syntax_list\n--- first present highlight is returned\n---@param scope string|table\n---@param syntaxlist table\n---@param default string\n---@return string|nil\nfunction M.extract_color_from_hllist(scope, syntaxlist, default)\n  scope = type(scope) == 'string' and { scope } or scope\n  for _, highlight_name in ipairs(syntaxlist) do\n    if vim.fn.hlexists(highlight_name) ~= 0 then\n      local color = M.extract_highlight_colors(highlight_name)\n      for _, sc in ipairs(scope) do\n        if color.reverse then\n          if sc == 'bg' then\n            sc = 'fg'\n          else\n            sc = 'bg'\n          end\n        end\n        if color[sc] then\n          return color[sc]\n        end\n      end\n    end\n  end\n  return default\nend\n\n---remove empty strings from list\n---@param list table\n---@return table\nfunction M.list_shrink(list)\n  local new_list = {}\n  for i = 1, #list do\n    if list[i] and #list[i] > 0 then\n      table.insert(new_list, list[i])\n    end\n  end\n  return new_list\nend\n\n--- Check if a auto command is already defined\n---@param event string\n---@param pattern string\n---@param command_str string\n---@return boolean whether autocmd is already defined\nlocal function autocmd_is_defined(event, pattern, command_str)\n  return vim.api.nvim_exec(string.format('au lualine %s %s', event, pattern), true):find(command_str) ~= nil\nend\n\n--- Define a auto command if it's not already defined\n---@param event  string event name\n---@param pattern string event pattern\n---@param cmd    string command to run on event\n---@param group   string group name defaults to lualine\nfunction M.define_autocmd(event, pattern, cmd, group)\n  if not cmd then\n    cmd = pattern\n    pattern = '*'\n  end\n  if not autocmd_is_defined(event, pattern, cmd) then\n    vim.cmd(string.format('autocmd %s %s %s %s', group or 'lualine', event, pattern, cmd))\n  end\nend\n\n-- Check if statusline is on focused window or not\nfunction M.is_focused()\n  return tonumber(vim.g.actual_curwin) == vim.api.nvim_get_current_win()\nend\n\n--- Check what's the character at pos\n---@param str string\n---@param pos number\n---@return string character at position pos in string str\nfunction M.charAt(str, pos)\n  return string.char(str:byte(pos))\nend\n\n-- deepcopy adapted from penlight\n-- https://github.com/lunarmodules/Penlight/blob/0653cdb05591454a9804a7fee8c873b8f06b0b8f/lua/pl/tablex.lua#L98-L122\nlocal function cycle_aware_copy(t, cache)\n  if type(t) ~= 'table' then\n    return t\n  end\n  if cache[t] then\n    return cache[t]\n  end\n  local res = {}\n  cache[t] = res\n  local mt = getmetatable(t)\n  for k, v in pairs(t) do\n    k = cycle_aware_copy(k, cache)\n    v = cycle_aware_copy(v, cache)\n    res[k] = v\n  end\n  setmetatable(res, mt)\n  return res\nend\n\n--- make a deep copy of a table, recursively copying all the keys and fields.\n-- This supports cycles in tables; cycles will be reproduced in the copy.\n-- This will also set the copied table's metatable to that of the original.\n-- @within Copying\n-- @tab t A table\n-- @return new table\nfunction M.deepcopy(t)\n  return cycle_aware_copy(t, {})\nend\n\n--- Check if comp is a lualine component\n--- @param comp any\n--- @return boolean\nfunction M.is_component(comp)\n  if type(comp) ~= 'table' then\n    return false\n  end\n  local mt = getmetatable(comp)\n  return mt and mt.__is_lualine_component == true\nend\n\n--- Call function with args and return it's result.\n--- If error occurs during fn retry times times.\n---@param fn function Function to call.\n---@param args table List of arguments used for calling function.\n---@param times number Number of times to retry on error.\n---@return any Result of fn.\nfunction M.retry_call(fn, args, times)\n  times = times or 3\n  for _ = 0, times - 1 do\n    local result = { pcall(fn, unpack(args)) }\n    if result[1] == true then\n      return unpack(result, 2)\n    end\n  end\n  return fn(unpack(args))\nend\n\n--- Wrap a function in retry_call\n---@param fn function Function to call.\n---@param times number Number of times to retry on error.\n---@return function retry call wrapped function\nfunction M.retry_call_wrap(fn, times)\n  return function(...)\n    return M.retry_call(fn, { ... }, times)\n  end\nend\n\n---Escape % in str so it doesn't get picked as stl item.\n---@param str string\n---@return string\nfunction M.stl_escape(str)\n  if type(str) ~= 'string' then\n    return str\n  end\n  return str:gsub('%%', '%%%%')\nend\n\n---A safe call inside a timer\n---@param timer userdata\n---@param augroup string|nil autocmd group to reset too on error.\n---@param fn function\n---@param max_err integer\n---@param err_msg string\n---@return function a wrapped fn that can be called inside a timer and that\n---stops the timer after max_err errors in calling fn\nfunction M.timer_call(timer, augroup, fn, max_err, err_msg)\n  local err_cnt, ret = 0, nil\n  max_err = max_err or 3\n  return vim.schedule_wrap(function(...)\n    if err_cnt > max_err then\n      vim.loop.timer_stop(timer)\n      if augroup then\n        vim.cmd(string.format([[augroup %s | exe \"autocmd!\" | augroup END]], augroup))\n      end\n      error(err_msg .. ':\\n' .. tostring(ret))\n    end\n    local ok\n    ok, ret = pcall(fn, ...)\n    if ok then\n      err_cnt = 0\n    else\n      err_cnt = err_cnt + 1\n    end\n    return ret\n  end)\nend\n\nreturn M\n"
  },
  {
    "path": "lua/lualine.lua",
    "content": "-- Copyright (c) 2020-2021 hoob3rt\n-- MIT license, see LICENSE for more details.\nlocal M = {}\n\nlocal lualine_require = require('lualine_require')\nlocal modules = lualine_require.lazy_require {\n  highlight = 'lualine.highlight',\n  loader = 'lualine.utils.loader',\n  utils_section = 'lualine.utils.section',\n  utils = 'lualine.utils.utils',\n  utils_notices = 'lualine.utils.notices',\n  config_module = 'lualine.config',\n  nvim_opts = 'lualine.utils.nvim_opts',\n}\nlocal config -- Stores currently applied config\nlocal timers = {\n  stl_timer = vim.loop.new_timer(),\n  tal_timer = vim.loop.new_timer(),\n  wb_timer = vim.loop.new_timer(),\n  refresh_check_timer = vim.loop.new_timer(),\n  halt_stl_refresh = false, -- mutex ?\n  halt_tal_refresh = false,\n  halt_wb_refresh = false,\n}\n\nlocal last_focus = {}\nlocal refresh_real_curwin\n\n-- Helper for apply_transitional_separators()\n--- finds first applied highlight group after str_checked in status\n---@param status string : unprocessed statusline string\n---@param str_checked number : position of how far status has been checked\n---@return string|nil the hl group name or nil\nlocal function find_next_hl(status, str_checked)\n  -- Gets the next valid hl group from str_checked\n  local hl_pos_start, hl_pos_end = status:find('%%#.-#', str_checked)\n  while true do\n    if not hl_pos_start then\n      return nil\n    end\n    -- When there are more that one hl group next to one another like\n    -- %#HL1#%#HL2#%#HL3# we need to return HL3. This makes that happen.\n    local next_start, next_end = status:find('^%%#.-#', hl_pos_end + 1)\n    if next_start == nil then\n      break\n    end\n    hl_pos_start, hl_pos_end = next_start, next_end\n  end\n  return status:sub(hl_pos_start + 2, hl_pos_end - 1)\nend\n\n-- Helper for apply_transitional_separators()\n--- applies transitional separator highlight + transitional separator\n---@param status string : unprocessed statusline string\n---@param str_checked number : position of how far status has been checked\n---@param last_hl string : last applied hl group name before str_checked\n---@param reverse boolean : reverse the hl group ( true for right separators )\n---@return string|nil concatenate separator highlight and transitional separator\nlocal function fill_section_separator(status, is_focused, str_checked, last_hl, sep, reverse)\n  -- Inserts transitional separator along with transitional highlight\n  local next_hl = find_next_hl(status, str_checked)\n  if last_hl == nil then\n    last_hl = modules.highlight.get_stl_default_hl(is_focused)\n  end\n  if next_hl == nil then\n    next_hl = modules.highlight.get_stl_default_hl(is_focused)\n  end\n  if #next_hl == 0 or #last_hl == 0 then\n    return\n  end\n  local transitional_highlight = reverse -- lua ternary assignment x ? y : z\n      and modules.highlight.get_transitional_highlights(last_hl, next_hl)\n    or modules.highlight.get_transitional_highlights(next_hl, last_hl)\n  if transitional_highlight then\n    return transitional_highlight .. sep\n  end\nend\n\n--- processes statusline string\n--- replaces %z/Z{sep} with proper left/right separator highlight + sep\n---@param status string : unprocessed statusline string\n---@return string : processed statusline string\nlocal function apply_transitional_separators(status, is_focused)\n  local status_applied = {} -- Collects all the pieces for concatenation\n  local last_hl -- Stores last highlight group that we found\n  local last_hl_reseted = false -- Whether last_hl is nil after reset\n  -- it after %=\n  local copied_pos = 1 -- Tracks how much we've copied over to status_applied\n  local str_checked = 1 -- Tracks where the searcher head is at\n\n  -- Process entire status replace the %z{sep} & %Z{sep} placeholders\n  -- with proper transitional separator.\n  while str_checked ~= nil do\n    str_checked = status:find('%%', str_checked)\n    if str_checked == nil then\n      break\n    end\n    table.insert(status_applied, status:sub(copied_pos, str_checked - 1))\n    -- -1 so we don't copy '%'\n    copied_pos = str_checked\n    local next_char = modules.utils.charAt(status, str_checked + 1)\n    if next_char == '#' then\n      -- %#hl_name# highlights\n      last_hl = status:match('^%%#(.-)#', str_checked)\n      str_checked = str_checked + #last_hl + 3\n    elseif next_char == 'z' then\n      -- %z{sep} is marker for left separator and\n      local sep = status:match('^%%z{(.-)}', str_checked)\n      str_checked = str_checked + #sep + 4 -- 4 = len(%{})\n      if not (last_hl == nil and last_hl_reseted) then\n        local trans_sep = fill_section_separator(status, is_focused, str_checked, last_hl, sep, false)\n        if trans_sep then\n          table.insert(status_applied, trans_sep)\n        end\n      end\n      if last_hl_reseted then\n        last_hl_reseted = false\n      end\n      copied_pos = str_checked\n    elseif next_char == 'Z' then\n      -- %Z{sep} is marker for right separator and\n      local sep = status:match('^%%Z{(.-)}', str_checked)\n      str_checked = str_checked + #sep + 4 -- 4 = len(%{})\n      if status:find('^%%z', str_checked) or status:find('^%%<%%Z', str_checked) then\n        -- When transitional right_sep and left_sep are right next to each other\n        -- and in this exact order skip the left sep as we can't draw both.\n        str_checked = status:find('}', str_checked) + 1\n      end\n      local trans_sep = fill_section_separator(status, is_focused, str_checked, last_hl, sep, true)\n      if trans_sep then\n        table.insert(status_applied, trans_sep)\n      end\n      copied_pos = str_checked\n    elseif next_char == '%' then\n      str_checked = str_checked + 2 -- Skip the following % too\n    elseif next_char == '=' and last_hl and (last_hl:find('^lualine_a') or last_hl:find('^lualine_b')) then\n      -- TODO: Fix this properly\n      -- This check for lualine_a and lualine_b is dumb. It doesn't guarantee\n      -- c or x section isn't present. Worst case scenario after this patch\n      -- we have another visual bug that occurs less frequently.\n      -- Annoying Edge Cases\n      last_hl = nil\n      last_hl_reseted = true\n      str_checked = str_checked + 1 -- Skip the following % too\n    else\n      str_checked = str_checked + 1 -- Push it forward to avoid inf loop\n    end\n  end\n  table.insert(status_applied, status:sub(copied_pos)) -- Final chunk\n  return table.concat(status_applied)\nend\n\n--- creates the statusline string\n---@param sections table : section config where components are replaced with\n---      component objects\n---@param is_focused boolean : whether being evaluated for focused window or not\n---@return string statusline string\nlocal statusline = modules.utils.retry_call_wrap(function(sections, is_focused, is_winbar)\n  -- The sequence sections should maintain [SECTION_SEQUENCE]\n  local section_sequence = { 'a', 'b', 'c', 'x', 'y', 'z' }\n  local status = {}\n  local applied_midsection_divider = false\n  local applied_trunc = false\n  for _, section_name in ipairs(section_sequence) do\n    if sections['lualine_' .. section_name] then\n      -- insert highlight+components of this section to status_builder\n      local section_data =\n        modules.utils_section.draw_section(sections['lualine_' .. section_name], section_name, is_focused)\n      if #section_data > 0 then\n        if not applied_midsection_divider and section_name > 'c' then\n          applied_midsection_divider = true\n          section_data = modules.highlight.format_highlight('c', is_focused) .. '%=' .. section_data\n        end\n        if not applied_trunc and section_name > 'b' then\n          applied_trunc = true\n          section_data = '%<' .. section_data\n        end\n        table.insert(status, section_data)\n      end\n    end\n  end\n  if applied_midsection_divider == false and config.options.always_divide_middle ~= false and not is_winbar then\n    -- When non of section x,y,z is present\n    table.insert(status, modules.highlight.format_highlight('c', is_focused) .. '%=')\n  end\n  return apply_transitional_separators(table.concat(status), is_focused)\nend)\n\n--- check if any extension matches the filetype and return proper sections\n---@param current_ft_list string[] : filetype name of current file\n---@param is_focused boolean : whether being evaluated for focused window or not\n---@return table|nil : (section_table) section config where components are replaced with\n---      component objects\n-- TODO: change this so it uses a hash table instead of iteration over list\n--       to improve redraws. Add buftype / bufname for extensions\n--       or some kind of cond ?\nlocal function get_extension_sections(current_ft_list, is_focused, sec_name)\n  for _, ft in ipairs(current_ft_list) do\n    for _, extension in ipairs(config.extensions) do\n      if vim.tbl_contains(extension.filetypes, ft) then\n        if is_focused then\n          return extension[sec_name]\n        else\n          return extension['inactive_' .. sec_name] or extension[sec_name]\n        end\n      end\n    end\n  end\n  return nil\nend\n\n---@return string statusline string for tabline\nlocal function tabline()\n  return statusline(config.tabline, 3)\nend\n\nlocal function notify_theme_error(theme_name)\n  local message_template = theme_name ~= 'auto'\n      and [[\n### options.theme\nTheme `%s` not found, falling back to `auto`. Check if spelling is right.\n]]\n    or [[\n### options.theme\nTheme `%s` failed, falling back to `gruvbox`.\nThis shouldn't happen.\nPlease report the issue at https://github.com/nvim-lualine/lualine.nvim/issues .\nAlso provide what colorscheme you're using.\n]]\n  modules.utils_notices.add_notice(string.format(message_template, theme_name))\nend\n\n--- Sets up theme by defining hl groups and setting theme cache in 'highlight.lua'.\n--- Uses 'options.theme' variable to apply the theme:\n--- - If the value is a string, it'll load a theme of that name.\n--- - If it's a table, it's directly used as the theme.\n--- If loading the theme fails, this falls back to 'auto' theme.\n--- If the 'auto' theme also fails, this falls back to 'gruvbox' theme.\n--- Also sets up auto command to reload lualine on ColorScheme or background changes.\nlocal function setup_theme()\n  local function get_theme_from_config()\n    local theme_name = config.options.theme\n    if type(theme_name) == 'string' then\n      local ok, theme = pcall(modules.loader.load_theme, theme_name)\n      if ok and theme then\n        return theme\n      end\n    elseif type(theme_name) == 'table' then\n      -- use the provided theme as-is\n      return config.options.theme\n    elseif type(theme_name) == 'function' then\n      -- call function and use returned (dyanmic) theme, either as-is or as a string\n      local ok, dynamic_theme = pcall(theme_name)\n      if ok and (type(dynamic_theme) == 'string') then\n        local ok_string, theme = pcall(modules.loader.load_theme, dynamic_theme)\n        if ok_string and theme then\n          return theme\n        end\n      elseif ok and (type(dynamic_theme) == 'table') then\n        return dynamic_theme\n      else\n        local error_message = 'Invalid theme type returned from function: ' .. type(dynamic_theme)\n        notify_theme_error(error_message)\n        return dynamic_theme\n      end\n    end\n    if theme_name ~= 'auto' then\n      notify_theme_error(theme_name)\n      local ok, theme = pcall(modules.loader.load_theme, 'auto')\n      if ok and theme then\n        return theme\n      end\n    end\n    notify_theme_error('auto')\n    return modules.loader.load_theme('gruvbox')\n  end\n  local theme = get_theme_from_config()\n  modules.highlight.create_highlight_groups(theme)\n  vim.cmd([[autocmd lualine ColorScheme * lua require'lualine'.setup()\n    autocmd lualine OptionSet background lua require'lualine'.setup()]])\nend\n\n---@alias StatusDispatchSecs\n---| 'sections'\n---| 'winbar'\n--- generates lualine.statusline & lualine.winbar function\n--- creates a closer that can draw sections of sec_name.\n---@param sec_name StatusDispatchSecs\n---@return function(focused:bool):string\nlocal function status_dispatch(sec_name)\n  return function(focused)\n    local retval\n    local current_ft = refresh_real_curwin\n        and vim.api.nvim_buf_get_option(vim.api.nvim_win_get_buf(refresh_real_curwin), 'filetype')\n      or vim.bo.filetype\n    local current_ft_list = vim.split(current_ft, '%.') -- handle compound filetypes c.doxygen\n    local is_focused = focused ~= nil and focused or modules.utils.is_focused()\n    for _, ft in ipairs(current_ft_list) do\n      if\n        vim.tbl_contains(config.options.disabled_filetypes[(sec_name == 'sections' and 'statusline' or sec_name)], ft)\n      then\n        -- disable on specific filetypes\n        return nil\n      end\n    end\n    local extension_sections = get_extension_sections(current_ft_list, is_focused, sec_name)\n    if extension_sections ~= nil then\n      retval = statusline(extension_sections, is_focused, sec_name == 'winbar')\n    else\n      retval = statusline(config[(is_focused and '' or 'inactive_') .. sec_name], is_focused, sec_name == 'winbar')\n    end\n    return retval\n  end\nend\n\n---Determines if a focus event for this window should be ignored.\n---\n---@param user_config table The user's config\n---@param win number The Neovim window handle to check\n---@return boolean Whether focus events for this window should be ignored\nlocal function should_ignore_focus(user_config, win)\n  local ignore_focus = user_config.options.ignore_focus\n  if type(ignore_focus) == 'table' then\n    -- ignore focus on filetypes listed in options.ignore_focus\n    local buf = vim.api.nvim_win_get_buf(win)\n    local filetype = vim.api.nvim_buf_get_option(buf, 'filetype')\n    return vim.tbl_contains(ignore_focus, filetype)\n  elseif type(ignore_focus) == 'function' then\n    return vim.api.nvim_win_call(win, function()\n      return ignore_focus(win)\n    end)\n  else\n    return false\n  end\nend\n\nlocal refresh_event_queue = {\n  has_events = false,\n  statusline = {},\n  tabline = {},\n  winbar = {},\n}\n\n---@alias LualineRefreshOptsKind\n---| 'all'\n---| 'tabpage'\n---| 'window'\n---@alias LualineRefreshOptsPlace\n---| 'statusline'\n---| 'tabline'\n---| 'winbar'\n---@class LualineRefreshOpts\n---@field scope LualineRefreshOptsKind\n---@field place LualineRefreshOptsPlace[]\n---@field trigger 'timer' | 'init' | 'autocmd' |'unknown'\n---@field queued boolean the refresh even was queue and queue is now being processed\n---@field force boolean force refresh now instead of queuing\n--- Refresh contents of lualine\n---@param opts LualineRefreshOpts\nlocal function refresh(opts)\n  if opts == nil then\n    opts = {}\n  end\n  opts = vim.tbl_extend('keep', opts, {\n    scope = 'tabpage',\n    place = { 'statusline', 'winbar', 'tabline' },\n    trigger = 'unknown',\n  })\n\n  if not opts.queued and not opts.force then\n    for _, place in ipairs(opts.place) do\n      refresh_event_queue['has_events'] = true\n      refresh_event_queue[place] = vim.tbl_extend('force', opts, { place = { place }, queued = true })\n    end\n    return\n  end\n\n  local wins = {}\n  local old_actual_curwin = vim.g.actual_curwin\n\n  local curwin = vim.api.nvim_get_current_win()\n  local curtab = vim.api.nvim_get_current_tabpage()\n  if last_focus[curtab] == nil or not vim.api.nvim_win_is_valid(last_focus[curtab]) then\n    if not should_ignore_focus(config, curwin) then\n      last_focus[curtab] = curwin\n    else\n      local tab_wins = vim.api.nvim_tabpage_list_wins(curtab)\n      if #tab_wins == 1 then\n        last_focus[curtab] = curwin\n      else\n        local focusable_win = curwin\n        for _, win in ipairs(tab_wins) do\n          if not should_ignore_focus(config, win) then\n            focusable_win = win\n            break\n          end\n        end\n        last_focus[curtab] = focusable_win\n      end\n    end\n  else\n    if not should_ignore_focus(config, curwin) then\n      last_focus[curtab] = curwin\n    end\n  end\n  vim.g.actual_curwin = last_focus[curtab]\n\n  -- gather which windows needs update\n  if opts.scope == 'all' then\n    if vim.tbl_contains(opts.place, 'statusline') or vim.tbl_contains(opts.place, 'winbar') then\n      wins = vim.tbl_filter(function(win)\n        return vim.fn.win_gettype(win) ~= 'popup'\n      end, vim.api.nvim_list_wins())\n    end\n  elseif opts.scope == 'tabpage' then\n    if vim.tbl_contains(opts.place, 'statusline') or vim.tbl_contains(opts.place, 'winbar') then\n      wins = vim.tbl_filter(function(win)\n        return vim.fn.win_gettype(win) ~= 'popup'\n      end, vim.api.nvim_tabpage_list_wins(0))\n    end\n  elseif opts.scope == 'window' then\n    wins = { curwin }\n  end\n\n  -- update them\n  if not timers.halt_stl_refresh and vim.tbl_contains(opts.place, 'statusline') then\n    for _, win in ipairs(wins) do\n      refresh_real_curwin = config.options.globalstatus and last_focus[curtab] or win\n      local set_win = config.options.globalstatus\n          and vim.fn.win_gettype(refresh_real_curwin) == 'popup'\n          and refresh_real_curwin\n        or win\n      local stl_cur = vim.api.nvim_win_call(refresh_real_curwin, M.statusline)\n      local stl_last = modules.nvim_opts.get_cache('statusline', { window = set_win })\n      if stl_cur or stl_last then\n        modules.nvim_opts.set('statusline', stl_cur, { window = set_win })\n      end\n    end\n  end\n  if not timers.halt_wb_refresh and vim.tbl_contains(opts.place, 'winbar') then\n    for _, win in ipairs(wins) do\n      refresh_real_curwin = win\n      if vim.api.nvim_win_get_height(win) > 1 then\n        local wbr_cur = vim.api.nvim_win_call(refresh_real_curwin, M.winbar)\n        local wbr_last = modules.nvim_opts.get_cache('winbar', { window = win })\n        if wbr_cur or wbr_last then\n          modules.nvim_opts.set('winbar', wbr_cur, { window = win })\n        end\n      end\n    end\n  end\n  if not timers.halt_tal_refresh and vim.tbl_contains(opts.place, 'tabline') then\n    refresh_real_curwin = curwin\n    local tbl_cur = vim.api.nvim_win_call(curwin, tabline)\n    local tbl_last = modules.nvim_opts.get_cache('tabline', { global = true })\n    if tbl_cur or tbl_last then\n      modules.nvim_opts.set('tabline', tbl_cur, { global = true })\n    end\n  end\n\n  vim.g.actual_curwin = old_actual_curwin\n  refresh_real_curwin = nil\nend\n\n--- Sets &tabline option to lualine\n---@param hide boolean|nil if should hide tabline\nlocal function set_tabline(hide)\n  vim.loop.timer_stop(timers.tal_timer)\n  timers.halt_tal_refresh = true\n  vim.cmd([[augroup lualine_tal_refresh | exe \"autocmd!\" | augroup END]])\n  if not hide and next(config.tabline) ~= nil then\n    vim.loop.timer_start(\n      timers.tal_timer,\n      0,\n      config.options.refresh.tabline,\n      modules.utils.timer_call(timers.tal_timer, 'lualine_tal_refresh', function()\n        refresh { scope = 'tabpage', place = { 'tabline' }, trigger = 'timer' }\n      end, 3, 'lualine: Failed to refresh tabline')\n    )\n    modules.utils.define_autocmd(\n      table.concat(config.options.refresh.events, ','),\n      '*',\n      \"call v:lua.require'lualine'.refresh({'kind': 'tabpage', 'place': ['tabline'], 'trigger': 'autocmd'})\",\n      'lualine_tal_refresh'\n    )\n\n    modules.nvim_opts.set('showtabline', config.options.always_show_tabline and 2 or 1, { global = true })\n    timers.halt_tal_refresh = false\n    vim.schedule(function()\n      -- imediately refresh upon load\n      -- schedule needed so stuff like filetype detect can run first\n      refresh { scope = 'tabpage', place = { 'tabline' }, trigger = 'init' }\n    end)\n  else\n    modules.nvim_opts.restore('tabline', { global = true })\n    modules.nvim_opts.restore('showtabline', { global = true })\n  end\nend\n\nlocal function check_refresh()\n  if not refresh_event_queue.has_events then\n    return\n  end\n  refresh_event_queue.has_events = nil\n\n  for place, refresh_cmd in pairs(refresh_event_queue) do\n    if type(refresh_cmd) == 'table' and refresh_cmd.queued == true then\n      refresh(refresh_cmd)\n      refresh_event_queue[place] = {}\n    end\n  end\nend\n\nlocal function set_refresh_checker()\n  vim.loop.timer_stop(timers.refresh_check_timer)\n  vim.loop.timer_start(\n    timers.refresh_check_timer,\n    0,\n    config.options.refresh.refresh_time,\n    modules.utils.timer_call(\n      timers.refresh_check_timer,\n      'lualine_refresh_check',\n      check_refresh,\n      3,\n      'lualine: Failed to refresh statusline'\n    )\n  )\nend\n\n--- Sets &statusline option to lualine\n--- adds auto command to redraw lualine on VimResized event\n---@param hide boolean|nil if should hide statusline\nlocal function set_statusline(hide)\n  vim.loop.timer_stop(timers.stl_timer)\n  timers.halt_stl_refresh = true\n  vim.cmd([[augroup lualine_stl_refresh | exe \"autocmd!\" | augroup END]])\n  if not hide and (next(config.sections) ~= nil or next(config.inactive_sections) ~= nil) then\n    modules.nvim_opts.set('statusline', '%#lualine_transparent#', { global = true })\n    if config.options.globalstatus then\n      modules.nvim_opts.set('laststatus', 3, { global = true })\n      vim.loop.timer_start(\n        timers.stl_timer,\n        0,\n        config.options.refresh.statusline,\n        modules.utils.timer_call(timers.stl_timer, 'lualine_stl_refresh', function()\n          refresh { scope = 'window', place = { 'statusline' }, trigger = 'timer' }\n        end, 3, 'lualine: Failed to refresh statusline')\n      )\n      modules.utils.define_autocmd(\n        table.concat(config.options.refresh.events, ','),\n        '*',\n        \"call v:lua.require'lualine'.refresh({'kind': 'window', 'place': ['statusline'], 'trigger': 'autocmd'})\",\n        'lualine_stl_refresh'\n      )\n    else\n      modules.nvim_opts.set('laststatus', 2, { global = true })\n      vim.loop.timer_start(\n        timers.stl_timer,\n        0,\n        config.options.refresh.statusline,\n        modules.utils.timer_call(timers.stl_timer, 'lualine_stl_refresh', function()\n          refresh { scope = 'tabpage', place = { 'statusline' }, trigger = 'timer' }\n        end, 3, 'lualine: Failed to refresh statusline')\n      )\n\n      modules.utils.define_autocmd(\n        table.concat(config.options.refresh.events, ','),\n        '*',\n        \"call v:lua.require'lualine'.refresh({'kind': 'tabpage', 'place': ['statusline'], 'trigger': 'autocmd'})\",\n        'lualine_stl_refresh'\n      )\n    end\n    timers.halt_stl_refresh = false\n    vim.schedule(function()\n      -- imediately refresh upon load\n      -- schedule needed so stuff like filetype detect can run first\n      if config.options.globalstatus then\n        refresh { scope = 'window', place = { 'statusline' }, trigger = 'init' }\n      else\n        refresh { scope = 'tabpage', place = { 'statusline' }, trigger = 'init' }\n      end\n    end)\n  else\n    modules.nvim_opts.restore('statusline', { global = true })\n    for _, win in ipairs(vim.api.nvim_list_wins()) do\n      modules.nvim_opts.restore('statusline', { window = win })\n    end\n    modules.nvim_opts.restore('laststatus', { global = true })\n  end\nend\n\n--- Sets &winbar option to lualine\n---@param hide boolean|nil if should unset winbar\nlocal function set_winbar(hide)\n  vim.loop.timer_stop(timers.wb_timer)\n  timers.halt_wb_refresh = true\n  vim.cmd([[augroup lualine_wb_refresh | exe \"autocmd!\" | augroup END]])\n  if not hide and (next(config.winbar) ~= nil or next(config.inactive_winbar) ~= nil) then\n    vim.loop.timer_start(\n      timers.wb_timer,\n      0,\n      config.options.refresh.winbar,\n      modules.utils.timer_call(timers.wb_timer, 'lualine_wb_refresh', function()\n        refresh { scope = 'tabpage', place = { 'winbar' }, trigger = 'timer' }\n      end, 3, 'lualine: Failed to refresh winbar')\n    )\n    modules.utils.define_autocmd(\n      table.concat(config.options.refresh.events, ','),\n      '*',\n      \"call v:lua.require'lualine'.refresh({'kind': 'tabpage', 'place': ['winbar'], 'trigger': 'autocmd'})\",\n      'lualine_wb_refresh'\n    )\n\n    timers.halt_wb_refresh = false\n    vim.schedule(function()\n      -- imediately refresh upon load.\n      -- schedule needed so stuff like filetype detect can run first\n      refresh { scope = 'tabpage', place = { 'winbar' }, trigger = 'init' }\n    end)\n  elseif vim.fn.has('nvim-0.8') == 1 then\n    modules.nvim_opts.restore('winbar', { global = true })\n    for _, win in ipairs(vim.api.nvim_list_wins()) do\n      modules.nvim_opts.restore('winbar', { window = win })\n    end\n  end\nend\n\n---@alias LualineHideOptsPlace\n---| 'statusline'\n---| 'tabline'\n---| 'winbar'\n---@class LualineHideOpts\n---@field place LualineHideOptsPlace[]\n---@field unhide boolean\n---@param opts LualineHideOpts\nlocal function hide(opts)\n  if opts == nil then\n    opts = {}\n  end\n  opts = vim.tbl_extend('keep', opts, {\n    place = { 'statusline', 'tabline', 'winbar' },\n    unhide = false,\n  })\n  local hide_fn = {\n    statusline = set_statusline,\n    tabline = set_tabline,\n    winbar = set_winbar,\n  }\n  for _, place in ipairs(opts.place) do\n    if hide_fn[place] then\n      hide_fn[place](not opts.unhide)\n    end\n  end\nend\n\n--- Check neovim compatibilitu\nlocal function verify_nvim_version()\n  if vim.fn.has('nvim-0.7') == 1 then\n    return true\n  end\n  modules.utils_notices.add_notice([[\n### Incompatible Neovim version\nLualine supports neovim 0.7 and up. It seems you're using a older version.\nPlease update to newer version. Or if you have atleast neovim 0.5 you\ncan use older compatible versions of lualine using compat tags like\n`compat-nvim-0.5`, `compat-nvim-0.6`.\n]])\n  return false\nend\n\n-- lualine.setup function\n--- sets new user config\n--- This function doesn't load components/theme etc... They are done before\n--- first statusline redraw and after new config. This is more efficient when\n--- lualine config is done in several setup calls as chunks. This way\n--- we don't initialize components just to throw them away. Instead they are\n--- initialized when we know we will use them.\n--- sets &last_status to 2\n---@param user_config table table\nlocal function setup(user_config)\n  if package.loaded['lualine.utils.notices'] then\n    -- When notices module is not loaded there are no notices to clear.\n    modules.utils_notices.clear_notices()\n  end\n  if verify_nvim_version() then\n    config = modules.config_module.apply_configuration(user_config)\n    vim.cmd([[augroup lualine | exe \"autocmd!\" | augroup END]])\n    setup_theme()\n    -- load components & extensions\n    modules.loader.load_all(config)\n    set_statusline()\n    set_tabline()\n    set_winbar()\n    set_refresh_checker()\n  end\n  if package.loaded['lualine.utils.notices'] then\n    modules.utils_notices.notice_message_startup()\n  end\nend\n\nM = {\n  setup = setup,\n  statusline = status_dispatch('sections'),\n  tabline = tabline,\n  get_config = modules.config_module.get_config,\n  refresh = refresh,\n  winbar = status_dispatch('winbar'),\n  hide = hide,\n}\n\nreturn M\n"
  },
  {
    "path": "lua/lualine_require.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\nlocal M = {}\n\nM.sep = package.config:sub(1, 1)\nlocal luv = vim.uv or vim.loop\n\n-- Figures out full path of lualine installation\nlocal source = debug.getinfo(1, 'S').source\nif source:sub(1, 1) == '@' then\n  local base_start = source:find(table.concat({ 'lualine.nvim', 'lua', 'lualine_require.lua' }, M.sep))\n  if base_start then\n    source = source:sub(2, base_start + #'lualine.nvim/lua')\n    if source then\n      M.plugin_dir = source\n    end\n  end\nend\n\n--- checks if name is valid\n---@param name string\n---@return boolean\nfunction M.is_valid_filename(name)\n  local invalid_chars = '[^a-zA-Z0-9_. -]'\n  return name:find(invalid_chars) == nil\nend\n\n---require module module\n---@param module string module_name\n---@return any the required module\nfunction M.require(module)\n  if not package or not package.loaded then\n    -- Something wrong with execution environment. Maybe plugin manager cleared it.\n    -- Just let regular require handle. We'll use the cache next time.\n    return require(module)\n  end\n  if package.loaded[module] then\n    return package.loaded[module]\n  end\n  local pattern_dir = module:gsub('%.', M.sep)\n  local pattern_path = pattern_dir .. '.lua'\n  if M.plugin_dir then\n    local path = M.plugin_dir .. pattern_path\n    assert(M.is_valid_filename(module), 'Invalid filename')\n    local file_stat, dir_stat\n    file_stat = luv.fs_stat(path)\n    if not file_stat then\n      path = M.plugin_dir .. pattern_dir\n      dir_stat = luv.fs_stat(path)\n      if dir_stat and dir_stat.type == 'directory' then\n        path = path .. M.sep .. 'init.lua'\n        file_stat = luv.fs_stat(path)\n      end\n    end\n    if file_stat and file_stat.type == 'file' then\n      local mod_result = dofile(path)\n      package.loaded[module] = mod_result\n      return mod_result\n    end\n  end\n\n  pattern_path = table.concat { 'lua/', module:gsub('%.', '/'), '.lua' }\n  local paths = vim.api.nvim_get_runtime_file(pattern_path, true)\n  if #paths <= 0 then\n    pattern_path = table.concat { 'lua/', module:gsub('%.', '/'), '/init.lua' }\n    paths = vim.api.nvim_get_runtime_file(pattern_path, true)\n  end\n  if #paths > 0 then\n    -- put entries from user config path in front\n    local user_config_path = vim.fn.stdpath('config')\n    table.sort(paths, function(a, b)\n      local pattern = table.concat { user_config_path, M.sep }\n      return string.match(a, pattern) or not string.match(b, pattern)\n    end)\n    local mod_result = dofile(paths[1])\n    package.loaded[module] = mod_result\n    return mod_result\n  end\n\n  return require(module)\nend\n\n---requires modules when they are used\n---@param modules table k-v table where v is module path and k is name that will\n---                     be indexed\n---@return table metatable where when a key is indexed it gets required and cached\nfunction M.lazy_require(modules)\n  return setmetatable({}, {\n    __index = function(self, key)\n      local loaded = rawget(self, key)\n      if loaded ~= nil then\n        return loaded\n      end\n      local module_location = modules[key]\n      if module_location == nil then\n        return nil\n      end\n      local module = M.require(module_location)\n      rawset(self, key, module)\n      return module\n    end,\n  })\nend\n\nreturn M\n"
  },
  {
    "path": "scripts/docgen.sh",
    "content": "# Copyright (c) 2020-2021 shadmansaleh\n# MIT license, see LICENSE for more details.\n\nPANVIMDOC_TAG_VERSION=\"v2.7.1\" # panvimdoc version\n\n# panvimdocs metadata\nPANVIMDOC_VIMDOC=\"lualine\"\nPANVIMDOC_DESCRIPTION=\"fast and easy to configure statusline plugin for neovim\"\nPANVIMDOC_PANDOC=\"README.md\"\nPANVIMDOC_VERSION=\"NVIM v0.5.0\"\nPANVIMDOC_TOC=true\nPANDOC_OUTPUT=\"doc/lualine.txt\"\n\nPANVIMDOC_INSTALLED=false # Whether panvimdoc was installed by this script\n\nif [ ! -d \"panvimdoc/\" ];then\n  # Grab panvimdoc if not present\n  PANVIMDOC_INSTALLED=true\n  echo \"Installing panvimdoc\"\n  git clone --depth 1\\\n    --branch \"${PANVIMDOC_TAG_VERSION}\"\\\n    \"https://github.com/kdheepak/panvimdoc\" \"panvimdoc\"\nfi\n\necho \"Generating docs\"\npandoc --metadata=project:\"${PANVIMDOC_VIMDOC}\"\\\n       --metadata=toc:${PANVIMDOC_TOC}\\\n       --metadata=vimversion:\"${PANVIMDOC_VERSION}\"\\\n       --metadata=description:\"${PANVIMDOC_DESCRIPTION}\"\\\n       --lua-filter ./panvimdoc/scripts/skip-blocks.lua\\\n       --lua-filter ./panvimdoc/scripts/include-files.lua\\\n       -t ./panvimdoc/scripts/panvimdoc.lua\\\n       -o \"${PANDOC_OUTPUT}\"\\\n       \"${PANVIMDOC_PANDOC}\"\n\nif $PANVIMDOC_INSTALLED ;then\n  # Remove panvimdoc if it was installed by this script\n  echo \"Removing panvimdoc\"\n  rm -rf panvimdoc\nfi\n\n"
  },
  {
    "path": "scripts/nvim_isolated_conf.sh",
    "content": "#!/bin/sh\n\n# Copyright (c) 2020-2021 shadmansaleh\n# MIT license, see LICENSE for more details.\n\nUSAGE=\"Usage nvim_isolated_conf.sh [OPTIONS] Directory\nA tool to easily test isolated neovim config\n\nOptions:\n  -c       Create a minimal config tree at Directory\n  -e       Edit init.vim of config in Directory\n  -h       Show this message\n  -l       Load neovim with config from Directory\n\"\n\nINIT_TEMPLATE=\"call plug#begin(\\\"%s/.local/share/nvim/plugged\\\")\n\\\" Your plugins go here like\nPlug 'nvim-lualine/lualine.nvim'\n\n\ncall plug#end()\n\n\\\" Your Viml part of config goes here\n\\\" colorscheme onedark\n\n\nlua << END\n-- Your lua part of config goes here\nrequire'lualine'.setup {\n\n}\n\n\nEND\n\n\\\" Instructions:\n\\\" -------------------------------------------------------------\n\\\" Load this config with nvim_isolated_conf.sh -l %s\n\\\" Remember to run :PlugInstall after changing plugin section\n\\\" Also delete the comments before putting this file on issue\n\\\" That will reduce noise\n\\\" You can delete %s once you're done\"\n\nwhile getopts \"c:e:hl:\" arg; do\n  case $arg in\n    h) Help=true;;\n    c) CreateDirInput=$OPTARG;;\n    l) LoadDirInput=$OPTARG;;\n    e) EditDirInput=$OPTARG;;\n  esac\ndone\nshift $((OPTIND -1))\n\n\nif ! [ -z $LoadDirInput ];then\n  LoadDir=$(realpath $LoadDirInput)\n  if [ -d $LoadDir ];then\n    export NVIM_CONFIG_HOME=$LoadDir\n    export XDG_CONFIG_HOME=$NVIM_CONFIG_HOME/.config\n    export XDG_DATA_HOME=$NVIM_CONFIG_HOME/.local/share\n    export XDG_CACHE_HOME=$NVIM_CONFIG_HOME/.cache\n    export XDG_STATE_HOME=$NVIM_CONFIG_HOME/.local/state\n    nvim $@\n  else\n    echo \"Sorry can't load neovim config. ${LoadDir} doesn't exist\"\n  fi\nelif ! [ -z $CreateDirInput ];then\n  CreateDir=$(realpath $CreateDirInput)\n  echo \"Creating directories\"\n  mkdir -p ${CreateDir}/.local/share/nvim/site/autoload\n  mkdir -p ${CreateDir}/.config/nvim\n  echo \"Installing VimPlug\"\n  wget -q \"https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim\" -O ${CreateDir}/.local/share/nvim/site/autoload/plug.vim\n  echo \"Writing minimal init\"\n  printf \"${INIT_TEMPLATE}\" ${CreateDir} ${CreateDir} ${CreateDir} > ${CreateDir}/.config/nvim/init.vim\n  echo \"\"\n  echo \"You can edit the ${CreateDirInput}/.config/nvim/init.vim to put your config\"\n  echo \"You can load this config with nvim_isolated_conf.sh -l ${CreateDirInput}\"\n  echo \"You can open config (init.vim) to edit with nvim_isolated_conf.sh -e ${CreateDirInput}\"\nelif ! [ -z $EditDirInput ];then\n  if [ -d $EditDirInput  ];then\n    if ! [ -z $EDITOR ];then\n      $EDITOR $EditDirInput/.config/nvim/init.vim\n    else\n      nvim $EditDirInput/.config/nvim/init.vim\n    fi\n  else\n    echo \"Sorry can't load neovim config. ${LoadDir} doesn't exist\"\n  fi\nelse\n  printf \"$USAGE\"\nfi\n"
  },
  {
    "path": "scripts/test_runner.sh",
    "content": "#!/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.lua\" -c \"set runtimepath+=$REPO_DIR\" \"$@\"\n}\n\nif [ -n \"$1\" ]; then\n  nvim_t --headless -c \"lua require('plenary.busted').run('$1')\"\nelse\n  nvim_t --headless -c \"lua require'plenary.test_harness'.test_directory( 'tests/', { minimal_init = './tests/minimal_init.lua' })\" -c \"qa!\"\nfi\n"
  },
  {
    "path": "tests/helpers.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n\nassert = require('luassert')\nlocal eq = assert.are.same\n\nlocal M = {}\n\nM.meths = setmetatable({}, {\n  __index = function(_, key)\n    return vim.api['nvim_' .. key]\n  end,\n})\n\nfunction M.init_component(component, opts)\n  if component == nil then\n    component = 'special.function_component'\n  else\n    opts.component_name = component\n  end\n  local comp = require('lualine.components.' .. component)\n  if type(comp) == 'table' then\n    comp = comp(opts)\n  elseif type(comp) == 'function' then\n    opts[1] = comp\n    comp = require('lualine.components.special.function_component')(opts)\n  end\n  return comp\nend\n\n-- Checks output of a component\nM.assert_component = function(component, opts, result, is_active)\n  local comp = M.init_component(component, opts)\n  -- for testing global options\n  eq(result, comp:draw(opts.hl, is_active or true))\nend\n\nfunction M.assert_component_instance(comp, result)\n  eq(result, comp:draw(comp.options.hl))\nend\n-- sets defaults for component options\nM.build_component_opts = function(opts)\n  if not opts then\n    opts = {}\n  end\n  if opts[1] == nil then\n    opts[1] = function()\n      return 'test'\n    end\n  end\n  if not opts.self then\n    opts.self = { section = 'c' }\n  end\n  if not opts.theme then\n    opts.theme = 'gruvbox'\n  end\n  if not opts.hl then\n    opts.hl = ''\n  end\n  if opts.icons_enabled == nil then\n    opts.icons_enabled = true\n  end\n  if not opts.component_separators then\n    opts.component_separators = { left = '', right = '' }\n  end\n  if not opts.section_separators then\n    opts.section_separators = { left = '', right = '' }\n  end\n  return opts\nend\n\nM.P = function(t)\n  print(vim.inspect(t))\nend\n\nfunction M.dedent(str, leave_indent)\n  if str == nil then\n    return nil\n  end\n  -- find minimum common indent across lines\n  local indent = nil\n  for line in str:gmatch('[^\\n]+') do\n    local line_indent = line:match('^%s+') or ''\n    if indent == nil or #line_indent < #indent then\n      indent = line_indent\n    end\n  end\n  if indent == nil or #indent == 0 then\n    -- no minimum common indent\n    return str\n  end\n  local left_indent = (' '):rep(leave_indent or 0)\n  -- create a pattern for the indent\n  indent = indent:gsub('%s', '[ \\t]')\n  -- strip it from the first line\n  str = str:gsub('^' .. indent, left_indent)\n  -- strip it from the remaining lines\n  str = str:gsub('[\\n]' .. indent, '\\n' .. left_indent)\n  return str\nend\n\nreturn M\n"
  },
  {
    "path": "tests/minimal_init.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n\nif os.getenv('TEST_COV') then\n  require('luacov')\nend\n-- load lualine and plenary\nvim.cmd([[\n  set noswapfile\n  set rtp+=.\n  set rtp+=../plenary.nvim\n  set rtp+=../nvim-web-devicons/\n  runtime plugin/plenary.vim\n]])\n"
  },
  {
    "path": "tests/spec/component_spec.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n\nlocal helpers = require('tests.helpers')\n\nlocal eq = assert.are.same\nlocal neq = assert.are_not.same\nlocal assert_component = helpers.assert_component\nlocal build_component_opts = helpers.build_component_opts\nlocal stub = require('luassert.stub')\n\ndescribe('Component:', function()\n  it('can select separators', function()\n    local opts = build_component_opts()\n    local comp = require('lualine.components.special.function_component')(opts)\n    -- correct for lualine_c\n    eq('', comp.options.separator)\n    local opts2 = build_component_opts { self = { section = 'y' } }\n    local comp2 = require('lualine.components.special.function_component')(opts2)\n    -- correct for lualine_u\n    eq('', comp2.options.separator)\n  end)\n\n  it('can provide unique identifier', function()\n    local opts1 = build_component_opts()\n    local comp1 = require('lualine.components.special.function_component')(opts1)\n    local opts2 = build_component_opts()\n    local comp2 = require('lualine.components.special.function_component')(opts2)\n    neq(comp1.component_no, comp2.component_no)\n  end)\n\n  it('create option highlights', function()\n    local color = { fg = '#224532', bg = '#892345' }\n    local opts1 = build_component_opts { color = color }\n    local hl = require('lualine.highlight')\n    stub(hl, 'create_component_highlight_group')\n    hl.create_component_highlight_group.returns('MyCompHl')\n    local comp1 = require('lualine.components.special.function_component')(opts1)\n    eq('MyCompHl', comp1.options.color_highlight)\n    -- color highlight wan't in options when create_comp_hl was\n    -- called so remove it before assert\n    comp1.options.color_highlight = nil\n    assert\n      .stub(hl.create_component_highlight_group)\n      .was_called_with(color, comp1.options.component_name, comp1.options, false)\n    hl.create_component_highlight_group:revert()\n    color = 'MyHl'\n    local opts2 = build_component_opts { color = color }\n    stub(hl, 'create_component_highlight_group')\n    hl.create_component_highlight_group.returns('MyCompLinkedHl')\n    local comp2 = require('lualine.components.special.function_component')(opts2)\n    eq('MyCompLinkedHl', comp2.options.color_highlight)\n    -- color highlight wan't in options when create_comp_hl was\n    -- called so remove it before assert\n    comp2.options.color_highlight = nil\n    assert\n      .stub(hl.create_component_highlight_group)\n      .was_called_with(color, comp2.options.component_name, comp2.options, false)\n    hl.create_component_highlight_group:revert()\n  end)\n\n  it('can draw', function()\n    local opts = build_component_opts {\n      component_separators = { left = '', right = '' },\n      padding = 0,\n    }\n    assert_component(nil, opts, 'test')\n  end)\n\n  it('can apply separators', function()\n    local opts = build_component_opts { padding = 0 }\n    assert_component(nil, opts, 'test')\n  end)\n\n  it('can apply default highlight', function()\n    local opts = build_component_opts { padding = 0, hl = '%#My_highlight#' }\n    assert_component(nil, opts, '%#My_highlight#test')\n    opts = build_component_opts {\n      function()\n        return '%#Custom_hl#test'\n      end,\n      padding = 0,\n      hl = '%#My_highlight#',\n    }\n    assert_component(nil, opts, '%#Custom_hl#test%#My_highlight#')\n    opts = build_component_opts {\n      function()\n        return 'in middle%#Custom_hl#test'\n      end,\n      padding = 0,\n      hl = '%#My_highlight#',\n    }\n    assert_component(nil, opts, '%#My_highlight#in middle%#Custom_hl#test%#My_highlight#')\n  end)\n\n  describe('Global options:', function()\n    it('left_padding', function()\n      local opts = build_component_opts {\n        component_separators = { left = '', right = '' },\n        padding = { left = 5 },\n      }\n      assert_component(nil, opts, '     test')\n    end)\n\n    it('right_padding', function()\n      local opts = build_component_opts {\n        component_separators = { left = '', right = '' },\n        padding = { right = 5 },\n      }\n      assert_component(nil, opts, 'test     ')\n    end)\n\n    it('padding', function()\n      local opts = build_component_opts {\n        component_separators = { left = '', right = '' },\n        padding = 5,\n      }\n      assert_component(nil, opts, '     test     ')\n    end)\n\n    it('icon', function()\n      local opts = build_component_opts {\n        component_separators = { left = '', right = '' },\n        padding = 0,\n        icon = '0',\n      }\n      assert_component(nil, opts, '0 test')\n    end)\n\n    it('icons_enabled', function()\n      local opts = build_component_opts {\n        component_separators = { left = '', right = '' },\n        padding = 0,\n        icons_enabled = true,\n        icon = '0',\n      }\n      assert_component(nil, opts, '0 test')\n      local opts2 = build_component_opts {\n        component_separators = { left = '', right = '' },\n        padding = 0,\n        icons_enabled = false,\n        icon = '0',\n      }\n      assert_component(nil, opts2, 'test')\n    end)\n\n    it('separator', function()\n      local opts = build_component_opts {\n        component_separators = { left = '', right = '' },\n        padding = 0,\n        separator = '|',\n      }\n      assert_component(nil, opts, 'test|')\n    end)\n\n    it('fmt', function()\n      local opts = build_component_opts {\n        component_separators = { left = '', right = '' },\n        padding = 0,\n        fmt = function(data)\n          return data:sub(1, 1):upper() .. data:sub(2, #data)\n        end,\n      }\n      assert_component(nil, opts, 'Test')\n    end)\n\n    it('cond', function()\n      local opts = build_component_opts {\n        component_separators = { left = '', right = '' },\n        padding = 0,\n        cond = function()\n          return true\n        end,\n      }\n      assert_component(nil, opts, 'test')\n      local opts2 = build_component_opts {\n        component_separators = { left = '', right = '' },\n        padding = 0,\n        cond = function()\n          return false\n        end,\n      }\n      assert_component(nil, opts2, '')\n    end)\n\n    it('color', function()\n      local opts = build_component_opts {\n        component_separators = { left = '', right = '' },\n        padding = 0,\n        color = 'MyHl',\n      }\n      local comp = require('lualine.components.special.function_component')(opts)\n      local custom_link_hl_name = 'lualine_c_' .. comp.options.component_name\n      eq('%#' .. custom_link_hl_name .. '#test', comp:draw(opts.hl))\n      local opts2 = build_component_opts {\n        component_separators = { left = '', right = '' },\n        padding = 0,\n        color = { bg = '#230055', fg = '#223344' },\n      }\n      local hl = require('lualine.highlight')\n      stub(hl, 'component_format_highlight')\n      hl.component_format_highlight.returns('%#MyCompHl#')\n      local comp2 = require('lualine.components.special.function_component')(opts2)\n      assert_component(nil, opts2, '%#MyCompHl#test')\n      assert.stub(hl.component_format_highlight).was_called_with(comp2.options.color_highlight)\n      hl.component_format_highlight:revert()\n    end)\n\n    it('draw_empty', function()\n      local opts = build_component_opts {\n        component_separators = { left = '', right = '' },\n        padding = 0,\n        separator = '>',\n        fmt = function()\n          return ''\n        end,\n        draw_empty = true,\n      }\n      assert_component(nil, opts, '>')\n    end)\n  end)\nend)\n\ndescribe('Encoding component', function()\n  it('works', function()\n    local opts = build_component_opts {\n      component_separators = { left = '', right = '' },\n      padding = 0,\n    }\n    local tmp_path = 'tmp.txt'\n    local tmp_fp = io.open(tmp_path, 'w')\n    tmp_fp:write('test file')\n    tmp_fp:close()\n    vim.cmd('e ' .. tmp_path)\n    assert_component('encoding', opts, 'utf-8')\n    vim.cmd('bd!')\n    os.remove(tmp_path)\n  end)\n  it('works with BOM and default config', function()\n    local opts = build_component_opts {\n      component_separators = { left = '', right = '' },\n      padding = 0,\n    }\n    local tmp_path = 'tmp.txt'\n    local tmp_fp = io.open(tmp_path, 'w')\n    tmp_fp:write('test file')\n    tmp_fp:close()\n    vim.cmd('e ' .. tmp_path)\n    vim.cmd('set bomb')\n    assert_component('encoding', opts, 'utf-8')\n    vim.cmd('bd!')\n    os.remove(tmp_path)\n  end)\n  it('works with BOM and option enabled', function()\n    local opts = build_component_opts {\n      component_separators = { left = '', right = '' },\n      padding = 0,\n      show_bomb = true,\n    }\n    local tmp_path = 'tmp.txt'\n    local tmp_fp = io.open(tmp_path, 'w')\n    tmp_fp:write('test file')\n    tmp_fp:close()\n    vim.cmd('e ' .. tmp_path)\n    vim.cmd('set bomb')\n    assert_component('encoding', opts, 'utf-8 [BOM]')\n    vim.cmd('bd!')\n    os.remove(tmp_path)\n  end)\nend)\n\ndescribe('Fileformat component', function()\n  it('works with icons', function()\n    local opts = build_component_opts {\n      component_separators = { left = '', right = '' },\n      padding = 0,\n    }\n    local fmt = vim.bo.fileformat\n    vim.bo.fileformat = 'unix'\n    assert_component('fileformat', opts, '')\n    vim.bo.fileformat = 'dos'\n    assert_component('fileformat', opts, '')\n    vim.bo.fileformat = 'mac'\n    assert_component('fileformat', opts, '')\n    vim.bo.fileformat = fmt\n  end)\n  it('works without icons', function()\n    local opts = build_component_opts {\n      component_separators = { left = '', right = '' },\n      padding = 0,\n      icons_enabled = false,\n    }\n    assert_component('fileformat', opts, vim.bo.fileformat)\n  end)\nend)\n\ndescribe('Filetype component', function()\n  local filetype\n\n  before_each(function()\n    filetype = vim.bo.filetype\n    vim.bo.filetype = 'lua'\n  end)\n\n  after_each(function()\n    vim.bo.filetype = filetype\n  end)\n\n  it('does not add icon when library unavailable', function()\n    local old_require = _G.require\n    function _G.require(...)\n      if select(1, ...) == 'nvim-web-devicons' then\n        error('Test case not suppose to have web-dev-icon 👀')\n      end\n      return old_require(...)\n    end\n    local opts = build_component_opts {\n      component_separators = { left = '', right = '' },\n      padding = 0,\n    }\n    assert_component('filetype', opts, 'lua')\n    _G.require = old_require\n  end)\n\n  it('colors nvim-web-devicons icons', function()\n    vim.g.actual_curwin = tostring(vim.api.nvim_get_current_win())\n    stub(vim.fn, 'expand')\n    vim.fn.expand.on_call_with('%:t').returns('test.lua')\n\n    local hl = require('lualine.highlight')\n    stub(hl, 'create_component_highlight_group')\n    hl.create_component_highlight_group.returns { name = 'MyCompHl', no_mode = false, section = 'a' }\n    stub(hl, 'format_highlight')\n    hl.format_highlight.returns('%#lualine_c_normal#')\n\n    local utils = require('lualine.utils.utils')\n    stub(utils, 'extract_highlight_colors')\n    utils.extract_highlight_colors.returns('#000')\n\n    local devicons = require('nvim-web-devicons')\n    stub(devicons, 'get_icon')\n    devicons.get_icon.on_call_with('test.lua').returns('*', 'test_highlight_group')\n\n    local opts = build_component_opts {\n      component_separators = { left = '', right = '' },\n      hl = '%#lualine_c_normal#',\n      padding = 0,\n      colored = true,\n      icon_only = false,\n    }\n    assert_component('filetype', opts, '%#MyCompHl_normal#* %#lualine_c_normal#lua%#lualine_c_normal#')\n    assert.stub(devicons.get_icon).was_called_with('test.lua')\n    assert.stub(utils.extract_highlight_colors).was_called_with('test_highlight_group', 'fg')\n    assert\n      .stub(hl.create_component_highlight_group)\n      .was_called_with({ fg = '#000' }, 'filetype_test_highlight_group', opts, false)\n    assert.stub(vim.fn.expand).was_called_with('%:t')\n\n    devicons.get_icon:revert()\n    utils.extract_highlight_colors:revert()\n    hl.create_component_highlight_group:revert()\n    hl.format_highlight:revert()\n    vim.fn.expand:revert()\n    vim.g.actual_curwin = nil\n  end)\n\n  it(\"doesn't color when colored is false\", function()\n    stub(vim.fn, 'expand')\n    vim.fn.expand.on_call_with('%:t').returns('test.lua')\n\n    local hl = require('lualine.highlight')\n    stub(hl, 'create_component_highlight_group')\n\n    local utils = require('lualine.utils.utils')\n    stub(utils, 'extract_highlight_colors')\n\n    local devicons = require('nvim-web-devicons')\n    stub(devicons, 'get_icon')\n    devicons.get_icon.on_call_with('test.lua').returns('*', 'test_highlight_group')\n\n    local opts = build_component_opts {\n      component_separators = { left = '', right = '' },\n      padding = 0,\n      colored = false,\n    }\n    assert_component('filetype', opts, '* lua')\n    assert.stub(devicons.get_icon).was_called_with('test.lua')\n    assert.stub(utils.extract_highlight_colors).was_not_called()\n    assert.stub(hl.create_component_highlight_group).was_not_called()\n    assert.stub(vim.fn.expand).was_called_with('%:t')\n\n    devicons.get_icon:revert()\n    utils.extract_highlight_colors:revert()\n    hl.create_component_highlight_group:revert()\n    vim.fn.expand:revert()\n  end)\n\n  it('displays only icon when icon_only is true', function()\n    stub(vim.fn, 'expand')\n    vim.fn.expand.on_call_with('%:t').returns('test.lua')\n\n    local hl = require('lualine.highlight')\n    stub(hl, 'create_component_highlight_group')\n\n    local utils = require('lualine.utils.utils')\n    stub(utils, 'extract_highlight_colors')\n\n    local devicons = require('nvim-web-devicons')\n    stub(devicons, 'get_icon')\n    devicons.get_icon.on_call_with('test.lua').returns('*', 'test_highlight_group')\n\n    local opts = build_component_opts {\n      component_separators = { left = '', right = '' },\n      padding = 0,\n      colored = false,\n      icon_only = true,\n    }\n    assert_component('filetype', opts, '* ')\n    assert.stub(devicons.get_icon).was_called_with('test.lua')\n    assert.stub(utils.extract_highlight_colors).was_not_called()\n    assert.stub(hl.create_component_highlight_group).was_not_called()\n    assert.stub(vim.fn.expand).was_called_with('%:t')\n\n    devicons.get_icon:revert()\n    utils.extract_highlight_colors:revert()\n    hl.create_component_highlight_group:revert()\n    vim.fn.expand:revert()\n  end)\n\n  it('displays right aligned icon when icon.align is \"right\"', function()\n    stub(vim.fn, 'expand')\n    vim.fn.expand.on_call_with('%:t').returns('test.lua')\n\n    local hl = require('lualine.highlight')\n    stub(hl, 'create_component_highlight_group')\n\n    local utils = require('lualine.utils.utils')\n    stub(utils, 'extract_highlight_colors')\n\n    local devicons = require('nvim-web-devicons')\n    stub(devicons, 'get_icon')\n    devicons.get_icon.on_call_with('test.lua').returns('*', 'test_highlight_group')\n\n    local opts = build_component_opts {\n      component_separators = { left = '', right = '' },\n      padding = 0,\n      colored = false,\n      icon_only = false,\n      icon = { align = 'right' },\n    }\n    assert_component('filetype', opts, 'lua * ')\n    assert.stub(devicons.get_icon).was_called_with('test.lua')\n    assert.stub(utils.extract_highlight_colors).was_not_called()\n    assert.stub(hl.create_component_highlight_group).was_not_called()\n    assert.stub(vim.fn.expand).was_called_with('%:t')\n\n    devicons.get_icon:revert()\n    utils.extract_highlight_colors:revert()\n    hl.create_component_highlight_group:revert()\n    vim.fn.expand:revert()\n  end)\n\n  it('uses filetype lookup when file has no extension', function()\n    stub(vim.fn, 'expand')\n    vim.fn.expand.on_call_with('%:t').returns('test')\n\n    local hl = require('lualine.highlight')\n    stub(hl, 'create_component_highlight_group')\n\n    local utils = require('lualine.utils.utils')\n    stub(utils, 'extract_highlight_colors')\n\n    local devicons = require('nvim-web-devicons')\n    stub(devicons, 'get_icon')\n    devicons.get_icon.on_call_with('test').returns(nil)\n    stub(devicons, 'get_icon_by_filetype')\n    devicons.get_icon_by_filetype.on_call_with('lua').returns('*', 'test_highlight_group')\n\n    local opts = build_component_opts {\n      component_separators = { left = '', right = '' },\n      padding = 0,\n      colored = false,\n      icon_only = false,\n    }\n    assert_component('filetype', opts, '* lua')\n    assert.stub(devicons.get_icon).was_called_with('test')\n    assert.stub(devicons.get_icon_by_filetype).was_called_with('lua')\n    assert.stub(utils.extract_highlight_colors).was_not_called()\n    assert.stub(hl.create_component_highlight_group).was_not_called()\n    assert.stub(vim.fn.expand).was_called_with('%:t')\n\n    devicons.get_icon_by_filetype:revert()\n    devicons.get_icon:revert()\n    utils.extract_highlight_colors:revert()\n    hl.create_component_highlight_group:revert()\n    vim.fn.expand:revert()\n  end)\nend)\n\ndescribe('Hostname component', function()\n  it('works', function()\n    stub(vim.loop, 'os_gethostname')\n    vim.loop.os_gethostname.returns('localhost')\n    local opts = build_component_opts {\n      component_separators = { left = '', right = '' },\n      padding = 0,\n    }\n    assert_component('hostname', opts, 'localhost')\n    vim.loop.os_gethostname:revert()\n  end)\nend)\n\ndescribe('Location component', function()\n  it('works', function()\n    local opts = build_component_opts {\n      component_separators = { left = '', right = '' },\n      padding = 0,\n    }\n    assert_component('location', opts, '  1:1 ')\n    vim.cmd('normal! 9o')\n    assert_component('location', opts, ' 10:1 ')\n    vim.api.nvim_win_set_cursor(0, { 5, 0 })\n    assert_component('location', opts, '  5:1 ')\n    -- test column number\n    vim.cmd('normal! oTest')\n    assert_component('location', opts, '  6:4 ')\n    -- test column number in line containing cyrillic symbols\n    vim.cmd('normal! oТест')\n    assert_component('location', opts, '  7:4 ')\n    vim.cmd('bdelete!')\n  end)\nend)\n\ndescribe('Progress component', function()\n  it('works', function()\n    local opts = build_component_opts {\n      component_separators = { left = '', right = '' },\n      padding = 0,\n    }\n    assert_component('progress', opts, 'Top')\n    vim.cmd('normal! 9o')\n    assert_component('progress', opts, 'Bot')\n    vim.api.nvim_win_set_cursor(0, { 5, 0 })\n    assert_component('progress', opts, '50%%')\n    vim.cmd('bdelete!')\n  end)\nend)\n\ndescribe('Mode component', function()\n  it('works', function()\n    stub(vim.api, 'nvim_get_mode')\n    vim.api.nvim_get_mode.returns { mode = 'n', blocking = false }\n    local opts = build_component_opts {\n      component_separators = { left = '', right = '' },\n      padding = 0,\n    }\n    assert_component('mode', opts, 'NORMAL')\n    vim.api.nvim_get_mode:revert()\n  end)\nend)\n\ndescribe('FileSize component', function()\n  it('works', function()\n    local opts = build_component_opts {\n      component_separators = { left = '', right = '' },\n      padding = 0,\n    }\n    local fname = 'test-file.txt'\n    local f = io.open(fname, 'w')\n    f:write(string.rep('........................................\\n', 200))\n    f:close()\n    vim.cmd(':edit ' .. fname)\n    assert_component('filesize', opts, '8.0k')\n    vim.cmd(':bdelete!')\n    os.remove(fname)\n  end)\nend)\n\ndescribe('Filename component', function()\n  it('works', function()\n    local opts = build_component_opts {\n      component_separators = { left = '', right = '' },\n      padding = 0,\n      file_status = false,\n      path = 0,\n    }\n    vim.cmd(':e test-file.txt')\n    assert_component('filename', opts, 'test-file.txt')\n    vim.cmd(':bdelete!')\n  end)\n\n  it('can show file_status', function()\n    local opts = build_component_opts {\n      component_separators = { left = '', right = '' },\n      padding = 0,\n      file_status = true,\n      path = 0,\n    }\n    vim.cmd(':e test-file.txt')\n    vim.bo.modified = false\n    assert_component('filename', opts, 'test-file.txt')\n    vim.bo.modified = true\n    assert_component('filename', opts, 'test-file.txt [+]')\n    vim.bo.ro = true\n    assert_component('filename', opts, 'test-file.txt [+][-]')\n    vim.bo.modified = false\n    assert_component('filename', opts, 'test-file.txt [-]')\n    vim.cmd(':bdelete!')\n  end)\n\n  it('can show new_file_status', function()\n    local opts = build_component_opts {\n      component_separators = { left = '', right = '' },\n      padding = 0,\n      newfile_status = true,\n      path = 0,\n    }\n    vim.cmd(':e new-file.txt')\n    assert_component('filename', opts, 'new-file.txt [New]')\n    vim.bo.modified = true\n    assert_component('filename', opts, 'new-file.txt [+][New]')\n    vim.cmd(':bdelete!')\n  end)\n\n  it('can show relative path', function()\n    local opts = build_component_opts {\n      component_separators = { left = '', right = '' },\n      padding = 0,\n      file_status = false,\n      path = 1,\n    }\n    vim.cmd(':e test-file.txt')\n    assert_component('filename', opts, vim.fn.expand('%:~:.'))\n    vim.cmd(':bdelete!')\n  end)\n\n  it('can show full path', function()\n    local opts = build_component_opts {\n      component_separators = { left = '', right = '' },\n      padding = 0,\n      file_status = false,\n      path = 2,\n      shorting_target = 0,\n    }\n    vim.cmd(':e test-file.txt')\n    assert_component('filename', opts, vim.fn.expand('%:p'))\n    vim.cmd(':bdelete!')\n  end)\n\n  it('shortens path', function()\n    stub(vim.fn, 'expand')\n    vim.fn.expand.on_call_with('%:p').returns('/home/foobar/test/test.lua')\n    stub(vim.fn, 'winwidth')\n    vim.fn.winwidth.on_call_with(0).returns(100)\n\n    local opts = build_component_opts {\n      component_separators = { left = '', right = '' },\n      padding = 0,\n      file_status = false,\n      path = 2,\n      shorting_target = 90,\n    }\n    vim.cmd(':e test-file.txt')\n    assert_component('filename', opts, '/h/f/t/test.lua')\n\n    vim.cmd(':bdelete!')\n    vim.fn.winwidth:revert()\n    vim.fn.expand:revert()\n  end)\n\n  it('shortens path with tilde', function()\n    stub(vim.fn, 'expand')\n    vim.fn.expand.on_call_with('%:p:~').returns('~/test/test.lua')\n    stub(vim.fn, 'winwidth')\n    vim.fn.winwidth.on_call_with(0).returns(100)\n\n    local opts = build_component_opts {\n      component_separators = { left = '', right = '' },\n      padding = 0,\n      file_status = false,\n      path = 3,\n      shorting_target = 90,\n    }\n    vim.cmd(':e test-file.txt')\n    assert_component('filename', opts, '~/t/test.lua')\n\n    vim.cmd(':bdelete!')\n    vim.fn.winwidth:revert()\n    vim.fn.expand:revert()\n  end)\n\n  it('shortens path with hidden directory', function()\n    stub(vim.fn, 'expand')\n    vim.fn.expand.on_call_with('%:p').returns('/home/foobar/.test/test.lua')\n    stub(vim.fn, 'winwidth')\n    vim.fn.winwidth.on_call_with(0).returns(100)\n\n    local opts = build_component_opts {\n      component_separators = { left = '', right = '' },\n      padding = 0,\n      file_status = false,\n      path = 2,\n      shorting_target = 90,\n    }\n    vim.cmd(':e test-file.txt')\n    assert_component('filename', opts, '/h/f/.t/test.lua')\n\n    vim.cmd(':bdelete!')\n    vim.fn.winwidth:revert()\n    vim.fn.expand:revert()\n  end)\n\n  it('shortens path with %', function()\n    stub(vim.fn, 'expand')\n    vim.fn.expand.on_call_with('%:p').returns('%dir1/%dir2/%actual_%file')\n    stub(vim.fn, 'winwidth')\n    vim.fn.winwidth.on_call_with(0).returns(100)\n\n    local opts = build_component_opts {\n      component_separators = { left = '', right = '' },\n      padding = 0,\n      file_status = false,\n      path = 2,\n      shorting_target = 90,\n    }\n    vim.cmd(':e test-file.txt')\n    assert_component('filename', opts, '%%/%%/%%actual_%%file')\n\n    vim.cmd(':bdelete!')\n    vim.fn.winwidth:revert()\n    vim.fn.expand:revert()\n  end)\nend)\n\ndescribe('vim option & variable component', function()\n  local opts = build_component_opts {\n    component_separators = { left = '', right = '' },\n    padding = 0,\n  }\n\n  local function assert_vim_var_component(name, options, result)\n    options[1] = name\n    assert_component('special.vim_var_component', options, result)\n    opts[1] = nil\n  end\n  it('works with variable', function()\n    assert_vim_var_component('g:gvar', opts, '')\n    vim.g.gvar = 'var1'\n    assert_vim_var_component('g:gvar', opts, 'var1')\n    vim.g.gvar = 'var2'\n    assert_vim_var_component('g:gvar', opts, 'var2')\n    vim.b.gvar = 'bvar1'\n    assert_vim_var_component('b:gvar', opts, 'bvar1')\n    vim.w.gvar = 'wvar1'\n    assert_vim_var_component('w:gvar', opts, 'wvar1')\n  end)\n  it('can index dictionaries', function()\n    vim.g.gvar = { a = { b = 'var-value' } }\n    assert_vim_var_component('g:gvar.a.b', opts, 'var-value')\n  end)\n  it('works with options', function()\n    local old_number = vim.wo.number\n    vim.wo.number = false\n    assert_vim_var_component('wo:number', opts, 'false')\n    vim.wo.number = old_number\n    local old_tw = vim.go.tw\n    vim.go.tw = 80\n    assert_vim_var_component('go:tw', opts, '80')\n    vim.go.tw = old_tw\n  end)\nend)\n\ndescribe('Vim option & variable component', function()\n  local opts = build_component_opts {\n    component_separators = { left = '', right = '' },\n    padding = 0,\n  }\n\n  local function assert_vim_var_component(name, options, result)\n    options[1] = name\n    assert_component('special.eval_func_component', options, result)\n    opts[1] = nil\n  end\n\n  it('works with vim function', function()\n    vim.cmd([[\n      func! TestFunction() abort\n        return \"TestVimFunction\"\n      endf\n    ]])\n    assert_vim_var_component('TestFunction', opts, 'TestVimFunction')\n    vim.cmd('delfunction TestFunction')\n  end)\n\n  it('works with lua expression', function()\n    _G.TestFunction = function()\n      return 'TestLuaFunction'\n    end\n    assert_vim_var_component('TestFunction()', opts, 'TestLuaFunction')\n    _G.TestFunction = nil\n  end)\nend)\n\ndescribe('Branch component', function()\n  -- these tests are broken in wsl will look at them later\n  if vim.fn.has('wsl') == 1 then\n    return\n  end\n  local tmpdir\n  local file\n  local git = function(...)\n    return vim.fn.system(\n      \"git -c user.name='asdf' -c user.email='asdf@jlk.org' -C \" .. tmpdir .. ' ' .. string.format(...)\n    )\n  end\n  local assert_comp_ins = helpers.assert_component_instance\n\n  before_each(function()\n    tmpdir = os.tmpname()\n    os.remove(tmpdir)\n    file = tmpdir .. '/test.txt'\n    vim.fn.mkdir(tmpdir, 'p')\n    git('init -b test_branch')\n    vim.cmd([[aug lualine\n    au!\n    aug END\n  ]])\n  end)\n\n  after_each(function()\n    os.remove(tmpdir)\n  end)\n\n  it('works with regular branches', function()\n    local opts = build_component_opts {\n      component_separators = { left = '', right = '' },\n      padding = 0,\n    }\n    local branch_comp = helpers.init_component('branch', opts)\n    vim.cmd('e ' .. file)\n    assert_comp_ins(branch_comp, ' test_branch')\n    git('checkout -b test_branch2')\n    vim.cmd('e k')\n    vim.cmd('bd')\n    vim.cmd('e ' .. file)\n    opts.icons_enabled = false\n    assert_comp_ins(branch_comp, 'test_branch2')\n  end)\n\n  it('works in detached head mode', function()\n    local opts = build_component_opts {\n      component_separators = { left = '', right = '' },\n      icons_enabled = false,\n      padding = 0,\n    }\n    git('checkout -b test_branch2')\n    git('commit --allow-empty -m \"test commit1\"')\n    git('commit --allow-empty -m \"test commit2\"')\n    git('commit --allow-empty -m \"test commit3\"')\n    git('checkout HEAD~1')\n    vim.cmd('e ' .. file)\n    local rev = git('rev-parse --short=6 HEAD'):sub(1, 6)\n    assert_component('branch', opts, rev)\n  end)\nend)\n\ndescribe('lsp_status component', function()\n  local assert_comp_ins = helpers.assert_component_instance\n  local tmpdir\n  local file\n  local opts = build_component_opts {\n    component_separators = { left = '', right = '' },\n    padding = 0,\n    ignore_lsp = { 'null-ls' },\n  }\n  local lsp_status_comp\n\n  before_each(function()\n    require('lualine').setup {}\n    tmpdir = os.tmpname()\n    file = os.tmpname() .. '/test.lua'\n    vim.cmd([[\n      augroup lualine\n        autocmd!\n      augroup END\n    ]])\n    lsp_status_comp = helpers.init_component('lsp_status', opts)\n  end)\n\n  after_each(function()\n    os.remove(tmpdir)\n  end)\n\n  it('is empty when no LSP', function()\n    vim.cmd('edit ' .. file)\n    stub(vim.lsp, 'get_clients')\n    vim.lsp.get_clients.on_call_with({ bufnr = vim.api.nvim_get_current_buf() }).returns {}\n\n    assert_comp_ins(lsp_status_comp, '')\n  end)\n\n  it('is empty when LSP is ignored', function()\n    vim.cmd('edit ' .. file)\n    stub(vim.lsp, 'get_clients')\n    vim.lsp.get_clients.on_call_with({ bufnr = vim.api.nvim_get_current_buf() }).returns {\n      { id = 2, name = 'null-ls' },\n    }\n\n    assert_comp_ins(lsp_status_comp, '')\n  end)\n\n  it('shows LSP name and icon when attached', function()\n    vim.cmd('edit ' .. file)\n    stub(vim.lsp, 'get_clients')\n    vim.lsp.get_clients.on_call_with({ bufnr = vim.api.nvim_get_current_buf() }).returns { { id = 2, name = 'lua_ls' } }\n\n    vim.cmd('edit ' .. file)\n\n    assert_comp_ins(lsp_status_comp, ' lua_ls')\n  end)\n\n  it('shows LSP name and icon in older nvim version', function()\n    vim.cmd('edit ' .. file)\n    vim.lsp.get_clients = nil\n    stub(vim.lsp, 'get_active_clients')\n    ---@diagnostic disable-next-line: deprecated\n    vim.lsp.get_active_clients\n      .on_call_with({ bufnr = vim.api.nvim_get_current_buf() })\n      .returns { { id = 2, name = 'lua_ls' } }\n\n    assert_comp_ins(lsp_status_comp, ' lua_ls')\n  end)\n\n  it('shows LSP progress when supported', function()\n    vim.cmd('edit ' .. file)\n    stub(vim.lsp, 'get_clients')\n    vim.lsp.get_clients.on_call_with({ bufnr = vim.api.nvim_get_current_buf() }).returns { { id = 2, name = 'lua_ls' } }\n    if vim.uv and vim.uv.hrtime then\n      stub(vim.uv, 'hrtime')\n      vim.uv.hrtime.on_call_with().returns(12 * 1e6 * 80)\n    elseif vim.loop and vim.loop.hrtime then\n      stub(vim.loop, 'hrtime')\n      vim.loop.hrtime.on_call_with().returns(12 * 1e6 * 80)\n    end\n\n    local ok = pcall(vim.api.nvim_exec_autocmds, 'LspProgress', {\n      data = { client_id = 2, params = { value = { kind = 'begin' } } },\n    })\n\n    -- Skip assertion if LSP progress updates are not supported by the current `nvim` version.\n    if ok then\n      -- Use spinner symbol 12 (time) % 10 (symbol table size) = 2.\n      assert_comp_ins(lsp_status_comp, ' lua_ls ⠹')\n    end\n  end)\n\n  it('shows LSP done when supported', function()\n    vim.cmd('edit ' .. file)\n    stub(vim.lsp, 'get_clients')\n    vim.lsp.get_clients.on_call_with({ bufnr = vim.api.nvim_get_current_buf() }).returns { { id = 2, name = 'lua_ls' } }\n\n    local ok = pcall(vim.api.nvim_exec_autocmds, 'LspProgress', {\n      data = { client_id = 2, params = { value = { kind = 'begin' } } },\n    }) and pcall(vim.api.nvim_exec_autocmds, 'LspProgress', {\n      data = { client_id = 2, params = { value = { kind = 'end' } } },\n    })\n\n    -- Skip assertion if LSP progress updates are not supported by the current `nvim` version.\n    if ok then\n      assert_comp_ins(lsp_status_comp, ' lua_ls ✓')\n    end\n  end)\n\n  it('shows LSP done when supported and no begin', function()\n    vim.cmd('edit ' .. file)\n    stub(vim.lsp, 'get_clients')\n    vim.lsp.get_clients.on_call_with({ bufnr = vim.api.nvim_get_current_buf() }).returns { { id = 2, name = 'lua_ls' } }\n\n    local ok = pcall(vim.api.nvim_exec_autocmds, 'LspProgress', {\n      data = { client_id = 2, params = { value = { kind = 'end' } } },\n    })\n\n    -- Skip assertion if LSP progress updates are not supported by the current `nvim` version.\n    if ok then\n      assert_comp_ins(lsp_status_comp, ' lua_ls ✓')\n    end\n  end)\n\n  it('does not add unnecessary space separator when LSP progress symbol is empty', function()\n    local opts_no_done = opts\n    opts_no_done.symbols = { done = '' }\n    local lsp_status_comp_no_done = helpers.init_component('lsp_status', opts)\n\n    vim.cmd('edit ' .. file)\n    stub(vim.lsp, 'get_clients')\n    vim.lsp.get_clients.on_call_with({ bufnr = vim.api.nvim_get_current_buf() }).returns { { id = 2, name = 'lua_ls' } }\n\n    local ok = pcall(vim.api.nvim_exec_autocmds, 'LspProgress', {\n      data = { client_id = 2, params = { value = { kind = 'begin' } } },\n    }) and pcall(vim.api.nvim_exec_autocmds, 'LspProgress', {\n      data = { client_id = 2, params = { value = { kind = 'end' } } },\n    })\n\n    -- Skip assertion if LSP progress updates are not supported by the current `nvim` version.\n    if ok then\n      assert_comp_ins(lsp_status_comp_no_done, ' lua_ls')\n    end\n  end)\nend)\n"
  },
  {
    "path": "tests/spec/config_spec.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n\nlocal eq = assert.are.same\n\ndescribe('config parsing', function()\n  local config_module = require('lualine.config')\n\n  describe('options', function()\n    describe('icons_enabled', function()\n      it('default', function()\n        local config = config_module.apply_configuration {}\n        eq(config.options.icons_enabled, true)\n      end)\n      it('custom', function()\n        local config = { options = { icons_enabled = false } }\n        config = config_module.apply_configuration(config)\n        eq(config.options.icons_enabled, false)\n      end)\n    end)\n\n    describe('theme', function()\n      it('default', function()\n        local config = config_module.apply_configuration {}\n        eq(config.options.theme, 'auto')\n      end)\n      it('custom', function()\n        local config = { options = { theme = 'nord' } }\n        config = config_module.apply_configuration(config)\n        eq(config.options.theme, 'nord')\n        config = { options = { theme = {} } }\n        config = config_module.apply_configuration(config)\n        eq(config.options.theme, {})\n      end)\n    end)\n\n    describe('separators', function()\n      it('default', function()\n        local config = config_module.apply_configuration {}\n        eq(config.options.component_separators, { left = '', right = '' })\n        eq(config.options.section_separators, { left = '', right = '' })\n      end)\n      it('double separators', function()\n        local config = {\n          options = {\n            component_separators = { left = 'a', right = 'b' },\n            section_separators = { left = 'c', right = 'd' },\n          },\n        }\n        config = config_module.apply_configuration(config)\n        eq(config.options.component_separators, { left = 'a', right = 'b' })\n        eq(config.options.section_separators, { left = 'c', right = 'd' })\n      end)\n\n      describe('single separator', function()\n        it('string', function()\n          local config = {\n            options = { component_separators = 'a', section_separators = 'b' },\n          }\n          config = config_module.apply_configuration(config)\n          eq(config.options.component_separators, { left = 'a', right = 'a' })\n          eq(config.options.section_separators, { left = 'b', right = 'b' })\n        end)\n        it('table', function()\n          local config = {\n            options = {\n              component_separators = { left = 'a', right = 'b' },\n              section_separators = { left = 'b', right = 'a' },\n            },\n          }\n          config = config_module.apply_configuration(config)\n          eq(config.options.component_separators, { left = 'a', right = 'b' })\n          eq(config.options.section_separators, { left = 'b', right = 'a' })\n        end)\n      end)\n      it('no separators', function()\n        local config = {\n          options = { component_separators = {}, section_separators = {} },\n        }\n        config = config_module.apply_configuration(config)\n        eq(config.options.component_separators, {})\n        eq(config.options.section_separators, {})\n      end)\n    end)\n\n    describe('disabled filetypes', function()\n      it('default', function()\n        local config = config_module.apply_configuration {}\n        eq(config.options.disabled_filetypes, { statusline = {}, winbar = {} })\n      end)\n      it('custom', function()\n        local config = { options = { disabled_filetypes = { 'lua' } } }\n        config = config_module.apply_configuration(config)\n        eq(config.options.disabled_filetypes, { statusline = { 'lua' }, winbar = { 'lua' } })\n      end)\n    end)\n\n    describe('non default global option', function()\n      it('default', function()\n        local config = { options = {} }\n        config = config_module.apply_configuration(config)\n        eq(config.options.non_default_global_option, nil)\n      end)\n      it('custom', function()\n        local config = { options = { non_default_global_option = 1 } }\n        config = config_module.apply_configuration(config)\n        eq(config.options.non_default_global_option, 1)\n      end)\n    end)\n  end)\n\n  describe('sections', function()\n    it('default', function()\n      local config = {}\n      config = config_module.apply_configuration(config)\n      local lualine_default_sections = {\n        lualine_a = { 'mode' },\n        lualine_b = { 'branch', 'diff', 'diagnostics' },\n        lualine_c = { 'filename' },\n        lualine_x = { 'encoding', 'fileformat', 'filetype' },\n        lualine_y = { 'progress' },\n        lualine_z = { 'location' },\n      }\n      eq(config.sections, lualine_default_sections)\n    end)\n    it('custom', function()\n      local custom_sections = {\n        lualine_a = { { 'mode', lower = true } },\n        lualine_b = { 'branch', { 'branch', lower = true } },\n        lualine_c = nil,\n        lualine_x = {},\n      }\n      local expected_sections = {\n        lualine_a = { { 'mode', lower = true } },\n        lualine_b = { 'branch', { 'branch', lower = true } },\n        lualine_c = { 'filename' },\n        lualine_x = {},\n        lualine_y = { 'progress' },\n        lualine_z = { 'location' },\n      }\n      local config = { sections = custom_sections }\n      config = config_module.apply_configuration(config)\n      eq(config.sections, expected_sections)\n    end)\n  end)\n\n  describe('inactive_sections', function() end)\n\n  describe('tabline', function()\n    it('default', function()\n      local config = {}\n      config = config_module.apply_configuration(config)\n      eq(config.tabline, {})\n    end)\n    it('custom', function()\n      local custom_sections = {\n        lualine_a = { { 'mode', lower = true } },\n        lualine_b = { 'branch', { 'branch', lower = true } },\n        lualine_c = nil,\n        lualine_x = {},\n      }\n      local expected_sections = {\n        lualine_a = { { 'mode', lower = true } },\n        lualine_b = { 'branch', { 'branch', lower = true } },\n        lualine_x = {},\n      }\n      local config = { tabline = custom_sections }\n      config = config_module.apply_configuration(config)\n      eq(config.tabline, expected_sections)\n    end)\n  end)\n\n  describe('extensions', function()\n    it('default', function()\n      local config = { options = {} }\n      config = config_module.apply_configuration(config)\n      eq(config.extensions, {})\n    end)\n    it('custom', function()\n      local config = { extensions = { 'fugitive' } }\n      config = config_module.apply_configuration(config)\n      eq(config.extensions, { 'fugitive' })\n    end)\n  end)\nend)\n"
  },
  {
    "path": "tests/spec/lualine_spec.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n\nlocal eq = assert.are.same\nlocal statusline = require('tests.statusline').new(120, 'active')\nlocal inactive_statusline = statusline.new(120, 'inactive')\nlocal tabline = statusline.new(120, 'tabline')\n\ndescribe('Lualine', function()\n  local config\n  before_each(function()\n    config = {\n      options = {\n        icons_enabled = true,\n        theme = 'gruvbox',\n        component_separators = { left = '', right = '' },\n        section_separators = { left = '', right = '' },\n        disabled_filetypes = {\n          statusline = {},\n          winbar = {},\n        },\n        ignore_focus = {},\n        always_divide_middle = true,\n        always_show_tabline = true,\n        globalstatus = false,\n        refresh = {\n          statusline = 1000,\n          tabline = 1000,\n          winbar = 1000,\n          refresh_time = 16, -- ~60fps\n          events = {\n            'WinEnter',\n            'BufEnter',\n            'BufWritePost',\n            'SessionLoadPost',\n            'FileChangedShellPost',\n            'VimResized',\n            'Filetype',\n            'CursorMoved',\n            'CursorMovedI',\n            'ModeChanged',\n          },\n        },\n      },\n      sections = {\n        lualine_a = { 'mode' },\n        -- We can't test branch component inside lualines repo.\n        -- As branch name will differ in pr/CI. We could setup a dummy repo\n        -- but plenary doesn't yet support setup() & teardown() so replacing\n        -- branch with a dummy component.\n        lualine_b = {\n          {\n            function()\n              return 'master'\n            end,\n            icon = '',\n          },\n          'diagnostics',\n        },\n        lualine_c = { 'filename' },\n        lualine_x = { 'encoding', 'fileformat', 'filetype' },\n        lualine_y = { 'progress' },\n        lualine_z = { 'location' },\n      },\n      inactive_sections = {\n        lualine_a = {},\n        lualine_b = {},\n        lualine_c = { 'filename' },\n        lualine_x = { 'location' },\n        lualine_y = {},\n        lualine_z = {},\n      },\n      tabline = {},\n      winbar = {},\n      inactive_winbar = {},\n      extensions = {},\n    }\n\n    vim.opt.swapfile = false\n    vim.cmd('bufdo bdelete')\n    pcall(vim.cmd, 'tabdo tabclose')\n    require('lualine').setup(config)\n  end)\n\n  it('shows active statusline', function()\n    statusline:expect([===[\n    highlights = {\n        1: lualine_a_normal = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n        2: lualine_transitional_lualine_a_normal_to_lualine_b_normal = { bg = \"#504945\", fg = \"#a89984\", nocombine = true }\n        3: lualine_b_normal = { bg = \"#504945\", fg = \"#ebdbb2\", nocombine = true }\n        4: lualine_transitional_lualine_b_normal_to_lualine_c_normal = { bg = \"#3c3836\", fg = \"#504945\", nocombine = true }\n        5: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n    }\n    |{1: NORMAL }\n    {2:}\n    {3:  master }\n    {4:}\n    {5: [No Name] }\n    {5:                                                                       }\n    {5:  }\n    {4:}\n    {3: Top }\n    {2:}\n    {1:   1:1  }|\n    ]===])\n  end)\n\n  it('shows inactive statusline', function()\n    inactive_statusline:expect([===[\n    highlights = {\n        1: lualine_c_inactive = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n    }\n    |{1: [No Name] }\n    {1:                                                                                                     }\n    {1:   1:1  }|\n    ]===])\n  end)\n\n  it('get_config can retrieve config', function()\n    eq(config, require('lualine').get_config())\n  end)\n\n  it('can live update config', function()\n    local conf = require('lualine').get_config()\n    conf.sections.lualine_a = {}\n    require('lualine').setup(conf)\n    statusline:expect([===[\n    highlights = {\n        1: lualine_b_normal = { bg = \"#504945\", fg = \"#ebdbb2\", nocombine = true }\n        2: lualine_transitional_lualine_b_normal_to_lualine_c_normal = { bg = \"#3c3836\", fg = \"#504945\", nocombine = true }\n        3: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n        4: lualine_transitional_lualine_a_normal_to_lualine_b_normal = { bg = \"#504945\", fg = \"#a89984\", nocombine = true }\n        5: lualine_a_normal = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n    }\n    |{1:  master }\n    {2:}\n    {3: [No Name] }\n    {3:                                                                                }\n    {3:  }\n    {2:}\n    {1: Top }\n    {4:}\n    {5:   1:1  }|\n    ]===])\n  end)\n\n  it('Can work without section separators', function()\n    config.options.section_separators = ''\n    require('lualine').setup(config)\n    statusline:expect([===[\n    highlights = {\n        1: lualine_a_normal = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n        2: lualine_b_normal = { bg = \"#504945\", fg = \"#ebdbb2\", nocombine = true }\n        3: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n    }\n    |{1: NORMAL }\n    {2:  master }\n    {3: [No Name] }\n    {3:                                                                           }\n    {3:  }\n    {2: Top }\n    {1:   1:1  }|\n    ]===])\n  end)\n\n  it('Can work without component_separators', function()\n    table.insert(config.sections.lualine_a, function()\n      return 'test_comp1'\n    end)\n    table.insert(config.sections.lualine_z, function()\n      return 'test_comp2'\n    end)\n\n    require('lualine').setup(config)\n    statusline:expect([===[\n    highlights = {\n        1: lualine_a_normal = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n        2: lualine_transitional_lualine_a_normal_to_lualine_b_normal = { bg = \"#504945\", fg = \"#a89984\", nocombine = true }\n        3: lualine_b_normal = { bg = \"#504945\", fg = \"#ebdbb2\", nocombine = true }\n        4: lualine_transitional_lualine_b_normal_to_lualine_c_normal = { bg = \"#3c3836\", fg = \"#504945\", nocombine = true }\n        5: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n    }\n    |{1: NORMAL }\n    {1: test_comp1 }\n    {2:}\n    {3:  master }\n    {4:}\n    {5: [No Name] }\n    {5:                                             }\n    {5:  }\n    {4:}\n    {3: Top }\n    {2:}\n    {1:   1:1  }\n    {1: test_comp2 }|\n    ]===])\n\n    config.options.component_separators = ''\n    require('lualine').setup(config)\n    statusline:expect([===[\n    highlights = {\n        1: lualine_a_normal = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n        2: lualine_transitional_lualine_a_normal_to_lualine_b_normal = { bg = \"#504945\", fg = \"#a89984\", nocombine = true }\n        3: lualine_b_normal = { bg = \"#504945\", fg = \"#ebdbb2\", nocombine = true }\n        4: lualine_transitional_lualine_b_normal_to_lualine_c_normal = { bg = \"#3c3836\", fg = \"#504945\", nocombine = true }\n        5: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n    }\n    |{1: NORMAL }\n    {1: test_comp1 }\n    {2:}\n    {3:  master }\n    {4:}\n    {5: [No Name] }\n    {5:                                               }\n    {5:  }\n    {4:}\n    {3: Top }\n    {2:}\n    {1:   1:1  }\n    {1: test_comp2 }|\n    ]===])\n  end)\n\n  it('mid divider can be disabled on special case', function()\n    config.options.always_divide_middle = false\n    config.sections.lualine_x = {}\n    config.sections.lualine_y = {}\n    config.sections.lualine_z = {}\n    require('lualine').setup(config)\n    statusline:expect([===[\n    highlights = {\n        1: lualine_a_normal = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n        2: lualine_transitional_lualine_a_normal_to_lualine_b_normal = { bg = \"#504945\", fg = \"#a89984\", nocombine = true }\n        3: lualine_b_normal = { bg = \"#504945\", fg = \"#ebdbb2\", nocombine = true }\n        4: lualine_transitional_lualine_b_normal_to_lualine_c_normal = { bg = \"#3c3836\", fg = \"#504945\", nocombine = true }\n        5: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n    }\n    |{1: NORMAL }\n    {2:}\n    {3:  master }\n    {4:}\n    {5: [No Name] }|\n    ]===])\n  end)\n\n  it('works with icons disabled', function()\n    config.options.icons_enabled = false\n    config.options.section_separators = ''\n    require('lualine').setup(config)\n    statusline:expect([===[\n    highlights = {\n        1: lualine_a_normal = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n        2: lualine_b_normal = { bg = \"#504945\", fg = \"#ebdbb2\", nocombine = true }\n        3: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n    }\n    |{1: NORMAL }\n    {2: master }\n    {3: [No Name] }\n    {3:                                                                          }\n    {3: unix }\n    {2: Top }\n    {1:   1:1  }|\n    ]===])\n  end)\n\n  it('can be desabled for specific filetypes', function()\n    config.options.disabled_filetypes = { 'test_ft' }\n    require('lualine').setup(config)\n    local old_ft = vim.bo.ft\n    vim.bo.ft = 'test_ft'\n    statusline:expect(nil)\n    vim.bo.ft = old_ft\n  end)\n\n  it('can apply custom extensions', function()\n    table.insert(config.extensions, {\n      filetypes = { 'test_ft' },\n      sections = {\n        lualine_a = {\n          function()\n            return 'custom_extension_component'\n          end,\n        },\n      },\n    })\n    local old_ft = vim.bo.ft\n    vim.bo.ft = 'test_ft'\n    require('lualine').setup(config)\n    statusline:expect([===[\n    highlights = {\n        1: lualine_a_normal = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n        2: lualine_transitional_lualine_a_normal_to_lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n        3: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n    }\n    |{1: custom_extension_component }\n    {2:}\n    {3:                                                                                           }|\n    ]===])\n    vim.bo.ft = old_ft\n  end)\n\n  it('same extension can be applied to multiple filetypes', function()\n    table.insert(config.extensions, {\n      filetypes = { 'test_ft1', 'test_ft2' },\n      sections = {\n        lualine_a = {\n          function()\n            return 'custom_extension_component'\n          end,\n        },\n      },\n    })\n    local old_ft = vim.bo.ft\n    vim.bo.ft = 'test_ft1'\n    require('lualine').setup(config)\n    statusline:expect([===[\n    highlights = {\n        1: lualine_a_normal = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n        2: lualine_transitional_lualine_a_normal_to_lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n        3: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n    }\n    |{1: custom_extension_component }\n    {2:}\n    {3:                                                                                           }|\n    ]===])\n    vim.bo.ft = old_ft\n    statusline:expect([===[\n    highlights = {\n        1: lualine_a_normal = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n        2: lualine_transitional_lualine_a_normal_to_lualine_b_normal = { bg = \"#504945\", fg = \"#a89984\", nocombine = true }\n        3: lualine_b_normal = { bg = \"#504945\", fg = \"#ebdbb2\", nocombine = true }\n        4: lualine_transitional_lualine_b_normal_to_lualine_c_normal = { bg = \"#3c3836\", fg = \"#504945\", nocombine = true }\n        5: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n    }\n    |{1: NORMAL }\n    {2:}\n    {3:  master }\n    {4:}\n    {5: [No Name] }\n    {5:                                                                       }\n    {5:  }\n    {4:}\n    {3: Top }\n    {2:}\n    {1:   1:1  }|\n    ]===])\n    vim.bo.ft = 'test_ft2'\n    statusline:expect([===[\n    highlights = {\n        1: lualine_a_normal = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n        2: lualine_transitional_lualine_a_normal_to_lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n        3: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n    }\n    |{1: custom_extension_component }\n    {2:}\n    {3:                                                                                           }|\n    ]===])\n    vim.bo.ft = old_ft\n  end)\n\n  -- TODO: figure put why some of the tablines tests fail in CI\n  describe('tabline', function()\n    local tab_conf = vim.deepcopy(config)\n    tab_conf.tabline = {\n      lualine_a = {\n        function()\n          return 'tabline_component'\n        end,\n      },\n      lualine_b = {},\n      lualine_c = {},\n      lualine_x = {},\n      lualine_y = {},\n      lualine_z = {},\n    }\n\n    it('can use tabline', function()\n      local conf = vim.deepcopy(tab_conf)\n      conf.tabline.lualine_a = {\n        function()\n          return 'tabline_component'\n        end,\n      }\n      require('lualine').setup(conf)\n      require('lualine').statusline()\n      tabline:expect([===[\n      highlights = {\n          1: lualine_a_normal = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n          2: lualine_transitional_lualine_a_normal_to_lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n          3: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n      }\n      |{1: tabline_component }\n      {2:}\n      {3:                                                                                                    }|\n      ]===])\n    end)\n\n    it('can use tabline as statusline', function()\n      local conf = vim.deepcopy(config)\n      conf.tabline = conf.sections\n      conf.sections = {}\n      conf.inactive_sections = {}\n      require('lualine').setup(conf)\n      require('lualine').statusline()\n\n      -- TODO: check why this test fails because of debounce\n      -- eq('%#Normal#', vim.go.statusline)\n\n      tabline:expect([===[\n      highlights = {\n          1: lualine_a_normal = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n          2: lualine_transitional_lualine_a_normal_to_lualine_b_normal = { bg = \"#504945\", fg = \"#a89984\", nocombine = true }\n          3: lualine_b_normal = { bg = \"#504945\", fg = \"#ebdbb2\", nocombine = true }\n          4: lualine_transitional_lualine_b_normal_to_lualine_c_normal = { bg = \"#3c3836\", fg = \"#504945\", nocombine = true }\n          5: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n      }\n      |{1: NORMAL }\n      {2:}\n      {3:  master }\n      {4:}\n      {5: [No Name] }\n      {5:                                                                       }\n      {5:  }\n      {4:}\n      {3: Top }\n      {2:}\n      {1:   1:1  }|\n      ]===])\n    end)\n    describe('tabs component', function()\n      it('works', function()\n        local conf = vim.deepcopy(tab_conf)\n        conf.tabline.lualine_a = { { 'tabs', max_length = 1e3 } }\n        vim.cmd('tabnew')\n        vim.cmd('tabnew')\n        require('lualine').setup(conf)\n        require('lualine').statusline()\n        tabline:expect([===[\n        highlights = {\n            1: lualine_a_tabs_inactive = { bg = \"#3c3836\", bold = true, fg = \"#a89984\", nocombine = true }\n            2: lualine_transitional_lualine_a_tabs_inactive_to_lualine_a_tabs_active = { bg = \"#a89984\", fg = \"#3c3836\", nocombine = true }\n            3: lualine_a_tabs_active = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n            4: lualine_transitional_lualine_a_tabs_active_to_lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n            5: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n        }\n        |{1: 1 }\n        {1: 2 }\n        {2:}\n        {3: 3 }\n        {4:}\n        {5:                                                                                                            }|\n        ]===])\n\n        vim.cmd('tabprev')\n        tabline:expect([===[\n        highlights = {\n            1: lualine_a_tabs_inactive = { bg = \"#3c3836\", bold = true, fg = \"#a89984\", nocombine = true }\n            2: lualine_transitional_lualine_a_tabs_inactive_to_lualine_a_tabs_active = { bg = \"#a89984\", fg = \"#3c3836\", nocombine = true }\n            3: lualine_a_tabs_active = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n            4: lualine_transitional_lualine_a_tabs_active_to_lualine_a_tabs_inactive = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n            5: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n        }\n        |{1: 1 }\n        {2:}\n        {3: 2 }\n        {4:}\n        {1: 3 }\n        {5:                                                                                                             }|\n        ]===])\n\n        vim.cmd('tabprev')\n        tabline:expect([===[\n        highlights = {\n            1: lualine_a_tabs_active = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n            2: lualine_transitional_lualine_a_tabs_active_to_lualine_a_tabs_inactive = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n            3: lualine_a_tabs_inactive = { bg = \"#3c3836\", bold = true, fg = \"#a89984\", nocombine = true }\n            4: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n        }\n        |{1: 1 }\n        {2:}\n        {3: 2 }\n        {3: 3 }\n        {4:                                                                                                             }|\n        ]===])\n      end)\n\n      it('mode option can change layout', function()\n        local conf = vim.deepcopy(tab_conf)\n        conf.tabline.lualine_a = { { 'tabs', max_length = 1e3, mode = 0 } }\n        vim.cmd('tabe ' .. 'a.txt')\n        vim.cmd('tabe ' .. 'b.txt')\n        require('lualine').setup(conf)\n        require('lualine').statusline()\n        tabline:expect([===[\n        highlights = {\n            1: lualine_a_tabs_inactive = { bg = \"#3c3836\", bold = true, fg = \"#a89984\", nocombine = true }\n            2: lualine_transitional_lualine_a_tabs_inactive_to_lualine_a_tabs_active = { bg = \"#a89984\", fg = \"#3c3836\", nocombine = true }\n            3: lualine_a_tabs_active = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n            4: lualine_transitional_lualine_a_tabs_active_to_lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n            5: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n        }\n        |{1: 1 }\n        {1: 2 }\n        {2:}\n        {3: 3 }\n        {4:}\n        {5:                                                                                                            }|\n        ]===])\n\n        tabline:expect([===[\n        highlights = {\n            1: lualine_a_tabs_inactive = { bg = \"#3c3836\", bold = true, fg = \"#a89984\", nocombine = true }\n            2: lualine_transitional_lualine_a_tabs_inactive_to_lualine_a_tabs_active = { bg = \"#a89984\", fg = \"#3c3836\", nocombine = true }\n            3: lualine_a_tabs_active = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n            4: lualine_transitional_lualine_a_tabs_active_to_lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n            5: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n        }\n        |{1: 1 }\n        {1: 2 }\n        {2:}\n        {3: 3 }\n        {4:}\n        {5:                                                                                                            }|\n        ]===])\n\n        conf.tabline.lualine_a = { { 'tabs', max_length = 1e3, mode = 1 } }\n        require('lualine').setup(conf)\n        require('lualine').statusline()\n        tabline:expect([===[\n        highlights = {\n            1: lualine_a_tabs_inactive = { bg = \"#3c3836\", bold = true, fg = \"#a89984\", nocombine = true }\n            2: lualine_transitional_lualine_a_tabs_inactive_to_lualine_a_tabs_active = { bg = \"#a89984\", fg = \"#3c3836\", nocombine = true }\n            3: lualine_a_tabs_active = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n            4: lualine_transitional_lualine_a_tabs_active_to_lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n            5: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n        }\n        |{1: [No Name] }\n        {1: a.txt }\n        {2:}\n        {3: b.txt }\n        {4:}\n        {5:                                                                                            }|\n        ]===])\n\n        conf.tabline.lualine_a = { { 'tabs', max_length = 1e3, mode = 2 } }\n        require('lualine').setup(conf)\n        require('lualine').statusline()\n        tabline:expect([===[\n        highlights = {\n            1: lualine_a_tabs_inactive = { bg = \"#3c3836\", bold = true, fg = \"#a89984\", nocombine = true }\n            2: lualine_transitional_lualine_a_tabs_inactive_to_lualine_a_tabs_active = { bg = \"#a89984\", fg = \"#3c3836\", nocombine = true }\n            3: lualine_a_tabs_active = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n            4: lualine_transitional_lualine_a_tabs_active_to_lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n            5: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n        }\n        |{1: 1 [No Name] }\n        {1: 2 a.txt }\n        {2:}\n        {3: 3 b.txt }\n        {4:}\n        {5:                                                                                      }|\n        ]===])\n      end)\n    end)\n\n    describe('buffers component', function()\n      it('works', function()\n        local conf = vim.deepcopy(tab_conf)\n        conf.tabline.lualine_a = { { 'buffers', max_length = 1e3, icons_enabled = false } }\n        vim.cmd('tabe ' .. 'a.txt')\n        vim.cmd('tabe ' .. 'b.txt')\n        require('lualine').setup(conf)\n        require('lualine').statusline()\n        tabline:expect([===[\n        highlights = {\n            1: lualine_a_buffers_inactive = { bg = \"#3c3836\", bold = true, fg = \"#a89984\", nocombine = true }\n            2: lualine_transitional_lualine_a_buffers_inactive_to_lualine_a_buffers_active = { bg = \"#a89984\", fg = \"#3c3836\", nocombine = true }\n            3: lualine_a_buffers_active = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n            4: lualine_transitional_lualine_a_buffers_active_to_lualine_a_buffers_inactive = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n            5: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n        }\n        |{1: #a.txt }\n        {2:}\n        {3: b.txt }\n        {4:}\n        {1: [No Name] }\n        {MATCH:{5:%s+}|}\n        ]===])\n\n        vim.cmd('tabprev')\n        tabline:expect([===[\n        highlights = {\n            1: lualine_a_buffers_active = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n            2: lualine_transitional_lualine_a_buffers_active_to_lualine_a_buffers_inactive = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n            3: lualine_a_buffers_inactive = { bg = \"#3c3836\", bold = true, fg = \"#a89984\", nocombine = true }\n            4: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n        }\n        |{1: a.txt }\n        {2:}\n        {3: b.txt }\n        {3: #[No Name] }\n        {MATCH:{4:%s+}|}\n        ]===])\n\n        vim.cmd('tabprev')\n        tabline:expect([===[\n        highlights = {\n            1: lualine_a_buffers_inactive = { bg = \"#3c3836\", bold = true, fg = \"#a89984\", nocombine = true }\n            2: lualine_transitional_lualine_a_buffers_inactive_to_lualine_a_buffers_active = { bg = \"#a89984\", fg = \"#3c3836\", nocombine = true }\n            3: lualine_a_buffers_active = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n            4: lualine_transitional_lualine_a_buffers_active_to_lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n            5: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n        }\n        |{1: a.txt }\n        {1: #b.txt }\n        {2:}\n        {3: [No Name] }\n        {4:}\n        {MATCH:{5:%s+}|}\n        ]===])\n      end)\n\n      it('mode option can change layout', function()\n        local conf = vim.deepcopy(tab_conf)\n        conf.tabline.lualine_a = { { 'tabs', max_length = 1e3, mode = 0, icons_enabled = false } }\n        vim.cmd('tabe ' .. 'a.txt')\n        vim.cmd('tabe ' .. 'b.txt')\n        require('lualine').setup(conf)\n        require('lualine').statusline()\n        tabline:expect([===[\n        highlights = {\n            1: lualine_a_tabs_inactive = { bg = \"#3c3836\", bold = true, fg = \"#a89984\", nocombine = true }\n            2: lualine_transitional_lualine_a_tabs_inactive_to_lualine_a_tabs_active = { bg = \"#a89984\", fg = \"#3c3836\", nocombine = true }\n            3: lualine_a_tabs_active = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n            4: lualine_transitional_lualine_a_tabs_active_to_lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n            5: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n        }\n        {MATCH:|{1: %d+ }}\n        {MATCH:{1: %d+ }}\n        {2:}\n        {MATCH:{3: %d+ }}\n        {4:}\n        {MATCH:{5:%s+}|}\n        ]===])\n\n        conf.tabline.lualine_a = { { 'buffers', max_length = 1e3, mode = 1, icons_enabled = false } }\n        require('lualine').setup(conf)\n        require('lualine').statusline()\n        tabline:expect([===[\n        highlights = {\n            1: lualine_a_buffers_inactive = { bg = \"#3c3836\", bold = true, fg = \"#a89984\", nocombine = true }\n            2: lualine_transitional_lualine_a_buffers_inactive_to_lualine_a_buffers_active = { bg = \"#a89984\", fg = \"#3c3836\", nocombine = true }\n            3: lualine_a_buffers_active = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n            4: lualine_transitional_lualine_a_buffers_active_to_lualine_a_buffers_inactive = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n            5: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n        }\n        {MATCH:|{1: #%d+  }}\n        {2:}\n        {MATCH:{3: %d+  }}\n        {4:}\n        {MATCH:{1: %d+  }}\n        {MATCH:{5:%s+}|}\n        ]===])\n\n        conf.tabline.lualine_a = { { 'buffers', max_length = 1e3, mode = 2, icons_enabled = false } }\n        require('lualine').setup(conf)\n        require('lualine').statusline()\n        tabline:expect([===[\n        highlights = {\n            1: lualine_a_buffers_inactive = { bg = \"#3c3836\", bold = true, fg = \"#a89984\", nocombine = true }\n            2: lualine_transitional_lualine_a_buffers_inactive_to_lualine_a_buffers_active = { bg = \"#a89984\", fg = \"#3c3836\", nocombine = true }\n            3: lualine_a_buffers_active = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n            4: lualine_transitional_lualine_a_buffers_active_to_lualine_a_buffers_inactive = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n            5: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n        }\n        {MATCH:|{1: #%d+ a.txt }}\n        {2:}\n        {MATCH:{3: %d+ b.txt }}\n        {4:}\n        {MATCH:{1: %d+ %[No Name%] }}\n        {MATCH:{5:%s+}|}\n        ]===])\n      end)\n\n      it('can show modified status', function()\n        local conf = vim.deepcopy(tab_conf)\n        conf.tabline.lualine_a = { { 'buffers', max_length = 1e3, show_modified_status = true, icons_enabled = false } }\n        require('lualine').setup(conf)\n        require('lualine').statusline()\n        tabline:expect([===[\n        highlights = {\n            1: lualine_a_buffers_active = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n            2: lualine_transitional_lualine_a_buffers_active_to_lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n            3: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n        }\n        |{1: [No Name] }\n        {2:}\n        {3:                                                                                                            }|\n        ]===])\n\n        vim.bo.modified = true\n        tabline:expect([===[\n        highlights = {\n            1: lualine_a_buffers_active = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n            2: lualine_transitional_lualine_a_buffers_active_to_lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n            3: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n        }\n        |{1: [No Name] ● }\n        {2:}\n        {3:                                                                                                          }|\n        ]===])\n        vim.bo.modified = false\n      end)\n\n      it('can show relative path', function()\n        local conf = vim.deepcopy(tab_conf)\n        conf.tabline.lualine_a = { { 'buffers', max_length = 1e3, show_filename_only = false, icons_enabled = false } }\n        require('lualine').setup(conf)\n        require('lualine').statusline()\n        local path = 'aaaaaa/bbbbb/cccccc/ddddd/eeeee/ffff/gggg'\n        vim.fn.mkdir(path, 'p')\n        vim.cmd('e ' .. path .. '/asdf.txt')\n        tabline:expect([===[\n        highlights = {\n            1: lualine_a_buffers_active = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n            2: lualine_transitional_lualine_a_buffers_active_to_lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n            3: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n        }\n        |{1: a/b/c/d/e/f/g/asdf.txt }\n        {2:}\n        {3:                                                                                               }|\n        ]===])\n        vim.fn.delete(path:match('(%w+)/.*'), 'rf')\n      end)\n\n      it('can show ellipsis when max_width is crossed', function()\n        local conf = vim.deepcopy(tab_conf)\n        conf.tabline.lualine_a = { { 'buffers', max_length = 1 } }\n        vim.cmd('tabe a.txt')\n        vim.cmd('tabe b.txt')\n        vim.cmd('tabprev')\n        require('lualine').setup(conf)\n        require('lualine').statusline()\n        tabline:expect([===[\n        highlights = {\n            1: lualine_a_buffers_active = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n            2: lualine_transitional_lualine_a_buffers_active_to_lualine_a_buffers_inactive = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n            3: lualine_a_buffers_inactive = { bg = \"#3c3836\", bold = true, fg = \"#a89984\", nocombine = true }\n            4: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n        }\n        |{1: 󰈙 a.txt }\n        {2:}\n        {3: ... }\n        {4:                                                                                                         }|\n        ]===])\n      end)\n\n      it('can show filetype icons', function()\n        local conf = vim.deepcopy(tab_conf)\n        conf.tabline.lualine_a = { { 'buffers', max_length = 1e3, show_filename_only = false } }\n        require('lualine').setup(conf)\n        require('lualine').statusline()\n        vim.cmd('e t.lua')\n        tabline:expect([===[\n        highlights = {\n            1: lualine_a_buffers_active = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n            2: lualine_transitional_lualine_a_buffers_active_to_lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n            3: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n        }\n        |{1:  t.lua }\n        {2:}\n        {3:                                                                                                              }|\n        ]===])\n      end)\n\n      it('can show buffer numbers instead of indices (without file names)', function()\n        local conf = vim.deepcopy(tab_conf)\n        conf.tabline.lualine_a = { { 'buffers', mode = 3, max_length = 1e3, icons_enabled = false } }\n        require('lualine').setup(conf)\n        require('lualine').statusline()\n        vim.cmd('e a.txt')\n        vim.cmd('silent! bd #') -- NeoVim 0.5 does not create an unnamed buffer. This ensures consistent results between NeoVim versions.\n        vim.cmd('e b.txt')\n        local bufnr_a = vim.fn.bufnr('a.txt')\n        local bufnr_b = vim.fn.bufnr('b.txt')\n        tabline:expect([===[\n        highlights = {\n            1: lualine_a_buffers_inactive = { bg = \"#3c3836\", bold = true, fg = \"#a89984\", nocombine = true }\n            2: lualine_transitional_lualine_a_buffers_inactive_to_lualine_a_buffers_active = { bg = \"#a89984\", fg = \"#3c3836\", nocombine = true }\n            3: lualine_a_buffers_active = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n            4: lualine_transitional_lualine_a_buffers_active_to_lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n            5: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n        }\n        |{1: #]===] .. bufnr_a .. [===[  }\n        {2:}\n        {3: ]===] .. bufnr_b .. [===[  }\n        {4:}\n        {MATCH:{5:%s+}|}\n        ]===])\n      end)\n\n      it('can show buffer numbers instead of indices (with file names)', function()\n        local conf = vim.deepcopy(tab_conf)\n        conf.tabline.lualine_a = { { 'buffers', mode = 4, max_length = 1e3, icons_enabled = false } }\n        vim.cmd('e a.txt')\n        vim.cmd('silent! bd #') -- NeoVim 0.5 does not create an unnamed buffer. This ensures consistent results between NeoVim versions.\n        vim.cmd('e b.txt')\n        local bufnr_a = vim.fn.bufnr('a.txt')\n        local bufnr_b = vim.fn.bufnr('b.txt')\n        require('lualine').setup(conf)\n        require('lualine').statusline()\n        tabline:expect([===[\n        highlights = {\n            1: lualine_a_buffers_inactive = { bg = \"#3c3836\", bold = true, fg = \"#a89984\", nocombine = true }\n            2: lualine_transitional_lualine_a_buffers_inactive_to_lualine_a_buffers_active = { bg = \"#a89984\", fg = \"#3c3836\", nocombine = true }\n            3: lualine_a_buffers_active = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n            4: lualine_transitional_lualine_a_buffers_active_to_lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n            5: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n        }\n        |{1: #]===] .. bufnr_a .. [===[ a.txt }\n        {2:}\n        {3: ]===] .. bufnr_b .. [===[ b.txt }\n        {4:}\n        {MATCH:{5:%s+}|}\n        ]===])\n      end)\n\n      it('displays alternate buffer correctly when switching buffers', function()\n        local conf = vim.deepcopy(tab_conf)\n        conf.tabline.lualine_a = { { 'buffers', mode = 3, max_length = 1e3, icons_enabled = false } }\n        require('lualine').setup(conf)\n        require('lualine').statusline()\n        vim.cmd('e a.txt')\n        vim.cmd('silent! bd #') -- NeoVim 0.5 does not create an unnamed buffer. This ensures consistent results between NeoVim versions.\n        vim.cmd('e b.txt')\n        local bufnr_a = vim.fn.bufnr('a.txt')\n        local bufnr_b = vim.fn.bufnr('b.txt')\n        tabline:expect([===[\n        highlights = {\n            1: lualine_a_buffers_inactive = { bg = \"#3c3836\", bold = true, fg = \"#a89984\", nocombine = true }\n            2: lualine_transitional_lualine_a_buffers_inactive_to_lualine_a_buffers_active = { bg = \"#a89984\", fg = \"#3c3836\", nocombine = true }\n            3: lualine_a_buffers_active = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n            4: lualine_transitional_lualine_a_buffers_active_to_lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n            5: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n        }\n        |{1: #]===] .. bufnr_a .. [===[  }\n        {2:}\n        {3: ]===] .. bufnr_b .. [===[  }\n        {4:}\n        {MATCH:{5:%s+}|}\n        ]===])\n        vim.cmd('e a.txt')\n        tabline:expect([===[\n        highlights = {\n            1: lualine_a_buffers_active = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n            2: lualine_transitional_lualine_a_buffers_active_to_lualine_a_buffers_inactive = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n            3: lualine_a_buffers_inactive = { bg = \"#3c3836\", bold = true, fg = \"#a89984\", nocombine = true }\n            4: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n        }\n        |{1: ]===] .. bufnr_a .. [===[  }\n        {2:}\n        {3: #]===] .. bufnr_b .. [===[  }\n        {MATCH:{4:%s+}|}\n        ]===])\n        vim.cmd('bprev')\n        tabline:expect([===[\n        highlights = {\n            1: lualine_a_buffers_inactive = { bg = \"#3c3836\", bold = true, fg = \"#a89984\", nocombine = true }\n            2: lualine_transitional_lualine_a_buffers_inactive_to_lualine_a_buffers_active = { bg = \"#a89984\", fg = \"#3c3836\", nocombine = true }\n            3: lualine_a_buffers_active = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n            4: lualine_transitional_lualine_a_buffers_active_to_lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n            5: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n        }\n        |{1: #]===] .. bufnr_a .. [===[  }\n        {2:}\n        {3: ]===] .. bufnr_b .. [===[  }\n        {4:}\n        {MATCH:{5:%s+}|}\n        ]===])\n      end)\n    end)\n\n    describe('windows component', function()\n      it('works', function()\n        local conf = vim.deepcopy(tab_conf)\n        conf.tabline.lualine_a = { { 'windows', max_length = 1e3, mode = 2, icons_enabled = false } }\n        vim.cmd('e ' .. 'a.txt')\n        vim.cmd('tabe ' .. 'b.txt')\n        vim.cmd('vsplit ' .. 'c.txt')\n        vim.cmd('tabe ' .. 'd.txt')\n        require('lualine').setup(conf)\n        require('lualine').statusline()\n        tabline:expect([===[\n        highlights = {\n            1: lualine_a_windows_active = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n            2: lualine_transitional_lualine_a_windows_active_to_lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n            3: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n        }\n        |{1: 1 d.txt }\n        {2:}\n        {3:                                                                                                              }|\n        ]===])\n\n        vim.cmd('tabprev')\n        tabline:expect([===[\n        highlights = {\n            1: lualine_a_windows_active = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n            2: lualine_transitional_lualine_a_windows_active_to_lualine_a_windows_inactive = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n            3: lualine_a_windows_inactive = { bg = \"#3c3836\", bold = true, fg = \"#a89984\", nocombine = true }\n            4: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n        }\n        |{1: 1 c.txt }\n        {2:}\n        {3: 2 b.txt }\n        {4:                                                                                                     }|\n        ]===])\n\n        vim.cmd('tabprev')\n        tabline:expect([===[\n        highlights = {\n            1: lualine_a_windows_active = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n            2: lualine_transitional_lualine_a_windows_active_to_lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n            3: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n        }\n        |{1: 1 a.txt }\n        {2:}\n        {3:                                                                                                              }|\n        ]===])\n      end)\n    end)\n  end)\n\n  describe('diagnostics', function()\n    local diagnostics_conf = vim.deepcopy(config)\n    diagnostics_conf.sections = {\n      lualine_a = {\n        {\n          'diagnostics',\n          symbols = { error = 'E:', warn = 'W:', info = 'I:', hint = 'H:' },\n          diagnostics_color = {\n            error = { bg = '#a89984', fg = '#ff0000' },\n            warn = { bg = '#a89984', fg = '#ffa500' },\n            info = { bg = '#a89984', fg = '#add8e6' },\n            hint = { bg = '#a89984', fg = '#d3d3d3' },\n          },\n          sources = {\n            function()\n              return {}\n            end,\n          },\n        },\n      },\n      lualine_b = {},\n      lualine_c = {},\n      lualine_x = {},\n      lualine_y = {},\n      lualine_z = {},\n    }\n\n    it('does not show without diagnostics', function()\n      local conf = vim.deepcopy(diagnostics_conf)\n      require('lualine').setup(conf)\n      statusline:expect([===[\n      highlights = {\n          1: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n      }\n      |{1:                                                                                                                        }|\n      ]===])\n    end)\n\n    it('shows only positive diagnostics', function()\n      local conf = vim.deepcopy(diagnostics_conf)\n      conf.sections.lualine_a[1].sources[1] = function()\n        return { error = 0, warn = 0, info = 1, hint = 0 }\n      end\n      require('lualine').setup(conf)\n      statusline:expect([===[\n      highlights = {\n          1: lualine_a_diagnostics_info = { bg = \"#a89984\", fg = \"#add8e6\", nocombine = true }\n          2: lualine_transitional_lualine_a_diagnostics_info_to_lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n          3: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n      }\n      |{1: I:1 }\n      {2:}\n      {3:                                                                                                                  }|\n      ]===])\n    end)\n\n    it('shows all diagnostics with same background', function()\n      local conf = vim.deepcopy(diagnostics_conf)\n      conf.sections.lualine_a[1].sources[1] = function()\n        return { error = 1, warn = 2, info = 3, hint = 4 }\n      end\n      require('lualine').setup(conf)\n      statusline:expect([===[\n      highlights = {\n          1: lualine_a_diagnostics_error = { bg = \"#a89984\", fg = \"#ff0000\", nocombine = true }\n          2: lualine_a_diagnostics_warn = { bg = \"#a89984\", fg = \"#ffa500\", nocombine = true }\n          3: lualine_a_diagnostics_info = { bg = \"#a89984\", fg = \"#add8e6\", nocombine = true }\n          4: lualine_a_diagnostics_hint = { bg = \"#a89984\", fg = \"#d3d3d3\", nocombine = true }\n          5: lualine_transitional_lualine_a_diagnostics_hint_to_lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n          6: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n      }\n      |{1: E:1 }\n      {2:W:2 }\n      {3:I:3 }\n      {4:H:4 }\n      {5:}\n      {6:                                                                                                      }|\n      ]===])\n    end)\n\n    it('shows all diagnostics with padding when background changes', function()\n      local conf = vim.deepcopy(diagnostics_conf)\n      conf.sections.lualine_a[1].sources[1] = function()\n        return { error = 1, warn = 2, info = 3, hint = 4 }\n      end\n      conf.sections.lualine_a[1].diagnostics_color = {\n        error = { bg = '#ff0000', fg = '#a89984' },\n        warn = { bg = '#ffa500', fg = '#a89984' },\n        info = { bg = '#add8e6', fg = '#a89984' },\n        hint = { bg = '#add8e6', fg = '#a89984' },\n      }\n      require('lualine').setup(conf)\n      statusline:expect([===[\n      highlights = {\n          1: lualine_a_diagnostics_error = { bg = \"#ff0000\", fg = \"#a89984\", nocombine = true }\n          2: lualine_a_diagnostics_warn = { bg = \"#ffa500\", fg = \"#a89984\", nocombine = true }\n          3: lualine_a_diagnostics_info = { bg = \"#add8e6\", fg = \"#a89984\", nocombine = true }\n          4: lualine_a_diagnostics_hint = { bg = \"#add8e6\", fg = \"#a89984\", nocombine = true }\n          5: lualine_transitional_lualine_a_diagnostics_hint_to_lualine_c_normal = { bg = \"#3c3836\", fg = \"#add8e6\", nocombine = true }\n          6: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n      }\n      |{1: E:1 }\n      {2: W:2 }\n      {3: I:3 }\n      {4:H:4 }\n      {5:}\n      {6:                                                                                                    }|\n      ]===])\n    end)\n  end)\n\n  describe('supports compound filetypes', function()\n    it('disabled filetypes', function()\n      local conf = require('lualine').get_config()\n      conf.options.disabled_filetypes = { 'java' }\n      require('lualine').setup(conf)\n      local old_ft = vim.bo.ft\n      vim.bo.ft = 'lua.java'\n      vim.opt.filetype = 'lua.java'\n      statusline:expect(nil)\n      vim.bo.ft = old_ft\n    end)\n\n    it('extensions for work on compound filetypes', function()\n      local conf = require('lualine').get_config()\n      table.insert(conf.extensions, {\n        filetypes = { 'test_ft' },\n        sections = {\n          lualine_a = {\n            function()\n              return 'custom_extension_component'\n            end,\n          },\n        },\n      })\n      local old_ft = vim.bo.ft\n      vim.bo.ft = 'lua.test_ft'\n      require('lualine').setup(conf)\n      statusline:expect([===[\n      highlights = {\n          1: lualine_a_normal = { bg = \"#a89984\", bold = true, fg = \"#282828\", nocombine = true }\n          2: lualine_transitional_lualine_a_normal_to_lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n          3: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\", nocombine = true }\n      }\n      |{1: custom_extension_component }\n      {2:}\n      {3:                                                                                           }|\n      ]===])\n      vim.bo.ft = old_ft\n    end)\n  end)\nend)\n"
  },
  {
    "path": "tests/spec/utils_spec.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n\nlocal helpers = require('tests.helpers')\n\nlocal eq = assert.are.same\nlocal build_component_opts = helpers.build_component_opts\nlocal stub = require('luassert.stub')\n\ndescribe('Utils', function()\n  local utils = require('lualine.utils.utils')\n\n  it('can retrieve highlight groups', function()\n    local hl2 = { fg = '#aabbcc', bg = '#889977', sp = '#997788', reverse = true, undercurl = true }\n    -- handles non existing hl groups\n    eq(utils.extract_highlight_colors('hl2'), nil)\n    -- create highlight\n    vim.cmd(string.format('hi hl2 guifg=%s guibg=%s guisp=%s gui=reverse,undercurl', hl2.fg, hl2.bg, hl2.sp))\n    -- Can retrieve entire highlight table\n    eq(utils.extract_highlight_colors('hl2'), hl2)\n    -- Can retrieve specific parts of highlight\n    eq(utils.extract_highlight_colors('hl2', 'fg'), hl2.fg)\n    -- clear hl2\n    vim.cmd('hi clear hl2')\n  end)\n\n  it('can extract individual highlight color', function()\n    local fg_clr = '#aabbcc'\n    local bg_clr = '#889977'\n    local sp_clr = '#997788'\n    local def_clr = '#ff0000'\n    local hl_std = { fg = fg_clr, bg = bg_clr }\n    local hl_rvs = { fg = fg_clr, bg = bg_clr, reverse = true }\n    local hl_ul = { sp = sp_clr, undercurl = true }\n    local hl_ul_rvs = { fg = fg_clr, bg = bg_clr, sp = sp_clr, reverse = true, undercurl = true }\n    -- create highlights\n    vim.cmd(string.format('hi hl_std guifg=%s guibg=%s', hl_std.fg, hl_std.bg))\n    vim.cmd(string.format('hi hl_rvs guifg=%s guibg=%s gui=reverse', hl_rvs.fg, hl_rvs.bg))\n    vim.cmd(string.format('hi hl_ul guisp=%s gui=undercurl', hl_ul.sp))\n    vim.cmd(\n      string.format(\n        'hi hl_ul_rvs guifg=%s guibg=%s guisp=%s gui=reverse,undercurl',\n        hl_ul_rvs.fg,\n        hl_ul_rvs.bg,\n        hl_ul_rvs.sp\n      )\n    )\n    -- Can extract color from primary highlight group\n    eq(utils.extract_color_from_hllist('fg', { 'hl_std', 'hl_ul' }, def_clr), fg_clr)\n    -- Can extract color from fallback highlight group\n    eq(utils.extract_color_from_hllist('fg', { 'hl_noexist', 'hl_std' }, def_clr), fg_clr)\n    -- Can fall back to default color on nonexistent color\n    eq(utils.extract_color_from_hllist('fg', { 'hl_ul' }, def_clr), def_clr)\n    -- Can fall back to default color on nonexistent highlight group\n    eq(utils.extract_color_from_hllist('fg', { 'hl_noexist' }, def_clr), def_clr)\n    -- Can extract fallback color\n    eq(utils.extract_color_from_hllist({ 'fg', 'sp' }, { 'hl_ul' }, def_clr), sp_clr)\n    -- Can extract reverse color\n    eq(utils.extract_color_from_hllist('fg', { 'hl_rvs' }, def_clr), bg_clr)\n    -- Can extract fallback reverse color\n    eq(utils.extract_color_from_hllist({ 'sp', 'fg' }, { 'hl_rvs' }, def_clr), bg_clr)\n    -- clear highlights\n    vim.cmd('hi clear hl_std')\n    vim.cmd('hi clear hl_rvs')\n    vim.cmd('hi clear hl_ul')\n    vim.cmd('hi clear hl_ul_rvs')\n  end)\n\n  it('can shrink list with holes', function()\n    local list_with_holes = {\n      '2',\n      '4',\n      '6',\n      nil,\n      '43',\n      nil,\n      '2',\n      '',\n      'a',\n      '',\n      'b',\n      ' ',\n    }\n    local list_without_holes = { '2', '4', '6', '43', '2', 'a', 'b', ' ' }\n    eq(utils.list_shrink(list_with_holes), list_without_holes)\n  end)\nend)\n\ndescribe('Cterm generator', function()\n  local cterm = require('lualine.utils.color_utils')\n\n  it('can convert rgb to cterm', function()\n    local colors = { ['#112233'] = 235, ['#7928ae'] = 97, ['#017bdc'] = 68 }\n    for rgb, ct in pairs(colors) do\n      eq(cterm.rgb2cterm(rgb), tostring(ct))\n    end\n  end)\nend)\n\ndescribe('Section generator', function()\n  local hl = require('lualine.highlight')\n  stub(hl, 'format_highlight')\n  hl.format_highlight.returns('%#lualine_c_normal#')\n\n  local sec = require('lualine.utils.section')\n  it('can draw', function()\n    local opts = build_component_opts { section_separators = { left = '', right = '' } }\n    local section = {\n      require('lualine.components.special.function_component')(opts),\n      require('lualine.components.special.function_component')(opts),\n    }\n    eq('%#lualine_c_normal# test %#lualine_c_normal# test ', sec.draw_section(section, 'c', true))\n\n    hl.format_highlight:revert()\n  end)\n\n  it('can remove separators from component with custom colors', function()\n    stub(hl, 'format_highlight')\n    stub(hl, 'get_lualine_hl')\n    hl.format_highlight.returns('%#lualine_MySection_normal#')\n    hl.get_lualine_hl.returns { fg = '#000000', bg = '#ffffff' }\n\n    vim.g.actual_curwin = tostring(vim.api.nvim_get_current_win())\n    local opts = build_component_opts { section_separators = { left = '', right = '' } }\n    local opts_colored = build_component_opts { color = 'MyColor' }\n    local opts_colored2 = build_component_opts {\n      color = { bg = '#223344' },\n      section_separators = { left = '', right = '' },\n    }\n    local opts_colored3 = build_component_opts {\n      color = { fg = '#223344' },\n      section_separators = { left = '', right = '' },\n    }\n    require('lualine.highlight').create_highlight_groups(require('lualine.themes.gruvbox'))\n    local section = {\n      require('lualine.components.special.function_component')(opts),\n      require('lualine.components.special.function_component')(opts_colored),\n      require('lualine.components.special.function_component')(opts),\n    }\n    local highlight_name2 = 'lualine_c_' .. section[2].options.component_name\n    -- Removes separator on string color\n    eq(\n      '%#lualine_MySection_normal# test %#' .. highlight_name2 .. '#' .. ' test %#lualine_MySection_normal# test ',\n      sec.draw_section(section, 'MySection')\n    )\n    section[2] = require('lualine.components.special.function_component')(opts_colored2)\n    local highlight_name = '%#lualine_c_' .. section[2].options.component_name .. '_normal#'\n    -- Removes separator on color with bg\n    eq(\n      '%#lualine_MySection_normal# test ' .. highlight_name .. ' test %#lualine_MySection_normal# test ',\n      sec.draw_section(section, 'MySection')\n    )\n    section[2] = require('lualine.components.special.function_component')(opts_colored3)\n    highlight_name2 = '%#lualine_c_' .. section[2].options.component_name .. '_normal#'\n    -- Doesn't remove separator on color without bg\n    eq(\n      '%#lualine_MySection_normal# test '\n        .. highlight_name2\n        .. ' test %#lualine_MySection_normal#%#lualine_MySection_normal# test ',\n      sec.draw_section(section, 'MySection')\n    )\n    vim.g.actual_curwin = nil\n\n    hl.format_highlight:revert()\n    hl.get_lualine_hl:revert()\n  end)\nend)\n"
  },
  {
    "path": "tests/statusline.lua",
    "content": "-- Copyright (c) 2020-2021 shadmansaleh\n-- MIT license, see LICENSE for more details.\n\n--- ## Testing module for lualines statusline\n---\n--- ###Uses:\n---\n--- Create a new instance with status width 120 & for active statusline\n--- like following.\n---\n--- ``lua\n--- local statusline = require('tests.statusline').new(120, 'active')\n--- ```\n---\n--- To create a new instance with status width 80 & for inactive statusline use following.\n---\n--- ``lua\n--- local statusline = require('tests.statusline').new(120, 'inactive')\n--- ```\n---\n--- Now setup the state you want to test.\n--- To test you'll call `expect` method on statusline for example.\n---\n--- To create a new instance with status width 80 & tabline\n---\n--- ``lua\n--- local statusline = require('tests.statusline').new(120, 'tabline')\n--- ```\n---\n--- Now setup the state you want to test.\n--- To test you'll call `expect` method on statusline for example.\n---\n--- ``lua\n--- statusline:expect([===[\n---    highlights = {\n---        1: lualine_c_inactive = { bg = \"#3c3836\", fg = \"#a89984\" }\n---    }\n---    |{1: [No Name] }\n---    {1:                                                                                                     }\n---    {1:   0:1  }|\n---\n---]===])\n--- ```\n---\n--- For more flexibility you can match a pattern in expect block.\n--- ``lua\n--- statusline:expect([===[\n---    highlights = {\n---        1: lualine_a_tabs_inactive = { bg = \"#3c3836\", bold = true, fg = \"#a89984\" }\n---        2: lualine_transitional_lualine_a_tabs_inactive_to_lualine_a_tabs_active = { bg = \"#a89984\", fg = \"#3c3836\" }\n---        3: lualine_a_tabs_active = { bg = \"#a89984\", bold = true, fg = \"#282828\" }\n---        4: lualine_transitional_lualine_a_tabs_active_to_lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\" }\n---        5: lualine_c_normal = { bg = \"#3c3836\", fg = \"#a89984\" }\n---    }\n---    {MATCH:|{1: %d+ }}\n---    {MATCH:{1: %d+ }}\n---    {2:}\n---    {MATCH:{3: %d+ }}\n---    {4:}\n---    {MATCH:{5:%s+}|}\n---\n---]===])\n--- ```\n---\n--- An easy way to create an expect block is to call `snapshot` method\n--- on statusline where you'll call expect and run the test. It will print\n--- an expect block based on the state of statusline. You can copy it and\n--- replace the snapshot call with the expect call.\n---\n--- ``lua\n--- statusline:snapshot()\n--- ```\n\nlocal helpers = require('tests.helpers')\nlocal stub = require('luassert.stub')\n\nlocal M = {}\n\nlocal function eval_stl(stl_expr, width, eval_type)\n  local stl_buf, hl_list, stl_eval_res\n  if stl_expr == nil then\n    return nil\n  end\n  stl_eval_res = vim.api.nvim_eval_statusline(\n    stl_expr,\n    { maxwidth = width, highlights = true, fillchar = ' ', use_tabline = (eval_type == 'tabline') }\n  )\n  stl_buf, hl_list = stl_eval_res.str, stl_eval_res.highlights\n\n  local hl_map = {}\n\n  local buf = { 'highlights = {' }\n  local hl_id = 1\n  for _, hl in ipairs(hl_list) do\n    local hl_name = hl.group\n    if not hl_map[hl_name] then\n      hl_map[hl_name] = require('lualine.utils.utils').extract_highlight_colors(hl_name) or {}\n      table.insert(\n        buf,\n        string.format(' %4d: %s = %s', hl_id, hl_name, vim.inspect(hl_map[hl_name], { newline = ' ', indent = '' }))\n      )\n      hl_map[hl_name].id = hl_id\n      hl_id = hl_id + 1\n    end\n  end\n  table.insert(buf, '}')\n\n  local stl = {}\n  for i = 1, #hl_list do\n    local start, finish = hl_list[i].start, hl_list[i + 1] and hl_list[i + 1].start or #stl_buf\n    if start ~= finish then\n      table.insert(\n        stl,\n        string.format('{%d:%s}', hl_map[hl_list[i].group].id, vim.fn.strpart(stl_buf, start, finish - start))\n      )\n    end\n  end\n  table.insert(buf, '|' .. table.concat(stl, '\\n') .. '|')\n  table.insert(buf, '')\n  return table.concat(buf, '\\n')\nend\n\nfunction M:expect_expr(expect, expr)\n  if expr == nil then\n    -- test if both are nil when running expect against nil\n    assert.are.same(expect, nil)\n    return\n  end\n  local actual = eval_stl(expr, self.width, self.type)\n  if expect == nil then\n    assert.are.same(expect, actual)\n    return\n  end\n  expect = helpers.dedent(expect)\n  local matched = true\n  local errmsg = {}\n  if expect ~= actual then\n    expect = expect ~= nil and vim.split(expect, '\\n')\n    actual = vim.split(actual, '\\n')\n    if expect[#expect] == '' then\n      expect[#expect] = nil\n    end\n    if actual[#actual] == '' then\n      actual[#actual] = nil\n    end\n    for i = 1, math.max(#expect, #actual) do\n      if expect[i] and actual[i] then\n        local match_pat = expect[i]:match('{MATCH:(.*)}')\n        if expect[i] == actual[i] or (match_pat and actual[i]:match(match_pat)) then\n          expect[i] = string.rep(' ', 2) .. expect[i]\n          actual[i] = string.rep(' ', 2) .. actual[i]\n          goto loop_end\n        end\n      end\n      matched = false\n      if expect[i] then\n        expect[i] = '*' .. string.rep(' ', 1) .. expect[i]\n      end\n      if actual[i] then\n        actual[i] = '*' .. string.rep(' ', 1) .. actual[i]\n      end\n      ::loop_end::\n    end\n  end\n  if not matched then\n    table.insert(errmsg, 'Unexpected statusline')\n    table.insert(errmsg, 'Expected:')\n    table.insert(errmsg, table.concat(expect, '\\n') .. '\\n')\n    table.insert(errmsg, 'Actual:')\n    table.insert(errmsg, table.concat(actual, '\\n'))\n  end\n  assert(matched, table.concat(errmsg, '\\n'))\nend\n\nfunction M:snapshot_expr(expr)\n  local type_map = {\n    active = 'statusline',\n    inactive = 'inactive_statusline',\n    tabline = 'tabline',\n  }\n  if expr == nil then\n    print((type_map[self.type] or 'statusline') .. ':expect(nil)')\n    return\n  end\n  print((type_map[self.type] or 'statusline') .. ':expect([===[')\n  print(eval_stl(expr, self.width, self.type) .. ']===])')\nend\n\nfunction M:snapshot()\n  local utils = require('lualine.utils.utils')\n  stub(utils, 'is_focused')\n  utils.is_focused.returns(self.type ~= 'inactive')\n  local expr\n  if self.type == 'inactive' then\n    expr = require('lualine').statusline(false)\n  elseif self.type == 'tabline' then\n    expr = require('lualine').tabline()\n  else\n    expr = require('lualine').statusline(true)\n  end\n  self:snapshot_expr(expr)\n  utils.is_focused:revert()\nend\n\nfunction M:expect(result)\n  local utils = require('lualine.utils.utils')\n  stub(utils, 'is_focused')\n  utils.is_focused.returns(self.type ~= 'inactive')\n  local expr\n  if self.type == 'inactive' then\n    expr = require('lualine').statusline(false)\n  elseif self.type == 'tabline' then\n    expr = require('lualine').tabline()\n  else\n    expr = require('lualine').statusline(true)\n  end\n  self:expect_expr(result, expr)\n  utils.is_focused:revert()\nend\n\nfunction M.new(_, width, eval_type)\n  if type(_) ~= 'table' then\n    eval_type = width\n    width = _\n  end\n  local self = {}\n  self.width = width or 120\n  self.type = eval_type\n  if self.type == nil then\n    self.type = 'active'\n  end\n  return setmetatable(self, {\n    __index = M,\n    __call = function(_, ...)\n      M.new(...)\n    end,\n  })\nend\n\nreturn M.new()\n"
  }
]