mirror of
https://github.com/Baipyrus/nvim-config.git
synced 2024-11-13 20:43:49 +00:00
update README, denote windows-choco installation, include other systems
This commit is contained in:
parent
0d927e25ae
commit
24d1fe2e59
130
README.md
130
README.md
@ -1,40 +1,69 @@
|
||||
# nvim-config
|
||||
|
||||
## Introduction
|
||||
|
||||
This project is a fork of [dam9000/kickstart-modular.nvim](https://github.com/dam9000/kickstart-modular.nvim.git)
|
||||
*This is a fork of [dam9000/kickstart-modular.nvim](https://github.com/dam9000/kickstart-modular.nvim) that represents my personal configuration of Neovim.*
|
||||
|
||||
## Installation
|
||||
|
||||
### Installation (Windows Only)
|
||||
### Install Neovim
|
||||
|
||||
Kickstart.nvim targets *only* the latest
|
||||
['stable'](https://github.com/neovim/neovim/releases/tag/stable) and latest
|
||||
['nightly'](https://github.com/neovim/neovim/releases/tag/nightly) of Neovim.
|
||||
If you are experiencing issues, please make sure you have the latest versions.
|
||||
|
||||
### Install External Dependencies
|
||||
|
||||
> **NOTE**
|
||||
> [Backup](#FAQ) your previous configuration (if any exists)
|
||||
|
||||
Neovim's configurations are located under the following path:
|
||||
External Requirements:
|
||||
- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`)
|
||||
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation)
|
||||
- Language Setup:
|
||||
- If want to write Typescript, you need `npm`
|
||||
- If want to write Golang, you will need `go`
|
||||
- etc.
|
||||
|
||||
| Shell | PATH |
|
||||
> **NOTE**
|
||||
> See [Windows Installation](#Windows-Installation) to double check any additional Windows notes
|
||||
|
||||
Neovim's configurations are located under the following paths, depending on your OS:
|
||||
|
||||
| OS | PATH |
|
||||
| :- | :--- |
|
||||
| cmd | `%userprofile%\AppData\Local\nvim\` |
|
||||
| powershell | `$env:USERPROFILE\AppData\Local\nvim\` |
|
||||
| Linux, MacOS | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` |
|
||||
| Windows (cmd)| `%userprofile%\AppData\Local\nvim\` |
|
||||
| Windows (powershell)| `$env:USERPROFILE\AppData\Local\nvim\` |
|
||||
|
||||
- Download and install:
|
||||
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation)
|
||||
- [MinGW](https://www.mingw-w64.org/)
|
||||
> **NOTE**
|
||||
> In this case, using [chocolatey](https://chocolatey.org/) is quick and easy
|
||||
- [CMake](https://cmake.org/)
|
||||
> **NOTE**
|
||||
> Make sure to select 'add to PATH' during installation
|
||||
- [MSBuild-Tools](https://github.com/bycloudai/InstallVSBuildToolsWindows)
|
||||
- Clone this repository:
|
||||
- on Windows (cmd)
|
||||
```
|
||||
git clone https://github.com/Baipyrus/nvim-config.git %userprofile%\AppData\Local\nvim\
|
||||
```
|
||||
### Install this Configuration
|
||||
|
||||
- on Windows (powershell)
|
||||
```
|
||||
git clone https://github.com/Baipyrus/nvim-config.git $env:USERPROFILE\AppData\Local\nvim\
|
||||
```
|
||||
Clone it from GitHub:
|
||||
|
||||
<details><summary> Linux and Mac </summary>
|
||||
|
||||
```sh
|
||||
git clone https://github.com/dam9000/kickstart-modular.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary> Windows </summary>
|
||||
|
||||
If you're using `cmd.exe`:
|
||||
|
||||
```bat
|
||||
git clone https://github.com/Baipyrus/nvim-config.git %userprofile%\AppData\Local\nvim\
|
||||
```
|
||||
|
||||
If you're using `powershell.exe`
|
||||
|
||||
```pwsh
|
||||
git clone https://github.com/Baipyrus/nvim-config.git $env:USERPROFILE\AppData\Local\nvim\
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Post Installation
|
||||
|
||||
@ -44,32 +73,43 @@ Start Neovim
|
||||
nvim
|
||||
```
|
||||
|
||||
The `Lazy` plugin manager will start automatically on the first run and install the configured plugins. After the installation is complete you can press `q` to close the `Lazy` UI and **you are ready to go**! Next time you run nvim `Lazy` will no longer show up.
|
||||
|
||||
If you would prefer to hide this step and run the plugin sync from the command line, you can use:
|
||||
|
||||
```sh
|
||||
nvim --headless "+Lazy! sync" +qa
|
||||
```
|
||||
|
||||
That's it! Lazy will install all the plugins you have. Use `:Lazy` to view
|
||||
current plugin status.
|
||||
|
||||
### FAQ
|
||||
|
||||
* What should I do if I already have a pre-existing neovim configuration?
|
||||
* You should back it up, then delete all files associated with it.
|
||||
* This includes your existing init.lua and the neovim files in `%userprofile%\AppData\Local\nvim-data\` (CMD) or `$env:USERPROFILE\AppData\Local\nvim-data\` (Powershell) which should be deleted afterwards.
|
||||
* You may also want to look at the [migration guide for lazy.nvim](https://github.com/folke/lazy.nvim#-migration-guide)
|
||||
* This includes your existing init.lua and the neovim files in `~/.local` which can be deleted with `rm -rf ~/.local/share/nvim/` or their windows counterparts in `AppData\Local\nvim-data`
|
||||
* Can I keep my existing configuration in parallel to kickstart?
|
||||
* Yes! You can use [NVIM_APPNAME](https://neovim.io/doc/user/starting.html#%24NVIM_APPNAME)`=nvim-NAME` to maintain multiple configurations. For example you can install the kickstart configuration in `~/.config/nvim-kickstart` and create an alias:
|
||||
```sh
|
||||
alias nvim-kickstart='NVIM_APPNAME="nvim-kickstart" nvim'
|
||||
```
|
||||
When you run Neovim using `nvim-kickstart` alias it will use the alternative config directory and the matching local directory `~/.local/share/nvim-kickstart`.
|
||||
You could also run your configuration inline, for example in Windows Powershell:
|
||||
```pwsh
|
||||
$env:NVIM_APPNAME = 'nvim-kickstart'; nvim
|
||||
```
|
||||
* What if I want to "uninstall" this configuration:
|
||||
* See [lazy.nvim uninstall](https://github.com/folke/lazy.nvim#-uninstalling) information
|
||||
* Why is the kickstart `init.lua` a single file? Wouldn't it make sense to split it into multiple files?
|
||||
* The main purpose of kickstart is to serve as a teaching tool and a reference
|
||||
configuration that someone can easily `git clone` as a basis for their own.
|
||||
As you progress in learning Neovim and Lua, you might consider splitting `init.lua`
|
||||
into smaller parts. *This is the fork of the original project that splits the configuration into smaller parts.*
|
||||
The original repo that maintains the exact
|
||||
same functionality in a single `init.lua` file is available here:
|
||||
* [kickstart.nvim](https://github.com/dam9000/kickstart-modular.nvim)
|
||||
* Discussions on this topic can be found here:
|
||||
* [Restructure the configuration](https://github.com/nvim-lua/kickstart.nvim/issues/218)
|
||||
* [Reorganize init.lua into a multi-file setup](https://github.com/nvim-lua/kickstart.nvim/pull/473)
|
||||
|
||||
### Windows Installation
|
||||
|
||||
Installation requires gcc and make, for which you don't need to change the config,
|
||||
the easiest way is to use choco:
|
||||
|
||||
1. install [chocolatey](https://chocolatey.org/install)
|
||||
either follow the instructions on the page or use winget,
|
||||
run in cmd as **admin**:
|
||||
```
|
||||
winget install --accept-source-agreements chocolatey.chocolatey
|
||||
```
|
||||
|
||||
2. install all requirements using choco, exit previous cmd and
|
||||
open a new one so that choco path is set, run in cmd as **admin**:
|
||||
```
|
||||
choco install -y neovim git ripgrep wget fd unzip gzip mingw make
|
||||
```
|
||||
|
||||
Then continue with the [Install Kickstart](#Install-this-Configuration) step.
|
||||
|
Loading…
Reference in New Issue
Block a user