Skip to content

Commit

Permalink
config: astronvim version 4 install instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
practicalli-johnny committed Apr 9, 2024
1 parent 2371306 commit f328200
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 41 deletions.
63 changes: 24 additions & 39 deletions docs/configuration/astronvim/index.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
# AstroNvim

!!! WARNING "AstroNvim 3.x versions only - 4.x version not supported yet"
!!! WARNING "AstroNvim 4.x version supported"
AstroNvim 4 has been reorganised to be a collection of packages with a user configuration.

The Practicalli AstroNvim Config will not work with AstroNvim 4.x

A new repository will be created to support AstroNvim 4

[:globe_with_meridians: AstroNvim](https://astronvim.com/) is a community configuration with an engaging UI, using Lazy for plugin management (Neovim packages) and Mason for package management (LSP, DAP, format and lint tools)

[:fontawesome-brands-github: Practicalli AstroNvim Config](https://github.com/practicalli/astronvim-config) is a user configuration that extends AstroNvim and imports packages from the [:fontawesome-brands-github: AstroNvim Community](https://github.com/AstroNvim/user_example).
[:fontawesome-brands-github: Practicalli AstroNvim User Config](https://github.com/practicalli/astronvim-user-config) is a user configuration that extends AstroNvim and imports packages from the [:fontawesome-brands-github: AstroNvim Community](https://github.com/AstroNvim/user_example).


## Prerequisits
Expand All @@ -29,58 +25,43 @@
??? INFO "Kitty Terminal with Nerd Fonts"
[:globe_with_meridians: Kitty Terminal - Practicalli Engineering Playbook](https://practical.li/engineering-playbook/command-line/kitty-terminal/) provides examples of using Nerd Fonts or Nerd Font symbols with the Kitty terminal.

## Clone AstroNvim

Clone AstroNvim repository to `$HOME/.config/astronvim/`

!!! NOTE ""
```shell
git clone --depth 1 https://github.com/AstroNvim/AstroNvim ~/.config/astronvim
```

> `$HOME/.config/nvim` can be used instead if only ever using one configuration for Neovim.

## Clone AstroNvim user config

AstroNvim provides a [:fontawesome-brands-github: template repository](https://github.com/AstroNvim/user_example) to create a user configuration. The template includes [:fontawesome-brands-github: AstroNvim Community](https://github.com/AstroNvim/user_example) configuration to make it easier to extend the feature of AstroNvim.
AstroNvim is a [:fontawesome-brands-github: template repository](https://github.com/AstroNvim/template) providing a user configuration that includes AstroNvim plugins.

[:fontawesome-brands-github: Practicalli AstroNvim Config](http://github.com/practicalli/astronvim-config) is a clone of the AstroNvim user config with additional configuration to support Clojure development.
[:fontawesome-brands-github: AstroNvim Community](https://github.com/AstroNvim/astrocommunity/) configuration to make it easier to extend the feature of AstroNvim.

=== "Practicalli AstroNvim Config"
Clone the [:fontawesome-brands-github: Practicalli AstroNvim config](https://github.com/practicalli/astronvim-config) which provides a user configuration with [Clojure support](clojure.md)
!!! NOTE ""
```shell
git clone http://github.com/practicalli/astronvim-config $HOME/.config/astronvim/lua/user
```
Or clone to a separate directory and create a symbolic link
[:fontawesome-brands-github: Practicalli AstroNvim User Config](http://github.com/practicalli/astronvim-user-config) is a clone of the AstroNvim user config with additional configuration to support Clojure development.

=== "Practicalli AstroNvim User Config"
Clone the [:fontawesome-brands-github: Practicalli AstroNvim User Config](https://github.com/practicalli/astronvim-user-config) which provides [Clojure support](clojure.md) on top of AstroNvim.
!!! NOTE ""
```shell
git clone http://github.com/practicalli/astronvim-config $HOME/.config/astronvim-config && \
ln -s $HOME/.config/astronvim-config/ $HOME/.config/astronvim/lua/user
git clone http://github.com/practicalli/astronvim-user-config $HOME/.config/astronvim4
```

=== "AstroNvim User Config"
Create your own user configuration using the AstroNvim user configuration template repository.
Create your own user configuration using the [:fontawesome-brands-github: AstroNvim template repository](https://github.com/AstroNvim/template) to create a new GitHub repository.

Create a repository from the AstroNvim/user_example repository template
Clone the newly created repository

![AstroNvim user example repository - use this template](https://github.com/practicalli/graphic-design/blob/live/editors/neovim/astronvim/astronvim-user-config-template-github-repository.png?raw=true){loading=lazy}

Clone the newly created repository into the existing AstroNvim configuration, in a `user` directory
!!! NOTE ""
```shell
git clone git@github.com/<github-account>/<new-repository> $HOME/.config/astronvim/lua/user
git clone git@github.com/AstroNvim/template $HOME/.config/astronvim4
```


## Configure shell alias

Create a shell alias that sets `NVIM_APPNAME` to the location of the AstroNvim community config

Add alias to `.bashrc` for Bash shell or `.zshrc` for Zsh

```config
alias astro="NVIM_APPNAME=astronvim nvim"
```
!!! EXAMPLE ""
```config
alias astro="NVIM_APPNAME=astronvim4 nvim"
```

!!! HINT "dot aliases file for both bash and zsh"
Create a `.config/aliases` file containing all shell aliases when often switching between different shells, avoiding the need to define aliases twice
Expand Down Expand Up @@ -109,17 +90,21 @@ Open a terminal and use the `astro` alias to run Neovim.
astro
```

Lazy package manager will run automatically and download all plugins. Treesitter languages are automatically installed.

++"q"++ to close the lazy package manager popup.

<!-- TODO: checkhealth screenshot for astronvim -->

> `NVIM_APPNAME=astronvim nvim` to run Neovim with astronvim without setting a shell alias.
> `NVIM_APPNAME=astronvim4 nvim` to run Neovim with astronvim without setting a shell alias.
Neovim will open and display the Lazy plugin manager UI, showing the progress of plugin installation. This should only happen on the first run.

??? INFO "Unattended post install"
Plugins can be installed without running the Neovim editor UI
!!! NOTE ""
```shell
nvim --headless -c 'autocmd User LazyDone quitall'
NVIM_APPNAME=astronvim4 nvim --headless
```


Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Neovim for Clojure development

![Neovim with Fennel configuration for Clojure developers](https://github.com/practicalli/graphic-design/blob/live/editors/neovim/astronvim/astronvim-clojure-development-example-light.png?raw=true#only-light){loading=lazy}
![Neovim with Fennel configuration for Clojure developers](https://github.com/practicalli/graphic-design/blob/live/editors/neovim/astronvim/astronvim-clojure-development-example-dark.png?raw=true#only-dark){loading=lazy}
![Neovim with AstroNvim configuration for Clojure developers](https://github.com/practicalli/graphic-design/blob/live/editors/neovim/astronvim/neovim-astronvim-clojure-example-light.png?raw=true#only-light){loading=lazy}
![Neovim with AstroNvim configuration for Clojure developers](https://github.com/practicalli/graphic-design/blob/live/editors/neovim/astronvim/neovim-astronvim-clojure-example-dark.png?raw=true#only-dark){loading=lazy}

!!! QUOTE "coding at the speed of thought"
Neovim is incredibly fast and efficient, so thoughts flow from brain to editor without unnecessary delay.
Expand Down

0 comments on commit f328200

Please sign in to comment.