Skip to content

Commit 1baa252

Browse files
committed
2 parents c3cb82b + af4fd23 commit 1baa252

File tree

7 files changed

+835
-205
lines changed

7 files changed

+835
-205
lines changed

.github/workflows/stylua.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Check Lua Formatting
2+
name: Check Lua Formatting
3+
on: pull_request_target
4+
5+
jobs:
6+
stylua-check:
7+
if: github.repository == 'nvim-lua/kickstart.nvim'
8+
name: Stylua Check
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout Code
12+
uses: actions/checkout@v2
13+
with:
14+
ref: ${{ github.event.pull_request.head.sha }}
15+
- name: Stylua Check
16+
uses: JohnnyMorganz/stylua-action@v3
17+
with:
18+
token: ${{ secrets.GITHUB_TOKEN }}
19+
version: latest
20+
args: --check .
21+

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ tags
22
test.sh
33
.luarc.json
44
nvim
5+
6+
spell/
7+
lazy-lock.json

README.md

Lines changed: 82 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,109 @@
11
# kickstart.nvim
22

3-
https://github.com/kdheepak/kickstart.nvim/assets/1813121/f3ff9a2b-c31f-44df-a4fa-8a0d7b17cf7b
4-
5-
### Introduction
3+
## Introduction
64

75
A starting point for Neovim that is:
86

97
* Small
10-
* Single-file (with examples of moving to multi-file)
11-
* Documented
12-
* Modular
8+
* Single-file
9+
* Completely Documented
10+
11+
**NOT** a Neovim distribution, but instead a starting point for your configuration.
1312

14-
This repo is meant to be used by **YOU** to begin your Neovim journey; remove the things you don't use and add what you miss.
13+
## Installation
1514

16-
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.
15+
### Install Neovim
1716

18-
Distribution Alternatives:
19-
- [LazyVim](https://www.lazyvim.org/): A delightful distribution maintained by @folke (the author of lazy.nvim, the package manager used here)
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.
2021

21-
### Installation
22+
### Install External Dependencies
2223

2324
> **NOTE**
2425
> [Backup](#FAQ) your previous configuration (if any exists)
2526
26-
Requirements:
27-
* Make sure to review the readmes of the plugins if you are experiencing errors. In particular:
28-
* [ripgrep](https://github.com/BurntSushi/ripgrep#installation) is required for multiple [telescope](https://github.com/nvim-telescope/telescope.nvim#suggested-dependencies) pickers.
29-
* See [Windows Installation](#Windows-Installation) if you have trouble with `telescope-fzf-native`
27+
External Requirements:
28+
- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`)
29+
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation)
30+
- Language Setup:
31+
- If want to write Typescript, you need `npm`
32+
- If want to write Golang, you will need `go`
33+
- etc.
34+
35+
> **NOTE**
36+
> See [Windows Installation](#Windows-Installation) to double check any additional Windows notes
3037
3138
Neovim's configurations are located under the following paths, depending on your OS:
3239

3340
| OS | PATH |
3441
| :- | :--- |
35-
| Linux | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` |
36-
| MacOS | `$XDG_CONFIG_HOME/nvim`, '~/.config/nvim` |
37-
| Windows | `%userprofile%\AppData\Local\nvim\` |
42+
| Linux, MacOS | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` |
43+
| Windows (cmd)| `%userprofile%\AppData\Local\nvim\` |
44+
| Windows (powershell)| `$env:USERPROFILE\AppData\Local\nvim\` |
3845

3946
Clone kickstart.nvim:
4047

48+
<details><summary> Linux and Mac </summary>
49+
4150
```sh
42-
# on Linux and Mac
4351
git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim
4452
```
4553

54+
</details>
55+
56+
<details><summary> Windows </summary>
57+
58+
If you're using `cmd.exe`:
4659

4760
```
48-
# on Windows
4961
git clone https://github.com/nvim-lua/kickstart.nvim.git %userprofile%\AppData\Local\nvim\
5062
```
5163

64+
If you're using `powershell.exe`
65+
66+
```
67+
git clone https://github.com/nvim-lua/kickstart.nvim.git $env:USERPROFILE\AppData\Local\nvim\
68+
```
69+
70+
</details>
71+
5272
### Post Installation
5373

54-
Run the following command and then **you are ready to go**!
74+
Start Neovim
5575

5676
```sh
57-
nvim --headless "+Lazy! sync" +qa
77+
nvim
5878
```
5979

80+
That's it! Lazy will install all the plugins you have. Use `:Lazy` to view
81+
current plugin status.
82+
83+
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+
6092
### Recommended Steps
6193

62-
[Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) this repo (so that you have your own copy that you can modify) and then installing you can install to your machine using the methods above.
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.
6397

6498
> **NOTE**
6599
> Your fork's url will be something like this: `https://github.com/<your_github_username>/kickstart.nvim.git`
66100
67-
### Configuration And Extension
101+
#### Examples of adding popularly requested plugins
68102

69-
* Inside of your copy, feel free to modify any file you like! It's your copy!
70-
* Feel free to change any of the default options in `init.lua` to better suit your needs.
71-
* For adding plugins, there are 3 primary options:
72-
* Add new configuration in `lua/custom/plugins/*` files, which will be auto sourced using `lazy.nvim` (uncomment the line importing the `custom/plugins` directory in the `init.lua` file to enable this)
73-
* Modify `init.lua` with additional plugins.
74-
* Include the `lua/kickstart/plugins/*` files in your configuration.
103+
<details>
104+
<summary>Adding autopairs</summary>
75105

76-
You can also merge updates/changes from the repo back into your fork, to keep up-to-date with any changes for the default configuration.
77-
78-
#### Example: Adding an autopairs plugin
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).
79107

80108
In the file: `lua/custom/plugins/autopairs.lua`, add:
81109

@@ -99,10 +127,11 @@ return {
99127
}
100128
```
101129

130+
</details>
131+
<details>
132+
<summary>Adding a file tree plugin</summary>
102133

103-
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).
104-
105-
#### Example: Adding a file tree plugin
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.
106135

107136
In the file: `lua/custom/plugins/filetree.lua`, add:
108137

@@ -124,28 +153,31 @@ return {
124153
}
125154
```
126155

127-
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.
128-
129-
### Contribution
130-
131-
Pull-requests are welcome. The goal of this repo is not to create a Neovim configuration framework, but to offer a starting template that shows, by example, available features in Neovim. Some things that will not be included:
132-
133-
* Custom language server configuration (null-ls templates)
134-
* Theming beyond a default colorscheme necessary for LSP highlight groups
135-
136-
Each PR, especially those which increase the line count, should have a description as to why the PR is necessary.
156+
</details>
137157

138158
### FAQ
139159

140160
* What should I do if I already have a pre-existing neovim configuration?
141161
* You should back it up, then delete all files associated with it.
142162
* This includes your existing init.lua and the neovim files in `~/.local` which can be deleted with `rm -rf ~/.local/share/nvim/`
143-
* You may also want to look at the [migration guide for lazy.nvim](https://github.com/folke/lazy.nvim#-migration-guide)
163+
* 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:
165+
```
166+
alias nvim-kickstart='NVIM_APPNAME="nvim-kickstart" nvim'
167+
```
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.
144169
* What if I want to "uninstall" this configuration:
145170
* See [lazy.nvim uninstall](https://github.com/folke/lazy.nvim#-uninstalling) information
146-
* Are there any cool videos about this plugin?
147-
* Current iteration of kickstart (coming soon)
148-
* Here is one about the previous iteration of kickstart: [video introduction to Kickstart.nvim](https://youtu.be/stqUbv-5u2s). Note the install via init.lua no longer works as specified. Please follow the install instructions in this file instead as they're up to date.
171+
* Why is the kickstart `init.lua` a single file? Wouldn't it make sense to split it into multiple files?
172+
* 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.
174+
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
176+
same functionality is available here:
177+
* [kickstart-modular.nvim](https://github.com/dam9000/kickstart-modular.nvim)
178+
* Discussions on this topic can be found here:
179+
* [Restructure the configuration](https://github.com/nvim-lua/kickstart.nvim/issues/218)
180+
* [Reorganize init.lua into a multi-file setup](https://github.com/nvim-lua/kickstart.nvim/pull/473)
149181
150182
### Windows Installation
151183
@@ -160,4 +192,3 @@ This requires:
160192
```lua
161193
{'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }
162194
```
163-

0 commit comments

Comments
 (0)