Skip to content

Commit ea01aad

Browse files
restrayTimothée Belhomme
authored and
Timothée Belhomme
committed
feat: move to lazy.nvim package manager and add first plugins (nvim-lua#178)
Closes nvim-lua#175 Closes nvim-lua#177 Closes nvim-lua#173 Closes nvim-lua#169 Closes nvim-lua#161 Closes nvim-lua#144 Closes nvim-lua#138 Fixes nvim-lua#136 Closes nvim-lua#137 Closes nvim-lua#131 Closes nvim-lua#117 Closes nvim-lua#130 Closes nvim-lua#115 Closes nvim-lua#86 Closes nvim-lua#105 Closes nvim-lua#70 Fixes nvim-lua#176 Fixes nvim-lua#174 Fixes nvim-lua#160 Fixes nvim-lua#158
1 parent 0a6bfe1 commit ea01aad

File tree

9 files changed

+457
-190
lines changed

9 files changed

+457
-190
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ tags
22
test.sh
33
.luarc.json
44
nvim
5-
plugin/packer_compiled.lua
5+
lazy-lock.json

Dockerfile

Lines changed: 0 additions & 34 deletions
This file was deleted.

README.md

Lines changed: 80 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,91 @@
1+
# kickstart.nvim
2+
13
### Introduction
24

35
A starting point for Neovim that is:
46

5-
* Small (<500 lines)
6-
* Single-file
7+
* Small
8+
* Single-file (with examples of moving to multi-file)
79
* Documented
810
* Modular
911

10-
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.
12+
This repo is meant to be used as by **YOU** to begin your Neovim journey; remove the things you don't use and add what you miss.
1113

12-
This repo is meant to be used as a starting point for a user's own configuration; remove the things you don't use and add what you miss. Please refrain from leaving comments about enabling / disabling particular languages out of the box.
14+
Distribution Alternatives:
15+
- [LazyVim](https://www.lazyvim.org/): A delightful distribution maintained by @folke (the author of lazy.nvim, the package manager used here)
1316

1417
### Installation
1518

19+
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.
20+
1621
* Backup your previous configuration
17-
* Copy and paste the kickstart.nvim `init.lua` into `$HOME/.config/nvim/init.lua` (Linux) or `~/AppData/Local/nvim/init.lua` (Windows)
18-
* Start Neovim (`nvim`) and run `:PackerInstall` - ignore any error message about missing plugins, `:PackerInstall` will fix that shortly
22+
* (Recommended) Fork this repo (so that you have your own copy that you can modify).
23+
* Clone the kickstart repo into `$HOME/.config/nvim/` (Linux/Mac) or `~/AppData/Local/nvim/` (Windows)
24+
* If you don't want to include it as a git repo, you can just clone it and then move the files to this location
25+
* Start Neovim (`nvim`) and allow `lazy.nvim` to complete installation.
1926
* Restart Neovim
27+
* **You're ready to go!**
2028

29+
Additional system requirements:
30+
- Make sure to review the readmes of the plugins if you are experiencing errors. In particular:
31+
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation) is required for multiple [telescope](https://github.com/nvim-telescope/telescope.nvim#suggested-dependencies) pickers.
32+
- See as well [Windows Installation](#Windows-Installation)
2133

22-
If there are languages that you don't want to use, remove their configuration and notes from your `init.lua` after copy and pasting (for example, in the mason configuration).
34+
### Configuration And Extension
2335

24-
### Windows Installation
25-
26-
Installation may require installing build tools, and updating the run command for `telescope-fzf-native`
36+
* Inside of your fork, feel free to modify any file you like! It's your fork!
37+
* Then there are two primary configuration options available:
38+
* Include the `lua/kickstart/plugins/*` files in your configuration.
39+
* Add new configuration in `lua/custom/plugins/*` files, which will be auto sourced using `lazy.nvim`
40+
* NOTE: To enable this, you need to uncomment `{ import = 'custom.plugins' }` in your `init.lua`
2741

28-
See `telescope-fzf-native` documention for [more details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation)
42+
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
2943

30-
This requires:
44+
#### Example: Adding an autopairs plugin
3145

32-
- Install CMake, and the Microsoft C++ Build Tools on Windows
46+
In the file: `lua/custom/plugins/autopairs.lua`, add:
3347

3448
```lua
35-
use {'nvim-telescope/telescope-fzf-native.nvim', run = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }
49+
-- File: lua/custom/plugins/autopairs.lua
50+
51+
return {
52+
"windwp/nvim-autopairs",
53+
config = function()
54+
require("nvim-autopairs").setup {}
55+
end,
56+
}
3657
```
3758

38-
### Configuration
3959

40-
You could directly modify the `init.lua` file with your personal customizations. This option is the most straightforward, but if you update your config from this repo, you may need to reapply your changes.
60+
This will automatically install `nvim-autopairs` and enable it on startup. For more information, see documentation for [lazy.nvim](https://github.com/folke/lazy.nvim).
4161

42-
An alternative approach is to create a separate `custom.plugins` module to register your own plugins. In addition, you can handle further customizations in the `/after/plugin/` directory (see `:help load-plugins`). See the following examples for more information. Leveraging this technique should make upgrading to a newer version of this repo easier.
62+
#### Example: Adding a file tree plugin
4363

44-
#### Example `plugins.lua`
45-
46-
The following is an example of a `plugins.lua` module (located at `$HOME/.config/nvim/lua/custom/plugins.lua`) where you can register your own plugins.
64+
In the file: `lua/custom/plugins/filetree.lua`, add:
4765

4866
```lua
49-
return function(use)
50-
use({
51-
"folke/which-key.nvim",
52-
config = function()
53-
require("which-key").setup({})
54-
end
55-
})
56-
end
67+
return {
68+
"nvim-neo-tree/neo-tree.nvim",
69+
version = "*",
70+
dependencies = {
71+
"nvim-lua/plenary.nvim",
72+
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
73+
"MunifTanjim/nui.nvim",
74+
},
75+
config = function ()
76+
-- Unless you are still migrating, remove the deprecated commands from v1.x
77+
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
78+
79+
require('neo-tree').setup {}
80+
end,
81+
}
5782
```
5883

59-
#### Example `defaults.lua`
84+
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.
85+
86+
#### Example: Adding a file to change default options
6087

61-
For further customizations, you can add a file in the `/after/plugin/` folder (see `:help load-plugins`) to include your own options, keymaps, autogroups, and more. The following is an example `defaults.lua` file (located at `$HOME/.config/nvim/after/plugin/defaults.lua`).
88+
To change default options, you can add a file in the `/after/plugin/` folder (see `:help load-plugins`) to include your own options, keymaps, autogroups, and more. The following is an example `defaults.lua` file (located at `$HOME/.config/nvim/after/plugin/defaults.lua`).
6289

6390
```lua
6491
vim.opt.relativenumber = true
@@ -72,13 +99,32 @@ Pull-requests are welcome. The goal of this repo is not to create a Neovim confi
7299

73100
* Custom language server configuration (null-ls templates)
74101
* Theming beyond a default colorscheme necessary for LSP highlight groups
75-
* Lazy-loading. Kickstart.nvim should start within 40 ms on modern hardware. Please profile and contribute to upstream plugins to optimize startup time instead.
76102

77103
Each PR, especially those which increase the line count, should have a description as to why the PR is necessary.
78104

79105
### FAQ
80106

81-
* What should I do if I already have a pre-existing neovim configuration?
82-
* You should back it up, then delete all files associated with it.
83-
* This includes your existing init.lua and the neovim files in `.local` which can be deleted with `rm -rf ~/.local/share/nvim/`
107+
* What should I do if I already have a pre-existing neovim configuration?
108+
* You should back it up, then delete all files associated with it.
109+
* This includes your existing init.lua and the neovim files in `~/.local` which can be deleted with `rm -rf ~/.local/share/nvim/`
110+
* You may also want to look at the [migration guide for lazy.nvim](https://github.com/folke/lazy.nvim#-migration-guide)
111+
* What if I want to "uninstall" this configuration:
112+
* See [lazy.nvim uninstall](https://github.com/folke/lazy.nvim#-uninstalling) information
113+
* Are there any cool videos about this plugin?
114+
* Current iteration of kickstart (coming soon)
115+
* Here is one about the previous iteration of kickstart: [video introduction to Kickstart.nvim](https://youtu.be/stqUbv-5u2s).
116+
117+
### Windows Installation
118+
119+
Installation may require installing build tools, and updating the run command for `telescope-fzf-native`
120+
121+
See `telescope-fzf-native` documention for [more details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation)
122+
123+
This requires:
124+
125+
- Install CMake, and the Microsoft C++ Build Tools on Windows
126+
127+
```lua
128+
use {'nvim-telescope/telescope-fzf-native.nvim', run = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }
129+
```
84130

doc/kickstart.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
================================================================================
2+
INTRODUCTION *kickstart.nvim*
3+
4+
Kickstart.nvim is a project to help you get started on your neovim journey.
5+
6+
*kickstart-is-not*
7+
It is not:
8+
- Complete framework for every plugin under the sun
9+
- Place to add every plugin that could ever be useful
10+
11+
*kickstart-is*
12+
It is:
13+
- Somewhere that has a good start for the most common "IDE" type features:
14+
- autocompletion
15+
- goto-definition
16+
- find references
17+
- fuzzy finding
18+
- and hinting at what more can be done :)
19+
- A place to _kickstart_ your journey.
20+
- You should fork this project and use/modify it so that it matches your
21+
style and preferences. If you don't want to do that, there are probably
22+
other projects that would fit much better for you (and that's great!)!
23+
24+
vim:tw=78:ts=8:ft=help:norl:

doc/tags

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
kickstart-is kickstart.txt /*kickstart-is*
2+
kickstart-is-not kickstart.txt /*kickstart-is-not*
3+
kickstart.nvim kickstart.txt /*kickstart.nvim*

0 commit comments

Comments
 (0)