Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

UI Configuration Engine built for AstroNvim

License

NotificationsYou must be signed in to change notification settings

AstroNvim/astroui

AstroUI provides a simple API for configuring and setting up the user interface inAstroNvim.

✨ Features

  • Unified interface for configuring icons (with and without Nerd Fonts)
  • Easily modify highlight groups of any and all colorschemes
  • An extensivestatus API for building custom status lines (Relies onastrocore)

⚡️ Requirements

📦 Installation

Install the plugin with your plugin manager of choice:

lazy.nvim

{"AstroNvim/astroui",lazy=false,-- disable lazy loadingpriority=10000,-- load AstroUI firstopts= {-- set configuration options  as described below  }specs= {    {"AstroNvim/astrocore",opts= {},    }  }}

packer.nvim

use"AstroNvim/astrocore"use"AstroNvim/astroui"require("astroui").setup {-- set configuration options  as described below}require("astrocore").setup()-- setup AstroCore after AstroUI

⚙️ Configuration

AstroUI comes with the no defaults, but can be configured fully through theopts table in lazy or through callingrequire("astroui").setup({}). Here are descriptions of the options and some example usages:

---@typeAstroUIConfig{-- Colorscheme set on startup, a string that is used with `:colorscheme astrodark`colorscheme="astrodark",-- Configure how folding worksfolding= {-- whether a buffer should have folding can be true/false for global enable/disable or fun(bufnr:integer):booleanenabled=function(bufnr)returnrequire("astrocore.buffer").is_valid(bufnr)end,-- a priority list of fold methods to try using, available methods are "lsp", "treesitter", and "indent"methods= {"lsp","treesitter","indent"},  },-- Override highlights in any colorscheme-- Keys can be:--   `init`: table of highlights to apply to all colorschemes--   `<colorscheme_name>` override highlights in the colorscheme with name: `<colorscheme_name>`highlights= {-- this table overrides highlights in all colorschemesinit= {Normal= {bg="#000000"},    },-- a table of overrides/changes when applying astrothemeastrotheme= {Normal= {bg="#000000"},    },  },-- A table of icons in the UI using NERD fontsicons= {GitAdd="",  },-- A table of only text "icons" used when icons are disabledtext_icons= {GitAdd="[+]",  },-- Configuration options for the AstroNvim lines and bars built with the `status` API.status= {-- Configure attributes of components defined in the `status` API. Check the AstroNvim documentation for a complete list of color names, this applies to colors that have `_fg` and/or `_bg` names with the suffix removed (ex. `git_branch_fg` as attributes from `git_branch`).attributes= {git_branch= {bold=true },    },-- Configure colors of components defined in the `status` API. Check the AstroNvim documentation for a complete list of color names.colors= {git_branch_fg="#ABCDEF",    },-- Configure which icons that are highlighted based on contexticon_highlights= {-- enable or disable breadcrumb icon highlightingbreadcrumbs=false,-- Enable or disable the highlighting of filetype icons both in the statusline and tablinefile_icon= {tabline=function(self)returnself.is_activeorself.is_visibleend,statusline=true,      },    },-- Configure characters used as separators for various elementsseparators= {none= {"",""},left= {"",""},right= {"",""},center= {"",""},tab= {"",""},breadcrumbs="",path="",    },-- Configure enabling/disabling of winbarwinbar= {enabled= {-- whitelist buffer patternsfiletype= {"gitsigns.blame"},      },disabled= {-- blacklist buffer patternsbuftype= {"nofile","terminal"},      },    },  },-- Configure theming of Lazygit, set to `false` to disablelazygit= {theme_path=vim.fs.normalize(vim.fn.stdpath"cache".."/lazygit-theme.yml"),theme= {      [241]= {fg="Special"},activeBorderColor= {fg="MatchParen",bold=true },cherryPickedCommitBgColor= {fg="Identifier"},cherryPickedCommitFgColor= {fg="Function"},defaultFgColor= {fg="Normal"},inactiveBorderColor= {fg="FloatBorder"},optionsTextColor= {fg="Function"},searchingActiveBorderColor= {fg="MatchParen",bold=true },selectedLineBgColor= {bg="Visual"},unstagedChangesColor= {fg="DiagnosticError"},    },  },}

📦 API

AstroUI provides a Lua API with utility functions. This can be viewed with:h astroui or in the repository atdoc/api.md

🚀 Contributing

If you plan to contribute, please check thecontribution guidelines first.


[8]ページ先頭

©2009-2025 Movatter.jp