Giter Club home page Giter Club logo

astroui's Introduction

AstroNvim



AstroNvim is an aesthetically pleasing and feature-rich neovim config that is extensible and easy to use with a great set of plugins

🌟 Preview

Preview Image

✨ Features

⚡ Requirements

Note

[1] All downloadable Nerd Fonts contain icons which are used by AstroNvim. Install the Nerd Font of your choice to your system and in your terminal emulator settings, set its font face to that Nerd Font. If you are using AstroNvim on a remote system via SSH, you do not need to install the font on the remote system.

Note

[2] Note when using default theme: For MacOS, the default terminal does not have true color support. You will need to use iTerm2, Kitty, WezTerm, or another terminal emulator that has true color support.

🛠️ Installation

AstroNvim is provided as a plugin that can be installed with the lazy.nvim plugin manager and then used to import all of the plugin configurations that AstroNvim provides. To quickly get started it is recommended to start with the official AstroNvim Template which provides a great starting point for a new AstroNvim based configuration.

Linux/Mac OS (Unix)

Make a backup of your current nvim and shared folder

mv ~/.config/nvim ~/.config/nvim.bak
mv ~/.local/share/nvim ~/.local/share/nvim.bak
mv ~/.local/state/nvim ~/.local/state/nvim.bak
mv ~/.cache/nvim ~/.cache/nvim.bak

Clone the template repository

git clone --depth 1 https://github.com/AstroNvim/template ~/.config/nvim
rm -rf ~/.config/nvim/.git
nvim

Windows (Powershell)

Make a backup of your current nvim and nvim-data folder

Rename-Item -Path $env:LOCALAPPDATA\nvim -NewName $env:LOCALAPPDATA\nvim.bak
Rename-Item -Path $env:LOCALAPPDATA\nvim-data -NewName $env:LOCALAPPDATA\nvim-data.bak

Clone the repository

git clone --depth 1 https://github.com/AstroNvim/template $env:LOCALAPPDATA\nvim
Remove-Item $env:LOCALAPPDATA\nvim\.git -Recurse -Force
nvim

Minimal ~/.config/nvim/init.lua

Some user's might not want to use an entire template or do any customization. Here is a minimal ~/.config/nvim/init.lua file that simply set's up a base AstroNvim installation:

local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
  -- stylua: ignore
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
end
vim.opt.rtp:prepend(lazypath)

require("lazy").setup { "AstroNvim/AstroNvim", version = "^4", import = "astronvim.plugins" }

📦 Basic Setup

Install LSP

Enter :LspInstall followed by the name of the server you want to install
Example: :LspInstall pyright

Install language parser

Enter :TSInstall followed by the name of the language you want to install
Example: :TSInstall python

Install Debugger

Enter :DapInstall followed by the name of the debugger you want to install
Example: :DapInstall python

Manage plugins

Run :Lazy check to check for plugin updates

Run :Lazy update to apply any pending plugin updates

Run :Lazy clean to remove any disabled or unused plugins

Run :Lazy sync to update and clean plugins

Update AstroNvim Packages

Run :AstroUpdate (<leader>pa) to update both Neovim plugins and Mason packages

🗒️ Links

📹 Videos

There have been some great review videos released by members of the community! Here are a few:

🚀 Contributing

If you plan to contribute, please check the contribution guidelines first.

⭐ Credits

Sincere appreciation to the following repositories, plugin authors and the entire neovim community out there that made the development of AstroNvim possible.

Lua

astroui's People

Contributors

astronvimbot avatar chaozwn avatar github-actions[bot] avatar loichyan avatar mehalter avatar subjective avatar whoop-t avatar wroyca avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

astroui's Issues

Heirline.nvim doesn't play with QuickList and LocList

Checklist

  • I have searched through the AstroNvim docs
  • I have searched through the existing issues of AstroNvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

v0.10.0-dev+2507-g3df1211eb

Operating system/version

Linux fedora 6.7.7-200.fc39.x86_64

Terminal/GUI

kitty 0.31.0

Describe the bug

We're faced with some issues when we start using Quickfix and Loclist; these issues mostly include the ones I've found so far, and chance are that it's not inclusive so it's probably make sense to consider it as meta.

    1. Heirline draw it statuscol in Quickfix and LocList
    1. Heirline will draw over the command line

Here's how it should look in practice:

Screenshot from 2024-03-07 08-07-05

Here's how it currently look:

image

One thing is that it almost looks as intended on the dashboard (minus the status column):

image

Steps to Reproduce

  1. Use astrocommunity Coc
  2. CocList ...

AstroUI config doesn't include the user config when extending heirline

Checklist

  • I have searched through the AstroNvim docs
  • I have searched through the existing issues of AstroNvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

0.9.5

Operating system/version

macOS 14.4.1

Terminal/GUI

iTerm

Describe the bug

❗ I need to do some more investigation and narrow down a reproduction, so this issue is preliminary for now.

The issue I'm facing is related to porting my custom tab pages heirline config to V4. I get the following error:

Screenshot 2024-04-09 at 15 29 56

If I print the contents of config from file_icon in astroui/status/hl on line 68, like this:

function M.file_icon(name)
  print(vim.inspect(config))
  local hl_enabled = config.icon_highlights.file_icon[name]
  return function(self)
    if hl_enabled == true or (type(hl_enabled) == "function" and hl_enabled(self)) then
      return M.filetype_color(self)
    end
  end
end

I see that the config is empty:
Screenshot 2024-04-10 at 17 18 29.

This is wrong, since I have the following config for astroui:

return {
  "AstroNvim/astroui",
  ---@type AstroUIOpts
  opts = {
    -- change colorscheme
    colorscheme = "dracula",
    -- AstroUI allows you to easily modify highlight groups easily for any and all colorschemes
    highlights = {
      init = { -- this table overrides highlights in all themes
        -- Normal = { bg = "#000000" },
      },
      astrotheme = { -- a table of overrides/changes when applying the astrotheme theme
        -- Normal = { bg = "#000000" },
      },
    },
    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 context
      icon_highlights = {
        -- enable or disable breadcrumb icon highlighting
        breadcrumbs = false,
        -- Enable or disable the highlighting of filetype icons both in the statusline and tabline
        file_icon = {
          tabline = function(self) return self.is_active or self.is_visible end,
          statusline = true,
        },
      },
      -- Configure characters used as separators for various elements
      separators = {
        none = { "", "" },
        left = { "", "  " },
        right = { "  ", "" },
        center = { "  ", "  " },
        tab = { "", "" },
        breadcrumbs = "",
        path = "",
      },
    },
    -- Icons can be configured throughout the interface
    icons = {
      -- configure the loading of the lsp in the status line
      LSPLoading1 = "",
      LSPLoading2 = "",
      LSPLoading3 = "",
      LSPLoading4 = "",
      LSPLoading5 = "",
      LSPLoading6 = "",
      LSPLoading7 = "",
      LSPLoading8 = "",
      LSPLoading9 = "",
      LSPLoading10 = "",
    },
  },
}

If I modify hl.lua on line 12, so that the definition of config becomes an inline function - resulting in the config is always re-evaluated, I see that the expected value, like this:

local config = function() return assert(require("astroui").config.status) end

and update uses of config to config(), I see the expected values when I print config from file_icon:
Screenshot 2024-04-10 at 17 25 33

Converting to a function also fixes the error shown at the start of this issue, since config().icon_hightlights.file_icon[name] in hl.lua now has a valid value.

This feels like a timing issue, but I see that astroui has a priority of 1000 and is lazy = false, so I'd expect it to be already setup and ready to go by the time that I use it via my heirline config.

I'll try to debug some more later and narrow this down to a repro and update this issue - I just needed to get this out whilst I had the motivation to write it up!

Steps to Reproduce

todo

Expected behavior

n/a

Screenshots

No response

Additional Context

No response

Repro

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.