Skip to content

Commit

Permalink
feat: work on updating instructions for managing user configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Nov 10, 2023
1 parent 5ed096b commit db43a60
Show file tree
Hide file tree
Showing 9 changed files with 104 additions and 125 deletions.
7 changes: 0 additions & 7 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,3 @@ from = "/v2/*"
to = "https://magenta-malasada-aac0c8.netlify.app/:splat"
status = 200
force = true # COMMENT: ensure that we always redirect

# Old paths

[[redirects]]
from = "/Basic%20Usage/*"
to = "/basic-usage/:splat"
status = 301
64 changes: 0 additions & 64 deletions src/content/docs/configuration/manage_user_config.md

This file was deleted.

52 changes: 52 additions & 0 deletions src/content/docs/configuration/manage_user_config.mdx
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'
```
2 changes: 1 addition & 1 deletion src/content/docs/configuration/v4_migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Currently this is the old v3 migration guide, this should be updated to migratin

- `header` option has been removed in favor of decreasing abstractions. Check the updated [Dashboard Customizations Documentation](../../recipes/alpha)

- `<Leader>s` has been unified with the `<Leader>f` menu rather than spreading the Telescope mappings out across two menus. Please check the new mappings by pressing `<Leader>f` or in the updated [Mappings Documentation](../../basic-usage/mappings)
- `<Leader>s` has been unified with the `<Leader>f` menu rather than spreading the Telescope mappings out across two menus. Please check the new mappings by pressing `<Leader>f` or in the updated [Mappings Documentation](/mappings)

- Heirline has moved to a more sustainable configuration format for their `setup` call. Before it was configured with `require("heirline").setup(statusline, winbar, tabline)`, this has moved to a new format with a single table like `require("heirline").setup({ statusline = statusline, winbar = winbar, tabline = tabline, statuscolumn = statuscolumn })`. If you have a custom Heirline configuration please check out the updated [Customizing Statusline Documentation](../../recipes/status) as well as the updated [Heirline Documentation](https://github.com/rebelot/heirline.nvim/blob/master/cookbook.md). (_Note:_ also that along with all of the other core plugin setups, the abstractions have been removed and you will need to update to the new Lazy syntax described in the [Custom Plugins Documentation](../custom_plugins#overriding-core-plugins))

Expand Down
1 change: 1 addition & 0 deletions src/content/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ title: Getting Started
tableOfContents:
maxHeadingLevel: 2
---

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

:::tip
Expand Down
25 changes: 0 additions & 25 deletions src/content/docs/recipes/unattended_install.md

This file was deleted.

49 changes: 49 additions & 0 deletions src/content/docs/reference/alt_install.md
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`:

Check warning on line 31 in src/content/docs/reference/alt_install.md

View workflow job for this annotation

GitHub Actions / Spell Check

"environmnet" should be "environments" or "environment".

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"
```
27 changes: 0 additions & 27 deletions src/content/docs/reference/isolated.md

This file was deleted.

2 changes: 1 addition & 1 deletion src/content/docs/reference/uninstall.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ rm -rf ~/.config/nvim \

</TabItem>

<TabItem value="windoze" label="Windows (PowerShell)" default>
<TabItem value="windoze" label="Windows (PowerShell)">

```powershell
Remove-Item $env:LOCALAPPDATA\nvim
Expand Down

0 comments on commit db43a60

Please sign in to comment.