-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: work on updating instructions for managing user configuration
- Loading branch information
Showing
9 changed files
with
104 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
id: manage_user_config | ||
title: Managing User Configuration | ||
sidebar_position: 1 | ||
--- | ||
|
||
import { Tabs, TabItem } 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 the configuration to a git repository. | ||
|
||
## Setting up a user configuration | ||
|
||
<Tabs> | ||
|
||
<TabItem value="getting_started" label="Followed Getting Started" default> | ||
|
||
1. Follow the [Getting Started Guide Installation](/#%EF%B8%8F-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 | ||
``` | ||
|
||
</TabItem> | ||
|
||
<TabItem value="fresh" label="Fresh Installation"> | ||
|
||
1. Use our [AstroNvim/template](https://github.com/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/lua` folder | ||
|
||
```sh | ||
git clone https://github.com/username/astronvim_config.git ~/.config/nvim | ||
``` | ||
|
||
</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! | ||
1. Clone your repository | ||
```sh | ||
git clone https://github.com/username/astronvim_config ~/.config/nvim | ||
``` | ||
3. Initialize AstroNvim | ||
```sh | ||
nvim --headless -c 'quitall' | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
id: alt_install | ||
title: Alternative Installation | ||
--- | ||
|
||
Here are a few different ways to go about installing AstroNvim including headless installation as well as isolated installations. | ||
|
||
## Unattended Installation | ||
|
||
Instead of running `nvim` to initialize AstroNvim you can run the | ||
following command to do a fully headless initialization: | ||
|
||
```sh | ||
nvim --headless +q | ||
``` | ||
|
||
1. Clone your configuration to `~/.config/nvim`, example using the AstroNvim template: | ||
|
||
```sh | ||
git https://github.com/AstroNvim/template ~/.config/nvim` | ||
``` | ||
|
||
2. Run the headless installation | ||
|
||
```sh | ||
nvim --headless +q | ||
``` | ||
|
||
## Isolated Installation | ||
|
||
Neovim v0.9 introduced a great new environment variable called `NVIM_APPNAME` which allows the user to easily use configuration directories separate from the standard location. This is very useful if you want to install or try out AstroNvim without overwriting an existing Neovim configuration. The full details on the environmnet variable usage can be found in the Neovim documentation [`:h NVIM_APPNAME`](https://neovim.io/doc/user/starting.html#%24NVIM_APPNAME). Here is an example where we set it up using `NVIM_APPNAME=astronvim`: | ||
|
||
1. Clone your configuration to `~/.config/astronvim`, example using the AstroNvim template: | ||
|
||
```sh | ||
git https://github.com/AstroNvim/template ~/.config/astronvim` | ||
``` | ||
2. Start the editor with `NVIM_APPNAME` environment variable set to `astronvim` | ||
```sh | ||
NVIM_APPNAME=astronvim nvim | ||
``` | ||
3. (_Optional_) An alias can be set up and added to your shell configuration to easily run this. For example with the following alias, the isolated installation can then be accessed by simply running `astronvim`: | ||
```sh | ||
alias astronvim="NVIM_APPNAME=astronvim nvim" | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters