Skip to content

Commit 2464f21

Browse files
committed
2 parents 5f24241 + 7201dc4 commit 2464f21

File tree

9 files changed

+570
-238
lines changed

9 files changed

+570
-238
lines changed

.github/pull_request_template.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
***************************************************************************
2+
**NOTE**
3+
Please verify that the `base repository` above has the intended destination!
4+
Github by default opens Pull Requests against the parent of a forked repository.
5+
If this is your personal fork and you didn't intend to open a PR for contribution
6+
to the original project then adjust the `base repository` accordingly.
7+
**************************************************************************
8+

README.md

Lines changed: 130 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -21,29 +21,52 @@ If you are experiencing issues, please make sure you have the latest versions.
2121

2222
### Install External Dependencies
2323

24-
> **NOTE**
25-
> [Backup](#FAQ) your previous configuration (if any exists)
26-
2724
External Requirements:
2825
- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`)
2926
- [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
3030
- Language Setup:
31-
- If want to write Typescript, you need `npm`
32-
- If want to write Golang, you will need `go`
31+
- If you want to write Typescript, you need `npm`
32+
- If you want to write Golang, you will need `go`
3333
- etc.
3434

3535
> **NOTE**
36-
> See [Windows Installation](#Windows-Installation) to double check any additional Windows notes
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)
3743
3844
Neovim's configurations are located under the following paths, depending on your OS:
3945

4046
| OS | PATH |
4147
| :- | :--- |
4248
| Linux, MacOS | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` |
43-
| Windows (cmd)| `%userprofile%\AppData\Local\nvim\` |
44-
| Windows (powershell)| `$env:USERPROFILE\AppData\Local\nvim\` |
49+
| Windows (cmd)| `%localappdata%\nvim\` |
50+
| Windows (powershell)| `$env:LOCALAPPDATA\nvim\` |
51+
52+
#### Recommended Step
4553

46-
Clone kickstart.nvim:
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
4770
4871
<details><summary> Linux and Mac </summary>
4972

@@ -58,13 +81,13 @@ git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HO
5881
If you're using `cmd.exe`:
5982

6083
```
61-
git clone https://github.com/nvim-lua/kickstart.nvim.git %userprofile%\AppData\Local\nvim\
84+
git clone https://github.com/nvim-lua/kickstart.nvim.git "%localappdata%\nvim"
6285
```
6386

6487
If you're using `powershell.exe`
6588

6689
```
67-
git clone https://github.com/nvim-lua/kickstart.nvim.git $env:USERPROFILE\AppData\Local\nvim\
90+
git clone https://github.com/nvim-lua/kickstart.nvim.git "${env:LOCALAPPDATA}\nvim"
6891
```
6992

7093
</details>
@@ -78,117 +101,133 @@ nvim
78101
```
79102

80103
That's it! Lazy will install all the plugins you have. Use `:Lazy` to view
81-
current plugin status.
104+
current plugin status. Hit `q` to close the window.
82105

83106
Read through the `init.lua` file in your configuration folder for more
84-
information about extending and exploring Neovim.
85-
86-
### Getting Started
87-
88-
See [Effective Neovim: Instant IDE](https://youtu.be/stqUbv-5u2s), covering the
89-
previous version. Note: The install via init.lua is outdated, please follow the
90-
install instructions in this file instead. An updated video is coming soon.
91-
92-
### Recommended Steps
107+
information about extending and exploring Neovim. That also includes
108+
examples of adding popularly requested plugins.
93109

94-
[Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) this repo
95-
(so that you have your own copy that you can modify) and then installing you
96-
can install to your machine using the methods above.
97-
98-
> **NOTE**
99-
> Your fork's url will be something like this: `https://github.com/<your_github_username>/kickstart.nvim.git`
100-
101-
#### Examples of adding popularly requested plugins
102-
103-
<details>
104-
<summary>Adding autopairs</summary>
105-
106-
This will automatically install [windwp/nvim-autopairs](https://github.com/windwp/nvim-autopairs) and enable it on startup. For more information, see documentation for [lazy.nvim](https://github.com/folke/lazy.nvim).
107-
108-
In the file: `lua/custom/plugins/autopairs.lua`, add:
109-
110-
```lua
111-
-- File: lua/custom/plugins/autopairs.lua
112-
113-
return {
114-
"windwp/nvim-autopairs",
115-
-- Optional dependency
116-
dependencies = { 'hrsh7th/nvim-cmp' },
117-
config = function()
118-
require("nvim-autopairs").setup {}
119-
-- If you want to automatically add `(` after selecting a function or method
120-
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
121-
local cmp = require('cmp')
122-
cmp.event:on(
123-
'confirm_done',
124-
cmp_autopairs.on_confirm_done()
125-
)
126-
end,
127-
}
128-
```
129110

130-
</details>
131-
<details>
132-
<summary>Adding a file tree plugin</summary>
133-
134-
This will install the tree plugin and add the command `:Neotree` for you. You can explore the documentation at [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim) for more information.
135-
136-
In the file: `lua/custom/plugins/filetree.lua`, add:
137-
138-
```lua
139-
-- Unless you are still migrating, remove the deprecated commands from v1.x
140-
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
141-
142-
return {
143-
"nvim-neo-tree/neo-tree.nvim",
144-
version = "*",
145-
dependencies = {
146-
"nvim-lua/plenary.nvim",
147-
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
148-
"MunifTanjim/nui.nvim",
149-
},
150-
config = function ()
151-
require('neo-tree').setup {}
152-
end,
153-
}
154-
```
111+
### Getting Started
155112

156-
</details>
113+
[The Only Video You Need to Get Started with Neovim](https://youtu.be/m8C0Cq9Uv9o)
157114

158115
### FAQ
159116

160117
* What should I do if I already have a pre-existing neovim configuration?
161-
* You should back it up, then delete all files associated with it.
162-
* This includes your existing init.lua and the neovim files in `~/.local` which can be deleted with `rm -rf ~/.local/share/nvim/`
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/`
163121
* Can I keep my existing configuration in parallel to kickstart?
164-
* 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:
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:
165125
```
166126
alias nvim-kickstart='NVIM_APPNAME="nvim-kickstart" nvim'
167127
```
168-
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 can apply this approach to any Neovim distribution that you would like to try out.
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.
169132
* What if I want to "uninstall" this configuration:
170133
* See [lazy.nvim uninstall](https://github.com/folke/lazy.nvim#-uninstalling) information
171134
* Why is the kickstart `init.lua` a single file? Wouldn't it make sense to split it into multiple files?
172135
* The main purpose of kickstart is to serve as a teaching tool and a reference
173-
configuration that someone can easily `git clone` as a basis for their own.
136+
configuration that someone can easily use to `git clone` as a basis for their own.
174137
As you progress in learning Neovim and Lua, you might consider splitting `init.lua`
175-
into smaller parts. A fork of kickstart that does this while maintaining the exact
138+
into smaller parts. A fork of kickstart that does this while maintaining the
176139
same functionality is available here:
177140
* [kickstart-modular.nvim](https://github.com/dam9000/kickstart-modular.nvim)
178141
* Discussions on this topic can be found here:
179142
* [Restructure the configuration](https://github.com/nvim-lua/kickstart.nvim/issues/218)
180143
* [Reorganize init.lua into a multi-file setup](https://github.com/nvim-lua/kickstart.nvim/pull/473)
181144
182-
### Windows Installation
145+
### Install Recipes
183146
184-
Installation may require installing build tools, and updating the run command for `telescope-fzf-native`
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`
185155
186156
See `telescope-fzf-native` documentation for [more details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation)
187157
188158
This requires:
189159
190-
- Install CMake, and the Microsoft C++ Build Tools on Windows
160+
- Install CMake and the Microsoft C++ Build Tools on Windows
191161
192162
```lua
193163
{'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }
194164
```
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

Comments
 (0)