|
| 1 | +# kickstart.nvim |
| 2 | + |
| 3 | +## Introduction |
| 4 | + |
| 5 | +A starting point for Neovim that is: |
| 6 | + |
| 7 | +* Small |
| 8 | +* Single-file |
| 9 | +* Completely Documented |
| 10 | + |
| 11 | +**NOT** a Neovim distribution, but instead a starting point for your configuration. |
| 12 | + |
| 13 | +## Installation |
| 14 | + |
| 15 | +### Install Neovim |
| 16 | + |
| 17 | +Kickstart.nvim targets *only* the latest |
| 18 | +['stable'](https://github.com/neovim/neovim/releases/tag/stable) and latest |
| 19 | +['nightly'](https://github.com/neovim/neovim/releases/tag/nightly) of Neovim. |
| 20 | +If you are experiencing issues, please make sure you have the latest versions. |
| 21 | + |
| 22 | +### Install External Dependencies |
| 23 | + |
| 24 | +External Requirements: |
| 25 | +- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`) |
| 26 | +- [ripgrep](https://github.com/BurntSushi/ripgrep#installation) |
| 27 | +- Clipboard tool (xclip/xsel/win32yank or other depending on platform) |
| 28 | +- A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons |
| 29 | + - if you have it set `vim.g.have_nerd_font` in `init.lua` to true |
| 30 | +- Language Setup: |
| 31 | + - If you want to write Typescript, you need `npm` |
| 32 | + - If you want to write Golang, you will need `go` |
| 33 | + - etc. |
| 34 | + |
| 35 | +> **NOTE** |
| 36 | +> See [Install Recipes](#Install-Recipes) for additional Windows and Linux specific notes |
| 37 | +> and quick install snippets |
| 38 | +
|
| 39 | +### Install Kickstart |
| 40 | + |
| 41 | +> **NOTE** |
| 42 | +> [Backup](#FAQ) your previous configuration (if any exists) |
| 43 | +
|
| 44 | +Neovim's configurations are located under the following paths, depending on your OS: |
| 45 | + |
| 46 | +| OS | PATH | |
| 47 | +| :- | :--- | |
| 48 | +| Linux, MacOS | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` | |
| 49 | +| Windows (cmd)| `%localappdata%\nvim\` | |
| 50 | +| Windows (powershell)| `$env:LOCALAPPDATA\nvim\` | |
| 51 | + |
| 52 | +#### Recommended Step |
| 53 | + |
| 54 | +[Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) this repo |
| 55 | +so that you have your own copy that you can modify, then install by cloning the |
| 56 | +fork to your machine using one of the commands below, depending on your OS. |
| 57 | + |
| 58 | +> **NOTE** |
| 59 | +> Your fork's url will be something like this: |
| 60 | +> `https://github.com/<your_github_username>/kickstart.nvim.git` |
| 61 | +
|
| 62 | +You likely want to remove `lazy-lock.json` from your fork's `.gitignore` file |
| 63 | +too - it's ignored in the kickstart repo to make maintenance easier, but it's |
| 64 | +[recommmended to track it in version control](https://lazy.folke.io/usage/lockfile). |
| 65 | + |
| 66 | +#### Clone kickstart.nvim |
| 67 | +> **NOTE** |
| 68 | +> If following the recommended step above (i.e., forking the repo), replace |
| 69 | +> `nvim-lua` with `<your_github_username>` in the commands below |
| 70 | +
|
| 71 | +<details><summary> Linux and Mac </summary> |
| 72 | + |
| 73 | +```sh |
| 74 | +git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim |
| 75 | +``` |
| 76 | + |
| 77 | +</details> |
| 78 | + |
| 79 | +<details><summary> Windows </summary> |
| 80 | + |
| 81 | +If you're using `cmd.exe`: |
| 82 | + |
| 83 | +``` |
| 84 | +git clone https://github.com/nvim-lua/kickstart.nvim.git "%localappdata%\nvim" |
| 85 | +``` |
| 86 | + |
| 87 | +If you're using `powershell.exe` |
| 88 | + |
| 89 | +``` |
| 90 | +git clone https://github.com/nvim-lua/kickstart.nvim.git "${env:LOCALAPPDATA}\nvim" |
| 91 | +``` |
| 92 | + |
| 93 | +</details> |
| 94 | + |
| 95 | +### Post Installation |
| 96 | + |
| 97 | +Start Neovim |
| 98 | + |
| 99 | +```sh |
| 100 | +nvim |
| 101 | +``` |
| 102 | + |
| 103 | +That's it! Lazy will install all the plugins you have. Use `:Lazy` to view |
| 104 | +current plugin status. Hit `q` to close the window. |
| 105 | + |
| 106 | +Read through the `init.lua` file in your configuration folder for more |
| 107 | +information about extending and exploring Neovim. That also includes |
| 108 | +examples of adding popularly requested plugins. |
| 109 | + |
| 110 | + |
| 111 | +### Getting Started |
| 112 | + |
| 113 | +[The Only Video You Need to Get Started with Neovim](https://youtu.be/m8C0Cq9Uv9o) |
| 114 | + |
| 115 | +### FAQ |
| 116 | + |
| 117 | +* What should I do if I already have a pre-existing neovim configuration? |
| 118 | + * You should back it up and then delete all associated files. |
| 119 | + * This includes your existing init.lua and the neovim files in `~/.local` |
| 120 | + which can be deleted with `rm -rf ~/.local/share/nvim/` |
| 121 | +* Can I keep my existing configuration in parallel to kickstart? |
| 122 | + * Yes! You can use [NVIM_APPNAME](https://neovim.io/doc/user/starting.html#%24NVIM_APPNAME)`=nvim-NAME` |
| 123 | + to maintain multiple configurations. For example, you can install the kickstart |
| 124 | + configuration in `~/.config/nvim-kickstart` and create an alias: |
| 125 | + ``` |
| 126 | + alias nvim-kickstart='NVIM_APPNAME="nvim-kickstart" nvim' |
| 127 | + ``` |
| 128 | + When you run Neovim using `nvim-kickstart` alias it will use the alternative |
| 129 | + config directory and the matching local directory |
| 130 | + `~/.local/share/nvim-kickstart`. You can apply this approach to any Neovim |
| 131 | + distribution that you would like to try out. |
| 132 | +* What if I want to "uninstall" this configuration: |
| 133 | + * See [lazy.nvim uninstall](https://github.com/folke/lazy.nvim#-uninstalling) information |
| 134 | +* Why is the kickstart `init.lua` a single file? Wouldn't it make sense to split it into multiple files? |
| 135 | + * The main purpose of kickstart is to serve as a teaching tool and a reference |
| 136 | + configuration that someone can easily use to `git clone` as a basis for their own. |
| 137 | + As you progress in learning Neovim and Lua, you might consider splitting `init.lua` |
| 138 | + into smaller parts. A fork of kickstart that does this while maintaining the |
| 139 | + same functionality is available here: |
| 140 | + * [kickstart-modular.nvim](https://github.com/dam9000/kickstart-modular.nvim) |
| 141 | + * Discussions on this topic can be found here: |
| 142 | + * [Restructure the configuration](https://github.com/nvim-lua/kickstart.nvim/issues/218) |
| 143 | + * [Reorganize init.lua into a multi-file setup](https://github.com/nvim-lua/kickstart.nvim/pull/473) |
| 144 | +
|
| 145 | +### Install Recipes |
| 146 | +
|
| 147 | +Below you can find OS specific install instructions for Neovim and dependencies. |
| 148 | +
|
| 149 | +After installing all the dependencies continue with the [Install Kickstart](#Install-Kickstart) step. |
| 150 | +
|
| 151 | +#### Windows Installation |
| 152 | +
|
| 153 | +<details><summary>Windows with Microsoft C++ Build Tools and CMake</summary> |
| 154 | +Installation may require installing build tools and updating the run command for `telescope-fzf-native` |
| 155 | +
|
| 156 | +See `telescope-fzf-native` documentation for [more details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation) |
| 157 | +
|
| 158 | +This requires: |
| 159 | +
|
| 160 | +- Install CMake and the Microsoft C++ Build Tools on Windows |
| 161 | +
|
| 162 | +```lua |
| 163 | +{'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' } |
| 164 | +``` |
| 165 | +</details> |
| 166 | +<details><summary>Windows with gcc/make using chocolatey</summary> |
| 167 | +Alternatively, one can install gcc and make which don't require changing the config, |
| 168 | +the easiest way is to use choco: |
| 169 | + |
| 170 | +1. install [chocolatey](https://chocolatey.org/install) |
| 171 | +either follow the instructions on the page or use winget, |
| 172 | +run in cmd as **admin**: |
| 173 | +``` |
| 174 | +winget install --accept-source-agreements chocolatey.chocolatey |
| 175 | +``` |
| 176 | + |
| 177 | +2. install all requirements using choco, exit previous cmd and |
| 178 | +open a new one so that choco path is set, and run in cmd as **admin**: |
| 179 | +``` |
| 180 | +choco install -y neovim git ripgrep wget fd unzip gzip mingw make |
| 181 | +``` |
| 182 | +</details> |
| 183 | +<details><summary>WSL (Windows Subsystem for Linux)</summary> |
| 184 | + |
| 185 | +``` |
| 186 | +wsl --install |
| 187 | +wsl |
| 188 | +sudo add-apt-repository ppa:neovim-ppa/unstable -y |
| 189 | +sudo apt update |
| 190 | +sudo apt install make gcc ripgrep unzip git xclip neovim |
| 191 | +``` |
| 192 | +</details> |
| 193 | + |
| 194 | +#### Linux Install |
| 195 | +<details><summary>Ubuntu Install Steps</summary> |
| 196 | + |
| 197 | +``` |
| 198 | +sudo add-apt-repository ppa:neovim-ppa/unstable -y |
| 199 | +sudo apt update |
| 200 | +sudo apt install make gcc ripgrep unzip git xclip neovim |
| 201 | +``` |
| 202 | +</details> |
| 203 | +<details><summary>Debian Install Steps</summary> |
| 204 | + |
| 205 | +``` |
| 206 | +sudo apt update |
| 207 | +sudo apt install make gcc ripgrep unzip git xclip curl |
| 208 | +
|
| 209 | +# Now we install nvim |
| 210 | +curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz |
| 211 | +sudo rm -rf /opt/nvim-linux64 |
| 212 | +sudo mkdir -p /opt/nvim-linux64 |
| 213 | +sudo chmod a+rX /opt/nvim-linux64 |
| 214 | +sudo tar -C /opt -xzf nvim-linux64.tar.gz |
| 215 | +
|
| 216 | +# make it available in /usr/local/bin, distro installs to /usr/bin |
| 217 | +sudo ln -sf /opt/nvim-linux64/bin/nvim /usr/local/bin/ |
| 218 | +``` |
| 219 | +</details> |
| 220 | +<details><summary>Fedora Install Steps</summary> |
| 221 | + |
| 222 | +``` |
| 223 | +sudo dnf install -y gcc make git ripgrep fd-find unzip neovim |
| 224 | +``` |
| 225 | +</details> |
| 226 | + |
| 227 | +<details><summary>Arch Install Steps</summary> |
| 228 | + |
| 229 | +``` |
| 230 | +sudo pacman -S --noconfirm --needed gcc make git ripgrep fd unzip neovim |
| 231 | +``` |
| 232 | +</details> |
| 233 | + |
0 commit comments