Skip to content

Commit e700fcd

Browse files
tjdevriessmCloudInTheSky
authored andcommitted
rewrite: slimmer, trimmer and more lazy kickstart.nvim (nvim-lua#635)
We've removed over 1/3 of the code that was in kickstart previously, and more than doubled the amount of comments explaining every line of code (to the best of my ability). kickstart now properly uses many of the lazy.nvim config and loading idioms, which should be really helpful for people moving both to modular configs, as well as extending the kickstart config in one file. Additional features: - Beautiful ascii art - Added some documentation that explains what is an LSP, what is telescope, etc - There is now a `:checkhealth` for kickstart, which checks some basic information and adds useful information for maintainers (for people cloning the repo). - Improved LSP configuration and tool installation, for easier first time startup - Changed init.lua ordering, so that it moves from simple options to complicated config ``` ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- Lua 1 108 404 298 ------------------------------------------------------------------------------- ```
1 parent 3ecaf22 commit e700fcd

File tree

3 files changed

+237
-510
lines changed

3 files changed

+237
-510
lines changed

README.md

Lines changed: 100 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,20 @@ External Requirements:
4141
> **NOTE**
4242
> [Backup](#FAQ) your previous configuration (if any exists)
4343
44+
<<<<<<< HEAD
45+
=======
46+
External Requirements:
47+
- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`)
48+
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation)
49+
- Language Setup:
50+
- If want to write Typescript, you need `npm`
51+
- If want to write Golang, you will need `go`
52+
- etc.
53+
54+
> **NOTE**
55+
> See [Windows Installation](#Windows-Installation) to double check any additional Windows notes
56+
57+
>>>>>>> afa29b0 (rewrite: slimmer, trimmer and more lazy kickstart.nvim (#635))
4458
Neovim's configurations are located under the following paths, depending on your OS:
4559

4660
| OS | PATH |
@@ -66,6 +80,11 @@ fork to your machine using one of the commands below, depending on your OS.
6680
6781
<details><summary> Linux and Mac </summary>
6882

83+
<<<<<<< HEAD
84+
=======
85+
<details><summary> Linux and Mac </summary>
86+
87+
>>>>>>> afa29b0 (rewrite: slimmer, trimmer and more lazy kickstart.nvim (#635))
6988
```sh
7089
git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim
7190
```
@@ -97,6 +116,7 @@ nvim
97116
```
98117

99118
That's it! Lazy will install all the plugins you have. Use `:Lazy` to view
119+
<<<<<<< HEAD
100120
current plugin status. Hit `q` to close the window.
101121

102122
Read through the `init.lua` file in your configuration folder for more
@@ -107,13 +127,90 @@ examples of adding popularly requested plugins.
107127
### Getting Started
108128

109129
[The Only Video You Need to Get Started with Neovim](https://youtu.be/m8C0Cq9Uv9o)
130+
=======
131+
current plugin status.
132+
133+
Read through the `init.lua` file in your configuration folder for more
134+
information about extending and exploring Neovim.
135+
136+
### Getting Started
137+
138+
See [Effective Neovim: Instant IDE](https://youtu.be/stqUbv-5u2s), covering the
139+
previous version. Note: The install via init.lua is outdated, please follow the
140+
install instructions in this file instead. An updated video is coming soon.
141+
142+
### Recommended Steps
143+
144+
[Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) this repo
145+
(so that you have your own copy that you can modify) and then installing you
146+
can install to your machine using the methods above.
147+
148+
> **NOTE**
149+
> Your fork's url will be something like this: `https://github.com/<your_github_username>/kickstart.nvim.git`
150+
151+
#### Examples of adding popularly requested plugins
152+
153+
<details>
154+
<summary>Adding autopairs</summary>
155+
156+
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).
157+
158+
In the file: `lua/custom/plugins/autopairs.lua`, add:
159+
160+
```lua
161+
-- File: lua/custom/plugins/autopairs.lua
162+
163+
return {
164+
"windwp/nvim-autopairs",
165+
-- Optional dependency
166+
dependencies = { 'hrsh7th/nvim-cmp' },
167+
config = function()
168+
require("nvim-autopairs").setup {}
169+
-- If you want to automatically add `(` after selecting a function or method
170+
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
171+
local cmp = require('cmp')
172+
cmp.event:on(
173+
'confirm_done',
174+
cmp_autopairs.on_confirm_done()
175+
)
176+
end,
177+
}
178+
```
179+
180+
</details>
181+
<details>
182+
<summary>Adding a file tree plugin</summary>
183+
184+
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.
185+
186+
In the file: `lua/custom/plugins/filetree.lua`, add:
187+
188+
```lua
189+
-- Unless you are still migrating, remove the deprecated commands from v1.x
190+
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
191+
192+
return {
193+
"nvim-neo-tree/neo-tree.nvim",
194+
version = "*",
195+
dependencies = {
196+
"nvim-lua/plenary.nvim",
197+
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
198+
"MunifTanjim/nui.nvim",
199+
},
200+
config = function ()
201+
require('neo-tree').setup {}
202+
end,
203+
}
204+
```
205+
206+
</details>
207+
>>>>>>> afa29b0 (rewrite: slimmer, trimmer and more lazy kickstart.nvim (#635))
110208
111209
### FAQ
112210

113211
* What should I do if I already have a pre-existing neovim configuration?
114-
* You should back it up and then delete all associated files.
115-
* This includes your existing init.lua and the neovim files in `~/.local`
116-
which can be deleted with `rm -rf ~/.local/share/nvim/`
212+
* You should back it up, then delete all files associated with it.
213+
* This includes your existing init.lua and the neovim files in `~/.local` which can be deleted with `rm -rf ~/.local/share/nvim/`
117214
* Can I keep my existing configuration in parallel to kickstart?
118215
* Yes! You can use [NVIM_APPNAME](https://neovim.io/doc/user/starting.html#%24NVIM_APPNAME)`=nvim-NAME`
119216
to maintain multiple configurations. For example, you can install the kickstart
@@ -158,72 +255,3 @@ This requires:
158255
```lua
159256
{'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }
160257
```
161-
</details>
162-
<details><summary>Windows with gcc/make using chocolatey</summary>
163-
Alternatively, one can install gcc and make which don't require changing the config,
164-
the easiest way is to use choco:
165-
166-
1. install [chocolatey](https://chocolatey.org/install)
167-
either follow the instructions on the page or use winget,
168-
run in cmd as **admin**:
169-
```
170-
winget install --accept-source-agreements chocolatey.chocolatey
171-
```
172-
173-
2. install all requirements using choco, exit previous cmd and
174-
open a new one so that choco path is set, and run in cmd as **admin**:
175-
```
176-
choco install -y neovim git ripgrep wget fd unzip gzip mingw make
177-
```
178-
</details>
179-
<details><summary>WSL (Windows Subsystem for Linux)</summary>
180-
181-
```
182-
wsl --install
183-
wsl
184-
sudo add-apt-repository ppa:neovim-ppa/unstable -y
185-
sudo apt update
186-
sudo apt install make gcc ripgrep unzip git xclip neovim
187-
```
188-
</details>
189-
190-
#### Linux Install
191-
<details><summary>Ubuntu Install Steps</summary>
192-
193-
```
194-
sudo add-apt-repository ppa:neovim-ppa/unstable -y
195-
sudo apt update
196-
sudo apt install make gcc ripgrep unzip git xclip neovim
197-
```
198-
</details>
199-
<details><summary>Debian Install Steps</summary>
200-
201-
```
202-
sudo apt update
203-
sudo apt install make gcc ripgrep unzip git xclip curl
204-
205-
# Now we install nvim
206-
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz
207-
sudo rm -rf /opt/nvim-linux64
208-
sudo mkdir -p /opt/nvim-linux64
209-
sudo chmod a+rX /opt/nvim-linux64
210-
sudo tar -C /opt -xzf nvim-linux64.tar.gz
211-
212-
# make it available in /usr/local/bin, distro installs to /usr/bin
213-
sudo ln -sf /opt/nvim-linux64/bin/nvim /usr/local/bin/
214-
```
215-
</details>
216-
<details><summary>Fedora Install Steps</summary>
217-
218-
```
219-
sudo dnf install -y gcc make git ripgrep fd-find unzip neovim
220-
```
221-
</details>
222-
223-
<details><summary>Arch Install Steps</summary>
224-
225-
```
226-
sudo pacman -S --noconfirm --needed gcc make git ripgrep fd unzip neovim
227-
```
228-
</details>
229-

0 commit comments

Comments
 (0)