This commit is contained in:
RiverMatsumoto 2024-03-03 23:43:38 -10:00
commit bac97ff171
11 changed files with 2303 additions and 1254 deletions

14
.gitignore vendored
View File

@ -1,7 +1,7 @@
tags tags
test.sh test.sh
.luarc.json .luarc.json
nvim nvim
spell/ spell/
lazy-lock.json lazy-lock.json

View File

@ -1,6 +1,6 @@
column_width = 160 column_width = 160
line_endings = "Unix" line_endings = "Unix"
indent_type = "Spaces" indent_type = "Spaces"
indent_width = 2 indent_width = 2
quote_style = "AutoPreferSingle" quote_style = "AutoPreferSingle"
call_parentheses = "None" call_parentheses = "None"

View File

@ -1,19 +1,19 @@
MIT License MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software. copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.

660
README.md
View File

@ -1,218 +1,442 @@
# kickstart.nvim <<<<<<< HEAD
# kickstart.nvim
## Introduction
## Introduction
A starting point for Neovim that is:
A starting point for Neovim that is:
* Small
* Single-file * Small
* Completely Documented * Single-file
* Completely Documented
**NOT** a Neovim distribution, but instead a starting point for your configuration.
**NOT** a Neovim distribution, but instead a starting point for your configuration.
## Installation
## Installation
### Install Neovim
### Install Neovim
Kickstart.nvim targets *only* the latest
['stable'](https://github.com/neovim/neovim/releases/tag/stable) and latest Kickstart.nvim targets *only* the latest
['nightly'](https://github.com/neovim/neovim/releases/tag/nightly) of Neovim. ['stable'](https://github.com/neovim/neovim/releases/tag/stable) and latest
If you are experiencing issues, please make sure you have the latest versions. ['nightly'](https://github.com/neovim/neovim/releases/tag/nightly) of Neovim.
If you are experiencing issues, please make sure you have the latest versions.
### Install External Dependencies
### Install External Dependencies
> **NOTE**
> [Backup](#FAQ) your previous configuration (if any exists) > **NOTE**
> [Backup](#FAQ) your previous configuration (if any exists)
External Requirements:
- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`) External Requirements:
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation) - Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`)
- Language Setup: - [ripgrep](https://github.com/BurntSushi/ripgrep#installation)
- If want to write Typescript, you need `npm` - Language Setup:
- If want to write Golang, you will need `go` - If want to write Typescript, you need `npm`
- etc. - If want to write Golang, you will need `go`
- etc.
> **NOTE**
> See [Windows Installation](#Windows-Installation) to double check any additional Windows notes > **NOTE**
> See [Windows Installation](#Windows-Installation) to double check any additional Windows notes
Neovim's configurations are located under the following paths, depending on your OS:
Neovim's configurations are located under the following paths, depending on your OS:
| OS | PATH |
| :- | :--- | | OS | PATH |
| Linux, MacOS | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` | | :- | :--- |
| Windows (cmd)| `%userprofile%\AppData\Local\nvim\` | | Linux, MacOS | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` |
| Windows (powershell)| `$env:USERPROFILE\AppData\Local\nvim\` | | Windows (cmd)| `%userprofile%\AppData\Local\nvim\` |
| Windows (powershell)| `$env:USERPROFILE\AppData\Local\nvim\` |
### Install Kickstart
### Install Kickstart
Clone kickstart.nvim:
Clone kickstart.nvim:
<details><summary> Linux and Mac </summary>
<details><summary> Linux and Mac </summary>
```sh
git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim ```sh
``` git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim
```
</details>
</details>
<details><summary> Windows </summary>
<details><summary> Windows </summary>
If you're using `cmd.exe`:
If you're using `cmd.exe`:
```
git clone https://github.com/nvim-lua/kickstart.nvim.git %userprofile%\AppData\Local\nvim\ ```
``` git clone https://github.com/nvim-lua/kickstart.nvim.git %userprofile%\AppData\Local\nvim\
```
If you're using `powershell.exe`
If you're using `powershell.exe`
```
git clone https://github.com/nvim-lua/kickstart.nvim.git $env:USERPROFILE\AppData\Local\nvim\ ```
``` git clone https://github.com/nvim-lua/kickstart.nvim.git $env:USERPROFILE\AppData\Local\nvim\
```
</details>
</details>
### Post Installation
### Post Installation
Start Neovim
Start Neovim
```sh
nvim ```sh
``` nvim
```
That's it! Lazy will install all the plugins you have. Use `:Lazy` to view
current plugin status. That's it! Lazy will install all the plugins you have. Use `:Lazy` to view
current plugin status.
Read through the `init.lua` file in your configuration folder for more
information about extending and exploring Neovim. Read through the `init.lua` file in your configuration folder for more
information about extending and exploring Neovim.
### Getting Started
### Getting Started
See [Effective Neovim: Instant IDE](https://youtu.be/stqUbv-5u2s), covering the
previous version. Note: The install via init.lua is outdated, please follow the See [Effective Neovim: Instant IDE](https://youtu.be/stqUbv-5u2s), covering the
install instructions in this file instead. An updated video is coming soon. previous version. Note: The install via init.lua is outdated, please follow the
install instructions in this file instead. An updated video is coming soon.
### Recommended Steps
### Recommended Steps
[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 [Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) this repo
can install to your machine using the methods above. (so that you have your own copy that you can modify) and then installing you
can install to your machine using the methods above.
> **NOTE**
> Your fork's url will be something like this: `https://github.com/<your_github_username>/kickstart.nvim.git` > **NOTE**
> Your fork's url will be something like this: `https://github.com/<your_github_username>/kickstart.nvim.git`
#### Examples of adding popularly requested plugins
#### Examples of adding popularly requested plugins
NOTE: You'll need to uncomment the line in the init.lua that turns on loading custom plugins.
NOTE: You'll need to uncomment the line in the init.lua that turns on loading custom plugins.
<details>
<summary>Adding autopairs</summary> <details>
<summary>Adding autopairs</summary>
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).
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).
In the file: `lua/custom/plugins/autopairs.lua`, add:
In the file: `lua/custom/plugins/autopairs.lua`, add:
```lua
-- File: lua/custom/plugins/autopairs.lua ```lua
-- File: lua/custom/plugins/autopairs.lua
return {
"windwp/nvim-autopairs", return {
-- Optional dependency "windwp/nvim-autopairs",
dependencies = { 'hrsh7th/nvim-cmp' }, -- Optional dependency
config = function() dependencies = { 'hrsh7th/nvim-cmp' },
require("nvim-autopairs").setup {} config = function()
-- If you want to automatically add `(` after selecting a function or method require("nvim-autopairs").setup {}
local cmp_autopairs = require('nvim-autopairs.completion.cmp') -- If you want to automatically add `(` after selecting a function or method
local cmp = require('cmp') local cmp_autopairs = require('nvim-autopairs.completion.cmp')
cmp.event:on( local cmp = require('cmp')
'confirm_done', cmp.event:on(
cmp_autopairs.on_confirm_done() 'confirm_done',
) cmp_autopairs.on_confirm_done()
end, )
} end,
``` }
```
</details>
<details> </details>
<summary>Adding a file tree plugin</summary> <details>
<summary>Adding a file tree plugin</summary>
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.
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.
In the file: `lua/custom/plugins/filetree.lua`, add:
In the file: `lua/custom/plugins/filetree.lua`, add:
```lua
-- Unless you are still migrating, remove the deprecated commands from v1.x ```lua
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]]) -- Unless you are still migrating, remove the deprecated commands from v1.x
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
return {
"nvim-neo-tree/neo-tree.nvim", return {
version = "*", "nvim-neo-tree/neo-tree.nvim",
dependencies = { version = "*",
"nvim-lua/plenary.nvim", dependencies = {
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended "nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim", "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
}, "MunifTanjim/nui.nvim",
config = function () },
require('neo-tree').setup {} config = function ()
end, require('neo-tree').setup {}
} end,
``` }
```
</details>
</details>
### FAQ
### FAQ
* What should I do if I already have a pre-existing neovim configuration?
* You should back it up, then delete all files associated with it. * What should I do if I already have a pre-existing neovim configuration?
* This includes your existing init.lua and the neovim files in `~/.local` which can be deleted with `rm -rf ~/.local/share/nvim/` * You should back it up, then delete all files associated with it.
* Can I keep my existing configuration in parallel to kickstart? * This includes your existing init.lua and the neovim files in `~/.local` which can be deleted with `rm -rf ~/.local/share/nvim/`
* 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: * 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' ```
``` 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: 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.
* See [lazy.nvim uninstall](https://github.com/folke/lazy.nvim#-uninstalling) information * What if I want to "uninstall" this configuration:
* Why is the kickstart `init.lua` a single file? Wouldn't it make sense to split it into multiple files? * See [lazy.nvim uninstall](https://github.com/folke/lazy.nvim#-uninstalling) information
* The main purpose of kickstart is to serve as a teaching tool and a reference * Why is the kickstart `init.lua` a single file? Wouldn't it make sense to split it into multiple files?
configuration that someone can easily `git clone` as a basis for their own. * The main purpose of kickstart is to serve as a teaching tool and a reference
As you progress in learning Neovim and Lua, you might consider splitting `init.lua` configuration that someone can easily `git clone` as a basis for their own.
into smaller parts. A fork of kickstart that does this while maintaining the exact As you progress in learning Neovim and Lua, you might consider splitting `init.lua`
same functionality is available here: into smaller parts. A fork of kickstart that does this while maintaining the exact
* [kickstart-modular.nvim](https://github.com/dam9000/kickstart-modular.nvim) same functionality is available here:
* Discussions on this topic can be found here: * [kickstart-modular.nvim](https://github.com/dam9000/kickstart-modular.nvim)
* [Restructure the configuration](https://github.com/nvim-lua/kickstart.nvim/issues/218) * Discussions on this topic can be found here:
* [Reorganize init.lua into a multi-file setup](https://github.com/nvim-lua/kickstart.nvim/pull/473) * [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)
### Windows Installation
### Windows Installation
Installation may require installing build tools, and updating the run command for `telescope-fzf-native`
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)
See `telescope-fzf-native` documentation for [more details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation)
This requires:
This requires:
- Install CMake, and the Microsoft C++ Build Tools on Windows
- 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' } ```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' }
```
Alternatively one can install gcc and make which don't require changing the config,
the easiest way is to use choco: 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, 1. install [chocolatey](https://chocolatey.org/install)
run in cmd as **admin**: either follow the instructions on the page or use winget,
``` run in cmd as **admin**:
winget install --accept-source-agreements chocolatey.chocolatey ```
``` 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, run in cmd as **admin**: 2. install all requirements using choco, exit previous cmd and
``` open a new one so that choco path is set, run in cmd as **admin**:
choco install -y neovim git ripgrep wget fd unzip gzip mingw make ```
``` choco install -y neovim git ripgrep wget fd unzip gzip mingw make
```
Then continue with the [Install Kickstart](#Install-Kickstart) step.
Then continue with the [Install Kickstart](#Install-Kickstart) step.
=======
# kickstart.nvim
# install:
`https://github.com/RiverMatsumoto/kickstart.nvim.git`
## Introduction
A starting point for Neovim that is:
* Small
* Single-file
* Completely Documented
**NOT** a Neovim distribution, but instead a starting point for your configuration.
## Installation
### Install 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.
### Install External Dependencies
> **NOTE**
> [Backup](#FAQ) your previous configuration (if any exists)
External Requirements:
- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`)
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation)
- Language Setup:
- If want to write Typescript, you need `npm`
- If want to write Golang, you will need `go`
- etc.
> **NOTE**
> See [Windows Installation](#Windows-Installation) to double check any additional Windows notes
Neovim's configurations are located under the following paths, depending on your OS:
| OS | PATH |
| :- | :--- |
| Linux, MacOS | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` |
| Windows (cmd)| `%userprofile%\AppData\Local\nvim\` |
| Windows (powershell)| `$env:USERPROFILE\AppData\Local\nvim\` |
### Install Kickstart
Clone kickstart.nvim:
<details><summary> Linux and Mac </summary>
```sh
git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim
```
</details>
<details><summary> Windows </summary>
If you're using `cmd.exe`:
```
git clone https://github.com/nvim-lua/kickstart.nvim.git %userprofile%\AppData\Local\nvim\
```
If you're using `powershell.exe`
```
git clone https://github.com/nvim-lua/kickstart.nvim.git $env:USERPROFILE\AppData\Local\nvim\
```
</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.
Read through the `init.lua` file in your configuration folder for more
information about extending and exploring Neovim.
### Getting Started
See [Effective Neovim: Instant IDE](https://youtu.be/stqUbv-5u2s), covering the
previous version. Note: The install via init.lua is outdated, please follow the
install instructions in this file instead. An updated video is coming soon.
### Recommended Steps
[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.
> **NOTE**
> Your fork's url will be something like this: `https://github.com/<your_github_username>/kickstart.nvim.git`
#### Examples of adding popularly requested plugins
NOTE: You'll need to uncomment the line in the init.lua that turns on loading custom plugins.
<details>
<summary>Adding autopairs</summary>
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).
In the file: `lua/custom/plugins/autopairs.lua`, add:
```lua
-- File: lua/custom/plugins/autopairs.lua
return {
"windwp/nvim-autopairs",
-- 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,
}
```
</details>
<details>
<summary>Adding a file tree plugin</summary>
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.
In the file: `lua/custom/plugins/filetree.lua`, add:
```lua
-- Unless you are still migrating, remove the deprecated commands from v1.x
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
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",
},
config = function ()
require('neo-tree').setup {}
end,
}
```
</details>
### FAQ
* What should I do if I already have a pre-existing neovim configuration?
* You should back it up, then delete all files associated with it.
* 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 `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 exact
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)
### Windows Installation
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' }
```
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, run in cmd as **admin**:
```
choco install -y neovim git ripgrep wget fd unzip gzip mingw make
```
Then continue with the [Install Kickstart](#Install-Kickstart) step.
>>>>>>> afed39f595301147188dac2c5453bce8515d5325

View File

@ -1,24 +1,24 @@
================================================================================ ================================================================================
INTRODUCTION *kickstart.nvim* INTRODUCTION *kickstart.nvim*
Kickstart.nvim is a project to help you get started on your neovim journey. Kickstart.nvim is a project to help you get started on your neovim journey.
*kickstart-is-not* *kickstart-is-not*
It is not: It is not:
- Complete framework for every plugin under the sun - Complete framework for every plugin under the sun
- Place to add every plugin that could ever be useful - Place to add every plugin that could ever be useful
*kickstart-is* *kickstart-is*
It is: It is:
- Somewhere that has a good start for the most common "IDE" type features: - Somewhere that has a good start for the most common "IDE" type features:
- autocompletion - autocompletion
- goto-definition - goto-definition
- find references - find references
- fuzzy finding - fuzzy finding
- and hinting at what more can be done :) - and hinting at what more can be done :)
- A place to _kickstart_ your journey. - A place to _kickstart_ your journey.
- You should fork this project and use/modify it so that it matches your - 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 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!)! other projects that would fit much better for you (and that's great!)!
vim:tw=78:ts=8:ft=help:norl: vim:tw=78:ts=8:ft=help:norl:

View File

@ -1,3 +1,3 @@
kickstart-is kickstart.txt /*kickstart-is* kickstart-is kickstart.txt /*kickstart-is*
kickstart-is-not kickstart.txt /*kickstart-is-not* kickstart-is-not kickstart.txt /*kickstart-is-not*
kickstart.nvim kickstart.txt /*kickstart.nvim* kickstart.nvim kickstart.txt /*kickstart.nvim*

2473
init.lua

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
-- You can add your own plugins here or in other files in this directory! -- 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 :) -- I promise not to create any merge conflicts in this directory :)
-- --
-- See the kickstart.nvim README for more information -- See the kickstart.nvim README for more information
return {} return {}

View File

@ -1,52 +1,52 @@
--[[ --[[
-- --
-- This file is not required for your own configuration, -- This file is not required for your own configuration,
-- but helps people determine if their system is setup correctly. -- but helps people determine if their system is setup correctly.
-- --
--]] --]]
local check_version = function() local check_version = function()
local verstr = string.format('%s.%s.%s', vim.version().major, vim.version().minor, vim.version().patch) local verstr = string.format('%s.%s.%s', vim.version().major, vim.version().minor, vim.version().patch)
if not vim.version.cmp then if not vim.version.cmp then
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr)) vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
return return
end end
if vim.version.cmp(vim.version(), { 0, 9, 4 }) >= 0 then if vim.version.cmp(vim.version(), { 0, 9, 4 }) >= 0 then
vim.health.ok(string.format("Neovim version is: '%s'", verstr)) vim.health.ok(string.format("Neovim version is: '%s'", verstr))
else else
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr)) vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
end end
end end
local check_external_reqs = function() local check_external_reqs = function()
-- Basic utils: `git`, `make`, `unzip` -- Basic utils: `git`, `make`, `unzip`
for _, exe in ipairs { 'git', 'make', 'unzip', 'rg' } do for _, exe in ipairs { 'git', 'make', 'unzip', 'rg' } do
local is_executable = vim.fn.executable(exe) == 1 local is_executable = vim.fn.executable(exe) == 1
if is_executable then if is_executable then
vim.health.ok(string.format("Found executable: '%s'", exe)) vim.health.ok(string.format("Found executable: '%s'", exe))
else else
vim.health.warn(string.format("Could not find executable: '%s'", exe)) vim.health.warn(string.format("Could not find executable: '%s'", exe))
end end
end end
return true return true
end end
return { return {
check = function() check = function()
vim.health.start 'kickstart.nvim' vim.health.start 'kickstart.nvim'
vim.health.info [[NOTE: Not every warning is a 'must-fix' in `:checkhealth` vim.health.info [[NOTE: Not every warning is a 'must-fix' in `:checkhealth`
Fix only warnings for plugins and languages you intend to use. Fix only warnings for plugins and languages you intend to use.
Mason will give warnings for languages that are not installed. Mason will give warnings for languages that are not installed.
You do not need to install, unless you want to use those languages!]] You do not need to install, unless you want to use those languages!]]
local uv = vim.uv or vim.loop local uv = vim.uv or vim.loop
vim.health.info('System Information: ' .. vim.inspect(uv.os_uname())) vim.health.info('System Information: ' .. vim.inspect(uv.os_uname()))
check_version() check_version()
check_external_reqs() check_external_reqs()
end, end,
} }

View File

@ -1,87 +1,87 @@
-- debug.lua -- debug.lua
-- --
-- Shows how to use the DAP plugin to debug your code. -- Shows how to use the DAP plugin to debug your code.
-- --
-- Primarily focused on configuring the debugger for Go, but can -- Primarily focused on configuring the debugger for Go, but can
-- be extended to other languages as well. That's why it's called -- be extended to other languages as well. That's why it's called
-- kickstart.nvim and not kitchen-sink.nvim ;) -- kickstart.nvim and not kitchen-sink.nvim ;)
return { return {
-- NOTE: Yes, you can install new plugins here! -- NOTE: Yes, you can install new plugins here!
'mfussenegger/nvim-dap', 'mfussenegger/nvim-dap',
-- NOTE: And you can specify dependencies as well -- NOTE: And you can specify dependencies as well
dependencies = { dependencies = {
-- Creates a beautiful debugger UI -- Creates a beautiful debugger UI
'rcarriga/nvim-dap-ui', 'rcarriga/nvim-dap-ui',
-- Installs the debug adapters for you -- Installs the debug adapters for you
'williamboman/mason.nvim', 'williamboman/mason.nvim',
'jay-babu/mason-nvim-dap.nvim', 'jay-babu/mason-nvim-dap.nvim',
-- Add your own debuggers here -- Add your own debuggers here
'leoluz/nvim-dap-go', 'leoluz/nvim-dap-go',
}, },
config = function() config = function()
local dap = require 'dap' local dap = require 'dap'
local dapui = require 'dapui' local dapui = require 'dapui'
require('mason-nvim-dap').setup { require('mason-nvim-dap').setup {
-- Makes a best effort to setup the various debuggers with -- Makes a best effort to setup the various debuggers with
-- reasonable debug configurations -- reasonable debug configurations
automatic_setup = true, automatic_setup = true,
-- You can provide additional configuration to the handlers, -- You can provide additional configuration to the handlers,
-- see mason-nvim-dap README for more information -- see mason-nvim-dap README for more information
handlers = {}, handlers = {},
-- You'll need to check that you have the required things installed -- You'll need to check that you have the required things installed
-- online, please don't ask me how to install them :) -- online, please don't ask me how to install them :)
ensure_installed = { ensure_installed = {
-- Update this to ensure that you have the debuggers for the langs you want -- Update this to ensure that you have the debuggers for the langs you want
'delve', 'delve',
}, },
} }
-- Basic debugging keymaps, feel free to change to your liking! -- 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', '<F5>', dap.continue, { desc = 'Debug: Start/Continue' })
vim.keymap.set('n', '<F1>', dap.step_into, { desc = 'Debug: Step Into' }) 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', '<F2>', dap.step_over, { desc = 'Debug: Step Over' })
vim.keymap.set('n', '<F3>', dap.step_out, { desc = 'Debug: Step Out' }) 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', dap.toggle_breakpoint, { desc = 'Debug: Toggle Breakpoint' })
vim.keymap.set('n', '<leader>B', function() vim.keymap.set('n', '<leader>B', function()
dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ') dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ')
end, { desc = 'Debug: Set Breakpoint' }) end, { desc = 'Debug: Set Breakpoint' })
-- Dap UI setup -- Dap UI setup
-- For more information, see |:help nvim-dap-ui| -- For more information, see |:help nvim-dap-ui|
dapui.setup { dapui.setup {
-- Set icons to characters that are more likely to work in every terminal. -- Set icons to characters that are more likely to work in every terminal.
-- Feel free to remove or use ones that you like more! :) -- Feel free to remove or use ones that you like more! :)
-- Don't feel like these are good choices. -- Don't feel like these are good choices.
icons = { expanded = '', collapsed = '', current_frame = '*' }, icons = { expanded = '', collapsed = '', current_frame = '*' },
controls = { controls = {
icons = { icons = {
pause = '', pause = '',
play = '', play = '',
step_into = '', step_into = '',
step_over = '', step_over = '',
step_out = '', step_out = '',
step_back = 'b', step_back = 'b',
run_last = '▶▶', run_last = '▶▶',
terminate = '', terminate = '',
disconnect = '', disconnect = '',
}, },
}, },
} }
-- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception. -- 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.' }) vim.keymap.set('n', '<F7>', dapui.toggle, { desc = 'Debug: See last session result.' })
dap.listeners.after.event_initialized['dapui_config'] = dapui.open dap.listeners.after.event_initialized['dapui_config'] = dapui.open
dap.listeners.before.event_terminated['dapui_config'] = dapui.close dap.listeners.before.event_terminated['dapui_config'] = dapui.close
dap.listeners.before.event_exited['dapui_config'] = dapui.close dap.listeners.before.event_exited['dapui_config'] = dapui.close
-- Install golang specific config -- Install golang specific config
require('dap-go').setup() require('dap-go').setup()
end, end,
} }

View File

@ -1,9 +1,9 @@
return { return {
{ -- Add indentation guides even on blank lines { -- Add indentation guides even on blank lines
'lukas-reineke/indent-blankline.nvim', 'lukas-reineke/indent-blankline.nvim',
-- Enable `lukas-reineke/indent-blankline.nvim` -- Enable `lukas-reineke/indent-blankline.nvim`
-- See `:help ibl` -- See `:help ibl`
main = 'ibl', main = 'ibl',
opts = {}, opts = {},
}, },
} }