Compare commits
249 Commits
tjdevries-
...
master
Author | SHA1 | Date | |
---|---|---|---|
931c6a48bf | |||
257a9e465d | |||
93ce0fa005 | |||
565f387a8b | |||
|
8df3deb6fe | ||
|
942b26184c | ||
|
81f270a704 | ||
|
f92fb11d68 | ||
|
2e68a2c253 | ||
|
9f5176fc2a | ||
|
931ec5c226 | ||
|
b07176aef6 | ||
|
f5c9fe8e15 | ||
|
5e258d276f | ||
|
5540527fab | ||
|
6d6b3f38c1 | ||
|
fabeb86d8b | ||
|
e2bfa0c66f | ||
|
23773900d9 | ||
|
c4363e4ad8 | ||
|
19afab1641 | ||
|
d605b840a2 | ||
|
1175f6d25a | ||
|
93fde0556e | ||
|
2877a60e00 | ||
|
dbba54cfd8 | ||
|
4c02e29e49 | ||
|
773e482d4b | ||
|
65a5ac404b | ||
|
8e24ca32e3 | ||
|
b81115d002 | ||
|
a222805c61 | ||
|
ea4335f5af | ||
|
da1271db4d | ||
|
7892c0c354 | ||
|
5ac4b58f85 | ||
|
2f494e59ca | ||
|
452e3a73cf | ||
|
7715b7c2ee | ||
|
b529bc3359 | ||
|
d8a1dbc4b4 | ||
|
000a5c42b0 | ||
|
cb1f16b8ca | ||
|
c0d6f98924 | ||
|
8de494fff2 | ||
|
3cfccc01be | ||
|
8fae6798b9 | ||
|
66e2a5a425 | ||
|
f764b7bacd | ||
|
b83b2b061c | ||
|
a02abdb161 | ||
|
c3127f1226 | ||
|
c9122e89e3 | ||
|
e6710a461a | ||
|
23fc4e59dc | ||
|
b99af2d6a3 | ||
|
94a93643ab | ||
|
38828dcaf7 | ||
|
b58666dd15 | ||
|
465d6f25c2 | ||
|
18b919c61e | ||
|
af4fd2355f | ||
|
1c89b024c8 | ||
|
8b5d48a199 | ||
|
7af594fd31 | ||
|
5d2d81b1ea | ||
|
bc4ad1218b | ||
|
c3ae716fb3 | ||
|
b115814916 | ||
|
deaafcf549 | ||
|
2510c29d62 | ||
|
60b93c95d3 | ||
|
c11afa2f90 | ||
|
c4055a2212 | ||
|
d45e5fe855 | ||
|
4d0dc8d4b1 | ||
|
e39a8bce9d | ||
|
76c5b1ec57 | ||
|
3824342d10 | ||
|
f8c8b08bc1 | ||
|
12bd68e8b9 | ||
|
3ca08acf0e | ||
|
39ae0829ac | ||
|
afafc9ab19 | ||
|
14cf319dbd | ||
|
ee9790b381 | ||
|
1915cea32e | ||
|
711e5976dd | ||
|
fa94716dce | ||
|
af4f51b2cd | ||
|
a005f15cec | ||
|
c8dd8e7e0c | ||
|
f23484cf88 | ||
|
47974f7db1 | ||
|
1d14453024 | ||
|
bced1c2943 | ||
|
1c59dc28c8 | ||
|
5ce4f38e1e | ||
|
0fda9af7c9 | ||
|
29c77cd7e5 | ||
|
1ad1ec2509 | ||
|
4d2cf48fb6 | ||
|
99acb843ac | ||
|
0dd934ee01 | ||
|
a3f3e08f34 | ||
|
68b1981f02 | ||
|
9b256d9368 | ||
|
5d8921990b | ||
|
0b659bd508 | ||
|
db7189f35c | ||
|
58f2dbab70 | ||
|
9fe8b20f03 | ||
|
c27b05467a | ||
|
01ed2525bb | ||
|
53e925240f | ||
|
f70edeec1b | ||
|
36224daa1b | ||
|
21b175d21b | ||
|
6ffc5a169f | ||
|
f15af9b8be | ||
|
313bd75ca0 | ||
|
4d5f24d6c1 | ||
|
daf2dc38fc | ||
|
fca29aa644 | ||
|
7a58588a92 | ||
|
e8c70473c9 | ||
|
878ec12318 | ||
|
3668af39f4 | ||
|
aff064f714 | ||
|
0340f77200 | ||
|
d891f4ac5a | ||
|
8443853cfe | ||
|
4b31f8ef9e | ||
|
24885f2483 | ||
|
c80a77488b | ||
|
6453352e25 | ||
|
c010cc71d5 | ||
|
304b2445cf | ||
|
f3f6a595a2 | ||
|
ac9b167860 | ||
|
1a971cbdcf | ||
|
a347bb401e | ||
|
38a0f03231 | ||
|
1283a0bbe7 | ||
|
f00ff6f6ab | ||
|
01a1ebed38 | ||
|
555dd8ed27 | ||
|
98ad2ee32a | ||
|
d0b47ce958 | ||
|
f6d67b69c3 | ||
|
a4ec83a433 | ||
|
5a59fb894c | ||
|
8ee4d24b36 | ||
|
b06980a8da | ||
|
9dcf923f60 | ||
|
c2fb482ec1 | ||
|
3dc1c1c4c2 | ||
|
734cc4e94a | ||
|
ea028fe0b5 | ||
|
29aa5bf42d | ||
|
7da1058748 | ||
|
c151235551 | ||
|
78ab7ee094 | ||
|
680e085761 | ||
|
31f867a699 | ||
|
7a953188db | ||
|
55aa0ea3cf | ||
|
b5d19fd188 | ||
|
93ef2e8078 | ||
|
a73b2e5f57 | ||
|
957655ddb8 | ||
|
6967424521 | ||
|
e68ed2c446 | ||
|
80d8d6947a | ||
|
d8b3b774bb | ||
|
c45b17ebab | ||
|
be90f025de | ||
|
8064bb63c5 | ||
|
ac07c5c59c | ||
|
5125fd927a | ||
|
e6cb90b2b3 | ||
|
5e4d24cb2f | ||
|
cdaa750c86 | ||
|
e15e7f4bda | ||
|
853b7c9d9e | ||
|
1d52d1e68b | ||
|
2f60b0086f | ||
|
f2b09aaac7 | ||
|
83b65a1c7d | ||
|
f031fa4509 | ||
|
8d97b11dd8 | ||
|
468c25588e | ||
|
8e8ba26a96 | ||
|
8a647f4384 | ||
|
4d7e4b8a1d | ||
|
455691bd8d | ||
|
a694c380d0 | ||
|
ded185411f | ||
|
ce2981db4b | ||
|
9469575bdc | ||
|
fa4bf9c378 | ||
|
2844f61d96 | ||
|
1c02cec98b | ||
|
55c52ce45b | ||
|
0470d07c8c | ||
|
efdfd6ed82 | ||
|
3041115415 | ||
|
7e39ab77c6 | ||
|
5b74a016b3 | ||
|
ac31b67aee | ||
|
7e0a1675d2 | ||
|
e78ad01dd2 | ||
|
bc3a3d3558 | ||
|
df10841feb | ||
|
821ad95565 | ||
|
604e92ef74 | ||
|
545577b9a1 | ||
|
ad6351a650 | ||
|
f3ad4bb518 | ||
|
b5c0b25398 | ||
|
2eff982e1e | ||
|
36842aa368 | ||
|
0dfc159286 | ||
|
9004013a8d | ||
|
9924f7e0a0 | ||
|
8d8fbd15bf | ||
|
06192307f3 | ||
|
0278862ea1 | ||
|
c19fe7af24 | ||
|
9451e1db71 | ||
|
e15e50edaf | ||
|
7cecf4fcb1 | ||
|
986aa82cd6 | ||
|
c975e0346a | ||
|
66dc5b896d | ||
|
4a37a0a9b1 | ||
|
933ddee7d9 | ||
|
187bebcbf9 | ||
|
72364ad9ac | ||
|
9f384d76f4 | ||
|
3526fbeec9 | ||
|
32744c3f66 | ||
|
4916072854 | ||
|
c4d7212de3 | ||
|
39a941c385 | ||
|
521940693e | ||
|
aa660e64ce | ||
|
bec7410127 | ||
|
6dccf03fd2 |
28
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
28
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!-- Any bug report not following this template will be immediately closed. Thanks -->
|
||||
|
||||
## Describe the bug
|
||||
<!-- A clear and concise description of what the bug is. -->
|
||||
|
||||
## To Reproduce
|
||||
<!-- Steps to reproduce the behavior. -->
|
||||
1. ...
|
||||
|
||||
## Desktop
|
||||
<!-- please complete the following information. -->
|
||||
- OS:
|
||||
- Terminal:
|
||||
|
||||
## Neovim Version
|
||||
<!-- Output of running `:version` from inside of neovim. -->
|
||||
|
||||
```
|
||||
```
|
8
.github/pull_request_template.md
vendored
Normal file
8
.github/pull_request_template.md
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
***************************************************************************
|
||||
**NOTE**
|
||||
Please verify that the `base repository` above has the intended destination!
|
||||
Github by default opens Pull Requests against the parent of a forked repository.
|
||||
If this is your personal fork and you didn't intend to open a PR for contribution
|
||||
to the original project then adjust the `base repository` accordingly.
|
||||
**************************************************************************
|
||||
|
21
.github/workflows/stylua.yml
vendored
Normal file
21
.github/workflows/stylua.yml
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
# Check Lua Formatting
|
||||
name: Check Lua Formatting
|
||||
on: pull_request_target
|
||||
|
||||
jobs:
|
||||
stylua-check:
|
||||
if: github.repository == 'nvim-lua/kickstart.nvim'
|
||||
name: Stylua Check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Stylua Check
|
||||
uses: JohnnyMorganz/stylua-action@v3
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
version: latest
|
||||
args: --check .
|
||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -2,3 +2,6 @@ tags
|
||||
test.sh
|
||||
.luarc.json
|
||||
nvim
|
||||
|
||||
spell/
|
||||
lazy-lock.json
|
||||
|
@ -3,4 +3,4 @@ line_endings = "Unix"
|
||||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
quote_style = "AutoPreferSingle"
|
||||
no_call_parentheses = true
|
||||
call_parentheses = "None"
|
||||
|
34
Dockerfile
34
Dockerfile
@ -1,34 +0,0 @@
|
||||
# Build neovim separately in the first stage
|
||||
FROM alpine:latest AS base
|
||||
|
||||
RUN apk --no-cache add \
|
||||
autoconf \
|
||||
automake \
|
||||
build-base \
|
||||
cmake \
|
||||
ninja \
|
||||
coreutils \
|
||||
curl \
|
||||
gettext-tiny-dev \
|
||||
git \
|
||||
libtool \
|
||||
pkgconf \
|
||||
unzip
|
||||
|
||||
# Build neovim (and use it as an example codebase
|
||||
RUN git clone https://github.com/neovim/neovim.git
|
||||
|
||||
ARG VERSION=master
|
||||
RUN cd neovim && git checkout ${VERSION} && make CMAKE_BUILD_TYPE=RelWithDebInfo install
|
||||
|
||||
# To support kickstart.nvim
|
||||
RUN apk --no-cache add \
|
||||
fd \
|
||||
ctags \
|
||||
ripgrep \
|
||||
git
|
||||
|
||||
# Copy the kickstart.nvim init.lua
|
||||
COPY ./init.lua /root/.config/nvim/init.lua
|
||||
|
||||
WORKDIR /neovim
|
240
README.md
240
README.md
@ -1,62 +1,228 @@
|
||||
### Introduction
|
||||
# kickstart.nvim
|
||||
|
||||
## Introduction
|
||||
|
||||
A starting point for Neovim that is:
|
||||
|
||||
* Small (~370 lines)
|
||||
* Small
|
||||
* Single-file
|
||||
* Documented
|
||||
* Modular
|
||||
* Completely Documented
|
||||
|
||||
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.
|
||||
**NOT** a Neovim distribution, but instead a starting point for your configuration.
|
||||
|
||||
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. This configuration serves as the reference configuration for the [lspconfig wiki](https://github.com/neovim/nvim-lspconfig/wiki).
|
||||
## Installation
|
||||
|
||||
### Installation
|
||||
### Install Neovim
|
||||
|
||||
* Backup your previous configuration
|
||||
* Copy and paste the kickstart.nvim `init.lua` into `$HOME/.config/nvim/init.lua`
|
||||
* Start Neovim (`nvim`) and run `:PackerInstall` - ignore any error message about missing plugins, `:PackerInstall` will fix that shortly
|
||||
* Restart Neovim
|
||||
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.
|
||||
|
||||
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).
|
||||
### Install External Dependencies
|
||||
|
||||
### Configuration
|
||||
External Requirements:
|
||||
- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`)
|
||||
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation)
|
||||
- A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons
|
||||
- if you have it set `vim.g.have_nerd_font` in `init.lua` to true
|
||||
- Language Setup:
|
||||
- If want to write Typescript, you need `npm`
|
||||
- If want to write Golang, you will need `go`
|
||||
- etc.
|
||||
|
||||
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.
|
||||
> **NOTE**
|
||||
> See [Install Recipes](#Install-Recipes) for additional Windows and Linux specific notes
|
||||
> and quick install snippets
|
||||
|
||||
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.
|
||||
### Install Kickstart
|
||||
|
||||
#### Example `plugins.lua`
|
||||
> **NOTE**
|
||||
> [Backup](#FAQ) your previous configuration (if any exists)
|
||||
|
||||
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.
|
||||
Neovim's configurations are located under the following paths, depending on your OS:
|
||||
|
||||
```lua
|
||||
return function(use)
|
||||
use({
|
||||
"folke/which-key.nvim",
|
||||
config = function()
|
||||
require("which-key").setup({})
|
||||
end
|
||||
})
|
||||
end
|
||||
| OS | PATH |
|
||||
| :- | :--- |
|
||||
| Linux, MacOS | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` |
|
||||
| Windows (cmd)| `%userprofile%\AppData\Local\nvim\` |
|
||||
| Windows (powershell)| `$env:USERPROFILE\AppData\Local\nvim\` |
|
||||
|
||||
#### Recommended Step
|
||||
|
||||
[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, then install by cloning the
|
||||
fork to your machine using one of the commands below, depending on your OS.
|
||||
|
||||
> **NOTE**
|
||||
> Your fork's url will be something like this:
|
||||
> `https://github.com/<your_github_username>/kickstart.nvim.git`
|
||||
|
||||
#### Clone kickstart.nvim
|
||||
> **NOTE**
|
||||
> If following the recommended step above (i.e., forking the repo), replace
|
||||
> `nvim-lua` with `<your_github_username>` in the commands below
|
||||
|
||||
<details><summary> Linux and Mac </summary>
|
||||
|
||||
```sh
|
||||
git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim
|
||||
```
|
||||
|
||||
#### Example `defaults.lua`
|
||||
</details>
|
||||
|
||||
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`).
|
||||
<details><summary> Windows </summary>
|
||||
|
||||
```lua
|
||||
vim.opt.relativenumber = true
|
||||
If you're using `cmd.exe`:
|
||||
|
||||
vim.keymap.set('n', '<leader>sr', require('telescope.builtin').resume, { desc = '[S]earch [R]esume' })
|
||||
```
|
||||
git clone https://github.com/nvim-lua/kickstart.nvim.git %userprofile%\AppData\Local\nvim\
|
||||
```
|
||||
|
||||
### Contribution
|
||||
If you're using `powershell.exe`
|
||||
|
||||
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:
|
||||
```
|
||||
git clone https://github.com/nvim-lua/kickstart.nvim.git $env:USERPROFILE\AppData\Local\nvim\
|
||||
```
|
||||
|
||||
* Custom language server configuration (null-ls templates)
|
||||
* Theming beyond a default colorscheme necessary for LSP highlight groups
|
||||
* Lazy-loading. Kickstart.nvim should start within 40 ms on modern hardware. Please profile and contribute to upstream plugins to optimize startup time instead.
|
||||
</details>
|
||||
|
||||
### Post Installation
|
||||
|
||||
Start Neovim
|
||||
|
||||
```sh
|
||||
nvim
|
||||
```
|
||||
|
||||
That's it! Lazy will install all the plugins you have. Use `:Lazy` to view
|
||||
current plugin status. Hit `q` to close the window.
|
||||
|
||||
Read through the `init.lua` file in your configuration folder for more
|
||||
information about extending and exploring Neovim. That also includes
|
||||
examples of adding popularly requested plugins.
|
||||
|
||||
|
||||
### Getting Started
|
||||
|
||||
[The Only Video You Need to Get Started with Neovim](https://youtu.be/m8C0Cq9Uv9o)
|
||||
|
||||
### FAQ
|
||||
|
||||
* What should I do if I already have a pre-existing neovim configuration?
|
||||
* You should back it up and then delete all associated files.
|
||||
* This includes your existing init.lua and the neovim files in `~/.local`
|
||||
which can be deleted with `rm -rf ~/.local/share/nvim/`
|
||||
* Can I keep my existing configuration in parallel to kickstart?
|
||||
* 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:
|
||||
```
|
||||
alias nvim-kickstart='NVIM_APPNAME="nvim-kickstart" nvim'
|
||||
```
|
||||
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.
|
||||
* What if I want to "uninstall" this configuration:
|
||||
* See [lazy.nvim uninstall](https://github.com/folke/lazy.nvim#-uninstalling) information
|
||||
* Why is the kickstart `init.lua` a single file? Wouldn't it make sense to split it into multiple files?
|
||||
* The main purpose of kickstart is to serve as a teaching tool and a reference
|
||||
configuration that someone can easily use to `git clone` as a basis for their own.
|
||||
As you progress in learning Neovim and Lua, you might consider splitting `init.lua`
|
||||
into smaller parts. A fork of kickstart that does this while maintaining the
|
||||
same functionality is available here:
|
||||
* [kickstart-modular.nvim](https://github.com/dam9000/kickstart-modular.nvim)
|
||||
* Discussions on this topic can be found here:
|
||||
* [Restructure the configuration](https://github.com/nvim-lua/kickstart.nvim/issues/218)
|
||||
* [Reorganize init.lua into a multi-file setup](https://github.com/nvim-lua/kickstart.nvim/pull/473)
|
||||
|
||||
### Install Recipes
|
||||
|
||||
Below you can find OS specific install instructions for Neovim and dependencies.
|
||||
|
||||
After installing all the dependencies continue with the [Install Kickstart](#Install-Kickstart) step.
|
||||
|
||||
#### Windows Installation
|
||||
|
||||
<details><summary>Windows with Microsoft C++ Build Tools and CMake</summary>
|
||||
Installation may require installing build tools and updating the run command for `telescope-fzf-native`
|
||||
|
||||
See `telescope-fzf-native` documentation for [more details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation)
|
||||
|
||||
This requires:
|
||||
|
||||
- Install CMake and the Microsoft C++ Build Tools on Windows
|
||||
|
||||
```lua
|
||||
{'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }
|
||||
```
|
||||
</details>
|
||||
<details><summary>Windows with gcc/make using chocolatey</summary>
|
||||
Alternatively, one can install gcc and make which don't require changing the config,
|
||||
the easiest way is to use choco:
|
||||
|
||||
1. install [chocolatey](https://chocolatey.org/install)
|
||||
either follow the instructions on the page or use winget,
|
||||
run in cmd as **admin**:
|
||||
```
|
||||
winget install --accept-source-agreements chocolatey.chocolatey
|
||||
```
|
||||
|
||||
2. install all requirements using choco, exit previous cmd and
|
||||
open a new one so that choco path is set, and run in cmd as **admin**:
|
||||
```
|
||||
choco install -y neovim git ripgrep wget fd unzip gzip mingw make
|
||||
```
|
||||
</details>
|
||||
<details><summary>WSL (Windows Subsystem for Linux)</summary>
|
||||
|
||||
```
|
||||
wsl --install
|
||||
wsl
|
||||
sudo add-apt-repository ppa:neovim-ppa/unstable -y
|
||||
sudo apt update
|
||||
sudo apt install make gcc ripgrep unzip neovim
|
||||
```
|
||||
</details>
|
||||
|
||||
#### Linux Install
|
||||
<details><summary>Ubuntu Install Steps</summary>
|
||||
|
||||
```
|
||||
sudo add-apt-repository ppa:neovim-ppa/unstable -y
|
||||
sudo apt update
|
||||
sudo apt install make gcc ripgrep unzip git neovim
|
||||
```
|
||||
</details>
|
||||
<details><summary>Debian Install Steps</summary>
|
||||
|
||||
```
|
||||
sudo apt update
|
||||
sudo apt install make gcc ripgrep unzip git curl
|
||||
|
||||
# Now we install nvim
|
||||
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz
|
||||
sudo rm -rf /opt/nvim-linux64
|
||||
sudo mkdir -p /opt/nvim-linux64
|
||||
sudo chmod a+rX /opt/nvim-linux64
|
||||
sudo tar -C /opt -xzf nvim-linux64.tar.gz
|
||||
|
||||
# make it available in /usr/local/bin, distro installs to /usr/bin
|
||||
sudo ln -sf /opt/nvim-linux64/bin/nvim /usr/local/bin/
|
||||
```
|
||||
</details>
|
||||
<details><summary>Fedora Install Steps</summary>
|
||||
|
||||
```
|
||||
sudo dnf install -y gcc make git ripgrep fd-find unzip neovim
|
||||
```
|
||||
</details>
|
||||
|
||||
<details><summary>Arch Install Steps</summary>
|
||||
|
||||
```
|
||||
sudo pacman -S --noconfirm --needed gcc make git ripgrep fd unzip neovim
|
||||
```
|
||||
</details>
|
||||
|
||||
Each PR, especially those which increase the line count, should have a description as to why the PR is necessary.
|
||||
|
24
doc/kickstart.txt
Normal file
24
doc/kickstart.txt
Normal file
@ -0,0 +1,24 @@
|
||||
================================================================================
|
||||
INTRODUCTION *kickstart.nvim*
|
||||
|
||||
Kickstart.nvim is a project to help you get started on your neovim journey.
|
||||
|
||||
*kickstart-is-not*
|
||||
It is not:
|
||||
- Complete framework for every plugin under the sun
|
||||
- Place to add every plugin that could ever be useful
|
||||
|
||||
*kickstart-is*
|
||||
It is:
|
||||
- Somewhere that has a good start for the most common "IDE" type features:
|
||||
- autocompletion
|
||||
- goto-definition
|
||||
- find references
|
||||
- fuzzy finding
|
||||
- and hinting at what more can be done :)
|
||||
- A place to _kickstart_ your journey.
|
||||
- You should fork this project and use/modify it so that it matches your
|
||||
style and preferences. If you don't want to do that, there are probably
|
||||
other projects that would fit much better for you (and that's great!)!
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
3
doc/tags
Normal file
3
doc/tags
Normal file
@ -0,0 +1,3 @@
|
||||
kickstart-is kickstart.txt /*kickstart-is*
|
||||
kickstart-is-not kickstart.txt /*kickstart-is-not*
|
||||
kickstart.nvim kickstart.txt /*kickstart.nvim*
|
5
lua/custom/plugins/init.lua
Normal file
5
lua/custom/plugins/init.lua
Normal file
@ -0,0 +1,5 @@
|
||||
-- You can add your own plugins here or in other files in this directory!
|
||||
-- I promise not to create any merge conflicts in this directory :)
|
||||
--
|
||||
-- See the kickstart.nvim README for more information
|
||||
return {}
|
52
lua/kickstart/health.lua
Normal file
52
lua/kickstart/health.lua
Normal file
@ -0,0 +1,52 @@
|
||||
--[[
|
||||
--
|
||||
-- This file is not required for your own configuration,
|
||||
-- but helps people determine if their system is setup correctly.
|
||||
--
|
||||
--]]
|
||||
|
||||
local check_version = function()
|
||||
local verstr = string.format('%s.%s.%s', vim.version().major, vim.version().minor, vim.version().patch)
|
||||
if not vim.version.cmp then
|
||||
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
|
||||
return
|
||||
end
|
||||
|
||||
if vim.version.cmp(vim.version(), { 0, 9, 4 }) >= 0 then
|
||||
vim.health.ok(string.format("Neovim version is: '%s'", verstr))
|
||||
else
|
||||
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
|
||||
end
|
||||
end
|
||||
|
||||
local check_external_reqs = function()
|
||||
-- Basic utils: `git`, `make`, `unzip`
|
||||
for _, exe in ipairs { 'git', 'make', 'unzip', 'rg' } do
|
||||
local is_executable = vim.fn.executable(exe) == 1
|
||||
if is_executable then
|
||||
vim.health.ok(string.format("Found executable: '%s'", exe))
|
||||
else
|
||||
vim.health.warn(string.format("Could not find executable: '%s'", exe))
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
return {
|
||||
check = function()
|
||||
vim.health.start 'kickstart.nvim'
|
||||
|
||||
vim.health.info [[NOTE: Not every warning is a 'must-fix' in `:checkhealth`
|
||||
|
||||
Fix only warnings for plugins and languages you intend to use.
|
||||
Mason will give warnings for languages that are not installed.
|
||||
You do not need to install, unless you want to use those languages!]]
|
||||
|
||||
local uv = vim.uv or vim.loop
|
||||
vim.health.info('System Information: ' .. vim.inspect(uv.os_uname()))
|
||||
|
||||
check_version()
|
||||
check_external_reqs()
|
||||
end,
|
||||
}
|
16
lua/kickstart/plugins/autopairs.lua
Normal file
16
lua/kickstart/plugins/autopairs.lua
Normal file
@ -0,0 +1,16 @@
|
||||
-- autopairs
|
||||
-- https://github.com/windwp/nvim-autopairs
|
||||
|
||||
return {
|
||||
'windwp/nvim-autopairs',
|
||||
event = 'InsertEnter',
|
||||
-- Optional dependency
|
||||
dependencies = { 'hrsh7th/nvim-cmp' },
|
||||
config = function()
|
||||
require('nvim-autopairs').setup {}
|
||||
-- If you want to automatically add `(` after selecting a function or method
|
||||
local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
|
||||
local cmp = require 'cmp'
|
||||
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
|
||||
end,
|
||||
}
|
90
lua/kickstart/plugins/debug.lua
Normal file
90
lua/kickstart/plugins/debug.lua
Normal file
@ -0,0 +1,90 @@
|
||||
-- debug.lua
|
||||
--
|
||||
-- Shows how to use the DAP plugin to debug your code.
|
||||
--
|
||||
-- Primarily focused on configuring the debugger for Go, but can
|
||||
-- be extended to other languages as well. That's why it's called
|
||||
-- kickstart.nvim and not kitchen-sink.nvim ;)
|
||||
|
||||
return {
|
||||
-- NOTE: Yes, you can install new plugins here!
|
||||
'mfussenegger/nvim-dap',
|
||||
-- NOTE: And you can specify dependencies as well
|
||||
dependencies = {
|
||||
-- Creates a beautiful debugger UI
|
||||
'rcarriga/nvim-dap-ui',
|
||||
|
||||
-- Required dependency for nvim-dap-ui
|
||||
'nvim-neotest/nvim-nio',
|
||||
|
||||
-- Installs the debug adapters for you
|
||||
'williamboman/mason.nvim',
|
||||
'jay-babu/mason-nvim-dap.nvim',
|
||||
|
||||
-- Add your own debuggers here
|
||||
'leoluz/nvim-dap-go',
|
||||
},
|
||||
config = function()
|
||||
local dap = require 'dap'
|
||||
local dapui = require 'dapui'
|
||||
|
||||
require('mason-nvim-dap').setup {
|
||||
-- Makes a best effort to setup the various debuggers with
|
||||
-- reasonable debug configurations
|
||||
automatic_setup = true,
|
||||
|
||||
-- You can provide additional configuration to the handlers,
|
||||
-- see mason-nvim-dap README for more information
|
||||
handlers = {},
|
||||
|
||||
-- You'll need to check that you have the required things installed
|
||||
-- online, please don't ask me how to install them :)
|
||||
ensure_installed = {
|
||||
-- Update this to ensure that you have the debuggers for the langs you want
|
||||
'delve',
|
||||
},
|
||||
}
|
||||
|
||||
-- Basic debugging keymaps, feel free to change to your liking!
|
||||
vim.keymap.set('n', '<F5>', dap.continue, { desc = 'Debug: Start/Continue' })
|
||||
vim.keymap.set('n', '<F1>', dap.step_into, { desc = 'Debug: Step Into' })
|
||||
vim.keymap.set('n', '<F2>', dap.step_over, { desc = 'Debug: Step Over' })
|
||||
vim.keymap.set('n', '<F3>', dap.step_out, { desc = 'Debug: Step Out' })
|
||||
vim.keymap.set('n', '<leader>b', dap.toggle_breakpoint, { desc = 'Debug: Toggle Breakpoint' })
|
||||
vim.keymap.set('n', '<leader>B', function()
|
||||
dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ')
|
||||
end, { desc = 'Debug: Set Breakpoint' })
|
||||
|
||||
-- Dap UI setup
|
||||
-- For more information, see |:help nvim-dap-ui|
|
||||
dapui.setup {
|
||||
-- Set icons to characters that are more likely to work in every terminal.
|
||||
-- Feel free to remove or use ones that you like more! :)
|
||||
-- Don't feel like these are good choices.
|
||||
icons = { expanded = '▾', collapsed = '▸', current_frame = '*' },
|
||||
controls = {
|
||||
icons = {
|
||||
pause = '⏸',
|
||||
play = '▶',
|
||||
step_into = '⏎',
|
||||
step_over = '⏭',
|
||||
step_out = '⏮',
|
||||
step_back = 'b',
|
||||
run_last = '▶▶',
|
||||
terminate = '⏹',
|
||||
disconnect = '⏏',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
|
||||
vim.keymap.set('n', '<F7>', dapui.toggle, { desc = 'Debug: See last session result.' })
|
||||
|
||||
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
|
||||
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
|
||||
dap.listeners.before.event_exited['dapui_config'] = dapui.close
|
||||
|
||||
-- Install golang specific config
|
||||
require('dap-go').setup()
|
||||
end,
|
||||
}
|
61
lua/kickstart/plugins/gitsigns.lua
Normal file
61
lua/kickstart/plugins/gitsigns.lua
Normal file
@ -0,0 +1,61 @@
|
||||
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||
-- NOTE: gitsigns is already included in init.lua but contains only the base
|
||||
-- config. This will add also the recommended keymaps.
|
||||
|
||||
return {
|
||||
{
|
||||
'lewis6991/gitsigns.nvim',
|
||||
opts = {
|
||||
on_attach = function(bufnr)
|
||||
local gitsigns = require 'gitsigns'
|
||||
|
||||
local function map(mode, l, r, opts)
|
||||
opts = opts or {}
|
||||
opts.buffer = bufnr
|
||||
vim.keymap.set(mode, l, r, opts)
|
||||
end
|
||||
|
||||
-- Navigation
|
||||
map('n', ']c', function()
|
||||
if vim.wo.diff then
|
||||
vim.cmd.normal { ']c', bang = true }
|
||||
else
|
||||
gitsigns.nav_hunk 'next'
|
||||
end
|
||||
end, { desc = 'Jump to next git [c]hange' })
|
||||
|
||||
map('n', '[c', function()
|
||||
if vim.wo.diff then
|
||||
vim.cmd.normal { '[c', bang = true }
|
||||
else
|
||||
gitsigns.nav_hunk 'prev'
|
||||
end
|
||||
end, { desc = 'Jump to previous git [c]hange' })
|
||||
|
||||
-- Actions
|
||||
-- visual mode
|
||||
map('v', '<leader>hs', function()
|
||||
gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v' }
|
||||
end, { desc = 'stage git hunk' })
|
||||
map('v', '<leader>hr', function()
|
||||
gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v' }
|
||||
end, { desc = 'reset git hunk' })
|
||||
-- normal mode
|
||||
map('n', '<leader>hs', gitsigns.stage_hunk, { desc = 'git [s]tage hunk' })
|
||||
map('n', '<leader>hr', gitsigns.reset_hunk, { desc = 'git [r]eset hunk' })
|
||||
map('n', '<leader>hS', gitsigns.stage_buffer, { desc = 'git [S]tage buffer' })
|
||||
map('n', '<leader>hu', gitsigns.undo_stage_hunk, { desc = 'git [u]ndo stage hunk' })
|
||||
map('n', '<leader>hR', gitsigns.reset_buffer, { desc = 'git [R]eset buffer' })
|
||||
map('n', '<leader>hp', gitsigns.preview_hunk, { desc = 'git [p]review hunk' })
|
||||
map('n', '<leader>hb', gitsigns.blame_line, { desc = 'git [b]lame line' })
|
||||
map('n', '<leader>hd', gitsigns.diffthis, { desc = 'git [d]iff against index' })
|
||||
map('n', '<leader>hD', function()
|
||||
gitsigns.diffthis '@'
|
||||
end, { desc = 'git [D]iff against last commit' })
|
||||
-- Toggles
|
||||
map('n', '<leader>tb', gitsigns.toggle_current_line_blame, { desc = '[T]oggle git show [b]lame line' })
|
||||
map('n', '<leader>tD', gitsigns.toggle_deleted, { desc = '[T]oggle git show [D]eleted' })
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
9
lua/kickstart/plugins/indent_line.lua
Normal file
9
lua/kickstart/plugins/indent_line.lua
Normal file
@ -0,0 +1,9 @@
|
||||
return {
|
||||
{ -- Add indentation guides even on blank lines
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
-- Enable `lukas-reineke/indent-blankline.nvim`
|
||||
-- See `:help ibl`
|
||||
main = 'ibl',
|
||||
opts = {},
|
||||
},
|
||||
}
|
55
lua/kickstart/plugins/lint.lua
Normal file
55
lua/kickstart/plugins/lint.lua
Normal file
@ -0,0 +1,55 @@
|
||||
return {
|
||||
|
||||
{ -- Linting
|
||||
'mfussenegger/nvim-lint',
|
||||
event = { 'BufReadPre', 'BufNewFile' },
|
||||
config = function()
|
||||
local lint = require 'lint'
|
||||
lint.linters_by_ft = {
|
||||
markdown = { 'markdownlint' },
|
||||
}
|
||||
|
||||
-- To allow other plugins to add linters to require('lint').linters_by_ft,
|
||||
-- instead set linters_by_ft like this:
|
||||
-- lint.linters_by_ft = lint.linters_by_ft or {}
|
||||
-- lint.linters_by_ft['markdown'] = { 'markdownlint' }
|
||||
--
|
||||
-- However, note that this will enable a set of default linters,
|
||||
-- which will cause errors unless these tools are available:
|
||||
-- {
|
||||
-- clojure = { "clj-kondo" },
|
||||
-- dockerfile = { "hadolint" },
|
||||
-- inko = { "inko" },
|
||||
-- janet = { "janet" },
|
||||
-- json = { "jsonlint" },
|
||||
-- markdown = { "vale" },
|
||||
-- rst = { "vale" },
|
||||
-- ruby = { "ruby" },
|
||||
-- terraform = { "tflint" },
|
||||
-- text = { "vale" }
|
||||
-- }
|
||||
--
|
||||
-- You can disable the default linters by setting their filetypes to nil:
|
||||
-- lint.linters_by_ft['clojure'] = nil
|
||||
-- lint.linters_by_ft['dockerfile'] = nil
|
||||
-- lint.linters_by_ft['inko'] = nil
|
||||
-- lint.linters_by_ft['janet'] = nil
|
||||
-- lint.linters_by_ft['json'] = nil
|
||||
-- lint.linters_by_ft['markdown'] = nil
|
||||
-- lint.linters_by_ft['rst'] = nil
|
||||
-- lint.linters_by_ft['ruby'] = nil
|
||||
-- lint.linters_by_ft['terraform'] = nil
|
||||
-- lint.linters_by_ft['text'] = nil
|
||||
|
||||
-- Create autocommand which carries out the actual linting
|
||||
-- on the specified events.
|
||||
local lint_augroup = vim.api.nvim_create_augroup('lint', { clear = true })
|
||||
vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, {
|
||||
group = lint_augroup,
|
||||
callback = function()
|
||||
require('lint').try_lint()
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
25
lua/kickstart/plugins/neo-tree.lua
Normal file
25
lua/kickstart/plugins/neo-tree.lua
Normal file
@ -0,0 +1,25 @@
|
||||
-- Neo-tree is a Neovim plugin to browse the file system
|
||||
-- https://github.com/nvim-neo-tree/neo-tree.nvim
|
||||
|
||||
return {
|
||||
'nvim-neo-tree/neo-tree.nvim',
|
||||
version = '*',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
|
||||
'MunifTanjim/nui.nvim',
|
||||
},
|
||||
cmd = 'Neotree',
|
||||
keys = {
|
||||
{ '\\', ':Neotree reveal<CR>', { desc = 'NeoTree reveal' } },
|
||||
},
|
||||
opts = {
|
||||
filesystem = {
|
||||
window = {
|
||||
mappings = {
|
||||
['\\'] = 'close_window',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
Loading…
Reference in New Issue
Block a user