Back to Astronvim

Managing User Configuration

src/content/docs/configuration/manage_user_config.mdx

latest1.9 KB
Original Source

import { Tabs, TabItem, Steps } from "@astrojs/starlight/components";

AstroNvim is installed with the lazy.nvim plugin manager just like any other plugin in Neovim. The template provided in the installation instructions is simply a minimal Neovim configuration with the lazy.nvim plugin manager that adds AstroNvim along with some example code. This makes it easy to back the configuration up to a git repository.

Setting up a user configuration

<Tabs> <TabItem value="fresh" label="Fresh Installation" icon="linux" default> <Steps>
  1. Use our AstroNvim/template GitHub template to make a new personal user configuration repository. For these steps we will assume your repo is username/astronvim_config

  2. Clone your empty new repository to your ~/.config/nvim folder

    sh
    git clone https://github.com/username/astronvim_config.git ~/.config/nvim
    
</Steps> </TabItem> <TabItem value="getting_started" label="Followed Getting Started" icon="rocket"> <Steps>
  1. Follow the Getting Started Guide Installation

  2. Create a new empty repository on Github (in this example we will assume your repo is username/astronvim_config). Then from your ~/.config/nvim repository where you cloned the repo:

    sh
    git init
    git add --all
    git commit -m "Initial commit"
    git branch -M main
    git remote add origin https://github.com/username/astronvim_config.git
    git push -u origin main
    
</Steps> </TabItem> </Tabs>

Installing a user configuration

If you have already created your user configuration and have it tracked in a repository, then the process of getting it installed on a new system is very easy!

<Steps>
  1. Clone your repository

    sh
    git clone https://github.com/username/astronvim_config ~/.config/nvim
    
  2. Initialize AstroNvim

    sh
    nvim --headless -c 'quitall'
    
</Steps>