mirror of
https://github.com/nvim-lua/kickstart.nvim.git
synced 2026-04-14 22:21:16 -07:00
Compare commits
73 Commits
76e06fec5c
...
refactor/c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dc5f2febe7 | ||
|
|
891f996b59 | ||
|
|
c0cc054155 | ||
|
|
c7f05a0f47 | ||
|
|
16dd8f5007 | ||
|
|
d3168308d4 | ||
|
|
e01e1eb8f8 | ||
|
|
8ac4b12632 | ||
|
|
0619d89884 | ||
|
|
58170c7ae3 | ||
|
|
164cedf212 | ||
|
|
431cf2e881 | ||
|
|
d132bd3e9f | ||
|
|
f7b74c7b83 | ||
|
|
b212fdb33f | ||
|
|
d97de4f0ae | ||
|
|
886f2bc076 | ||
|
|
dabce46993 | ||
|
|
7cc245ecaf | ||
|
|
86f1ba26f2 | ||
|
|
9a3a2f9678 | ||
|
|
1f4c21f463 | ||
|
|
4021496050 | ||
|
|
a6dcf6874b | ||
|
|
966d5e94b1 | ||
|
|
a4bbfdc3db | ||
|
|
80b1ee1789 | ||
|
|
09ab9ae265 | ||
|
|
afc734f993 | ||
|
|
177ff61483 | ||
|
|
b9f3965282 | ||
|
|
1ba1789318 | ||
|
|
df9436c0e5 | ||
|
|
e79572c9e6 | ||
|
|
7e54a4c5c8 | ||
|
|
8c6b78c770 | ||
|
|
560d9dc894 | ||
|
|
21d5aabc22 | ||
|
|
318bd3e65c | ||
|
|
e87b7281ed | ||
|
|
88c65592ae | ||
|
|
b15cca8d31 | ||
|
|
8f479db123 | ||
|
|
35822809e6 | ||
|
|
b2af42acb3 | ||
|
|
c8e189ff78 | ||
|
|
ad246eb5dd | ||
|
|
0c17d320bb | ||
|
|
7ea937dbc5 | ||
|
|
3ddda4a8b8 | ||
|
|
5740ddcf9c | ||
|
|
2d541c4140 | ||
|
|
3338d39206 | ||
|
|
6ba2408cdf | ||
|
|
f5a9f9cdc6 | ||
|
|
fb73617653 | ||
|
|
c92ea7ca97 | ||
|
|
2b2f0f8364 | ||
|
|
76cb865e4f | ||
|
|
d350db2449 | ||
|
|
9929044f24 | ||
|
|
1a5787bc57 | ||
|
|
8a5a52f647 | ||
|
|
e947649cb0 | ||
|
|
5e2d7e184b | ||
|
|
2abcb39fae | ||
|
|
38f4744e25 | ||
|
|
34e7d29aa7 | ||
|
|
ea60b2b01f | ||
|
|
e64aa51ef2 | ||
|
|
7c49ba1cb7 | ||
|
|
282cbb9c82 | ||
|
|
ebca680dea |
5
.github/workflows/stylua.yml
vendored
5
.github/workflows/stylua.yml
vendored
@@ -9,13 +9,12 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
- name: Stylua Check
|
- name: Stylua Check
|
||||||
uses: JohnnyMorganz/stylua-action@v3
|
uses: JohnnyMorganz/stylua-action@v4
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
version: latest
|
version: latest
|
||||||
args: --check .
|
args: --check .
|
||||||
|
|
||||||
|
|||||||
7
.gitignore
vendored
7
.gitignore
vendored
@@ -4,4 +4,11 @@ test.sh
|
|||||||
nvim
|
nvim
|
||||||
|
|
||||||
spell/
|
spell/
|
||||||
|
|
||||||
|
# In your personal fork, you likely want to comment this, since it's recommended to track
|
||||||
|
# lazy-lock.json in version control - see https://lazy.folke.io/usage/lockfile
|
||||||
|
# For the official `nvim-lua/kickstart.nvim` git repository, we leave it ignored to avoid unneeded
|
||||||
|
# merge conflicts.
|
||||||
lazy-lock.json
|
lazy-lock.json
|
||||||
|
|
||||||
|
.DS_Store
|
||||||
|
|||||||
@@ -4,3 +4,4 @@ indent_type = "Spaces"
|
|||||||
indent_width = 2
|
indent_width = 2
|
||||||
quote_style = "AutoPreferSingle"
|
quote_style = "AutoPreferSingle"
|
||||||
call_parentheses = "None"
|
call_parentheses = "None"
|
||||||
|
collapse_simple_statement = "Always"
|
||||||
|
|||||||
110
README.md
110
README.md
@@ -17,13 +17,22 @@ A starting point for Neovim that is:
|
|||||||
Kickstart.nvim targets *only* the latest
|
Kickstart.nvim targets *only* the latest
|
||||||
['stable'](https://github.com/neovim/neovim/releases/tag/stable) and latest
|
['stable'](https://github.com/neovim/neovim/releases/tag/stable) and latest
|
||||||
['nightly'](https://github.com/neovim/neovim/releases/tag/nightly) of Neovim.
|
['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 you are experiencing issues, please make sure you have at least the latest
|
||||||
|
stable version. Most likely, you want to install neovim via a [package
|
||||||
|
manager](https://github.com/neovim/neovim/blob/master/INSTALL.md#install-from-package).
|
||||||
|
To check your neovim version, run `nvim --version` and make sure it is not
|
||||||
|
below the latest
|
||||||
|
['stable'](https://github.com/neovim/neovim/releases/tag/stable) version. If
|
||||||
|
your chosen install method only gives you an outdated version of neovim, find
|
||||||
|
alternative [installation methods below](#alternative-neovim-installation-methods).
|
||||||
|
|
||||||
### Install External Dependencies
|
### Install External Dependencies
|
||||||
|
|
||||||
External Requirements:
|
External Requirements:
|
||||||
- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`)
|
- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`)
|
||||||
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation)
|
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation),
|
||||||
|
[fd-find](https://github.com/sharkdp/fd#installation)
|
||||||
|
- [tree-sitter CLI](https://github.com/tree-sitter/tree-sitter/blob/master/crates/cli/README.md#installation)
|
||||||
- Clipboard tool (xclip/xsel/win32yank or other depending on the platform)
|
- Clipboard tool (xclip/xsel/win32yank or other depending on the platform)
|
||||||
- A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons
|
- 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
|
- if you have it set `vim.g.have_nerd_font` in `init.lua` to true
|
||||||
@@ -33,13 +42,13 @@ External Requirements:
|
|||||||
- If you want to write Golang, you will need `go`
|
- If you want to write Golang, you will need `go`
|
||||||
- etc.
|
- etc.
|
||||||
|
|
||||||
> **NOTE**
|
> [!NOTE]
|
||||||
> See [Install Recipes](#Install-Recipes) for additional Windows and Linux specific notes
|
> See [Install Recipes](#Install-Recipes) for additional Windows and Linux specific notes
|
||||||
> and quick install snippets
|
> and quick install snippets
|
||||||
|
|
||||||
### Install Kickstart
|
### Install Kickstart
|
||||||
|
|
||||||
> **NOTE**
|
> [!NOTE]
|
||||||
> [Backup](#FAQ) your previous configuration (if any exists)
|
> [Backup](#FAQ) your previous configuration (if any exists)
|
||||||
|
|
||||||
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:
|
||||||
@@ -56,7 +65,7 @@ Neovim's configurations are located under the following paths, depending on your
|
|||||||
so that you have your own copy that you can modify, then install by cloning the
|
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.
|
fork to your machine using one of the commands below, depending on your OS.
|
||||||
|
|
||||||
> **NOTE**
|
> [!NOTE]
|
||||||
> Your fork's URL will be something like this:
|
> Your fork's URL will be something like this:
|
||||||
> `https://github.com/<your_github_username>/kickstart.nvim.git`
|
> `https://github.com/<your_github_username>/kickstart.nvim.git`
|
||||||
|
|
||||||
@@ -65,7 +74,8 @@ too - it's ignored in the kickstart repo to make maintenance easier, but it's
|
|||||||
[recommended to track it in version control](https://lazy.folke.io/usage/lockfile).
|
[recommended to track it in version control](https://lazy.folke.io/usage/lockfile).
|
||||||
|
|
||||||
#### Clone kickstart.nvim
|
#### Clone kickstart.nvim
|
||||||
> **NOTE**
|
|
||||||
|
> [!NOTE]
|
||||||
> If following the recommended step above (i.e., forking the repo), replace
|
> If following the recommended step above (i.e., forking the repo), replace
|
||||||
> `nvim-lua` with `<your_github_username>` in the commands below
|
> `nvim-lua` with `<your_github_username>` in the commands below
|
||||||
|
|
||||||
@@ -152,7 +162,7 @@ examples of adding popularly requested plugins.
|
|||||||
|
|
||||||
Below you can find OS specific install instructions for Neovim and dependencies.
|
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.
|
After installing all the dependencies continue with the [Install Kickstart](#install-kickstart) step.
|
||||||
|
|
||||||
#### Windows Installation
|
#### Windows Installation
|
||||||
|
|
||||||
@@ -183,7 +193,7 @@ winget install --accept-source-agreements chocolatey.chocolatey
|
|||||||
2. install all requirements using choco, exit the previous cmd and
|
2. install all requirements using choco, exit the previous cmd and
|
||||||
open a new one so that choco path is set, and run in cmd as **admin**:
|
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
|
choco install -y neovim git ripgrep wget fd unzip gzip mingw make tree-sitter
|
||||||
```
|
```
|
||||||
</details>
|
</details>
|
||||||
<details><summary>WSL (Windows Subsystem for Linux)</summary>
|
<details><summary>WSL (Windows Subsystem for Linux)</summary>
|
||||||
@@ -193,7 +203,7 @@ wsl --install
|
|||||||
wsl
|
wsl
|
||||||
sudo add-apt-repository ppa:neovim-ppa/unstable -y
|
sudo add-apt-repository ppa:neovim-ppa/unstable -y
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install make gcc ripgrep unzip git xclip neovim
|
sudo apt install make gcc ripgrep fd-find tree-sitter-cli unzip git xclip neovim
|
||||||
```
|
```
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@@ -203,14 +213,14 @@ sudo apt install make gcc ripgrep unzip git xclip neovim
|
|||||||
```
|
```
|
||||||
sudo add-apt-repository ppa:neovim-ppa/unstable -y
|
sudo add-apt-repository ppa:neovim-ppa/unstable -y
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install make gcc ripgrep unzip git xclip neovim
|
sudo apt install make gcc ripgrep fd-find tree-sitter-cli unzip git xclip neovim
|
||||||
```
|
```
|
||||||
</details>
|
</details>
|
||||||
<details><summary>Debian Install Steps</summary>
|
<details><summary>Debian Install Steps</summary>
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install make gcc ripgrep unzip git xclip curl
|
sudo apt install make gcc ripgrep fd-find tree-sitter-cli unzip git xclip curl
|
||||||
|
|
||||||
# Now we install nvim
|
# Now we install nvim
|
||||||
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz
|
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz
|
||||||
@@ -226,14 +236,88 @@ sudo ln -sf /opt/nvim-linux-x86_64/bin/nvim /usr/local/bin/
|
|||||||
<details><summary>Fedora Install Steps</summary>
|
<details><summary>Fedora Install Steps</summary>
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo dnf install -y gcc make git ripgrep fd-find unzip neovim
|
sudo dnf install -y gcc make git ripgrep fd-find tree-sitter-cli unzip neovim
|
||||||
```
|
```
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details><summary>Arch Install Steps</summary>
|
<details><summary>Arch Install Steps</summary>
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo pacman -S --noconfirm --needed gcc make git ripgrep fd unzip neovim
|
sudo pacman -S --noconfirm --needed gcc make git ripgrep fd tree-sitter-cli unzip neovim
|
||||||
```
|
```
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
### Alternative neovim installation methods
|
||||||
|
|
||||||
|
For some systems it is not unexpected that the [package manager installation
|
||||||
|
method](https://github.com/neovim/neovim/blob/master/INSTALL.md#install-from-package)
|
||||||
|
recommended by neovim is significantly behind. If that is the case for you,
|
||||||
|
pick one of the following methods that are known to deliver fresh neovim versions very quickly.
|
||||||
|
They have been picked for their popularity and because they make installing and updating
|
||||||
|
neovim to the latest versions easy. You can also find more detail about the
|
||||||
|
available methods being discussed
|
||||||
|
[here](https://github.com/nvim-lua/kickstart.nvim/issues/1583).
|
||||||
|
|
||||||
|
|
||||||
|
<details><summary>Bob</summary>
|
||||||
|
|
||||||
|
[Bob](https://github.com/MordechaiHadad/bob) is a Neovim version manager for
|
||||||
|
all platforms. Simply install
|
||||||
|
[rustup](https://rust-lang.github.io/rustup/installation/other.html),
|
||||||
|
and run the following commands:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rustup default stable
|
||||||
|
rustup update stable
|
||||||
|
cargo install bob-nvim
|
||||||
|
bob use stable
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details><summary>Homebrew</summary>
|
||||||
|
|
||||||
|
[Homebrew](https://brew.sh) is a package manager popular on Mac and Linux.
|
||||||
|
Simply install using [`brew install`](https://formulae.brew.sh/formula/neovim).
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details><summary>Flatpak</summary>
|
||||||
|
|
||||||
|
Flatpak is a package manager for applications that allows developers to package their applications
|
||||||
|
just once to make it available on all Linux systems. Simply [install flatpak](https://flatpak.org/setup/)
|
||||||
|
and setup [flathub](https://flathub.org/setup) to [install neovim](https://flathub.org/apps/io.neovim.nvim).
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details><summary>asdf and mise-en-place</summary>
|
||||||
|
|
||||||
|
[asdf](https://asdf-vm.com/) and [mise](https://mise.jdx.dev/) are tool version managers,
|
||||||
|
mostly aimed towards project-specific tool versioning. However both support managing tools
|
||||||
|
globally in the user-space as well:
|
||||||
|
|
||||||
|
<details><summary>mise</summary>
|
||||||
|
|
||||||
|
[Install mise](https://mise.jdx.dev/getting-started.html), then run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mise plugins install neovim
|
||||||
|
mise use neovim@stable
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details><summary>asdf</summary>
|
||||||
|
|
||||||
|
[Install asdf](https://asdf-vm.com/guide/getting-started.html), then run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
asdf plugin add neovim
|
||||||
|
asdf install neovim stable
|
||||||
|
asdf set neovim stable --home
|
||||||
|
asdf reshim neovim
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|||||||
@@ -2,4 +2,7 @@
|
|||||||
-- 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
|
||||||
|
|
||||||
|
---@module 'lazy'
|
||||||
|
---@type LazySpec
|
||||||
return {}
|
return {}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ local check_version = function()
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if vim.version.ge(vim.version(), '0.10-dev') then
|
if vim.version.ge(vim.version(), '0.11') 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))
|
||||||
|
|||||||
@@ -1,16 +1,10 @@
|
|||||||
-- autopairs
|
-- autopairs
|
||||||
-- https://github.com/windwp/nvim-autopairs
|
-- https://github.com/windwp/nvim-autopairs
|
||||||
|
|
||||||
|
---@module 'lazy'
|
||||||
|
---@type LazySpec
|
||||||
return {
|
return {
|
||||||
'windwp/nvim-autopairs',
|
'windwp/nvim-autopairs',
|
||||||
event = 'InsertEnter',
|
event = 'InsertEnter',
|
||||||
-- Optional dependency
|
opts = {},
|
||||||
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,
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
-- 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 ;)
|
||||||
|
|
||||||
|
---@module 'lazy'
|
||||||
|
---@type LazySpec
|
||||||
return {
|
return {
|
||||||
-- NOTE: Yes, you can install new plugins here!
|
-- NOTE: Yes, you can install new plugins here!
|
||||||
'mfussenegger/nvim-dap',
|
'mfussenegger/nvim-dap',
|
||||||
@@ -18,7 +20,7 @@ return {
|
|||||||
'nvim-neotest/nvim-nio',
|
'nvim-neotest/nvim-nio',
|
||||||
|
|
||||||
-- Installs the debug adapters for you
|
-- Installs the debug adapters for you
|
||||||
'williamboman/mason.nvim',
|
'mason-org/mason.nvim',
|
||||||
'jay-babu/mason-nvim-dap.nvim',
|
'jay-babu/mason-nvim-dap.nvim',
|
||||||
|
|
||||||
-- Add your own debuggers here
|
-- Add your own debuggers here
|
||||||
@@ -26,56 +28,14 @@ return {
|
|||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
-- Basic debugging keymaps, feel free to change to your liking!
|
-- Basic debugging keymaps, feel free to change to your liking!
|
||||||
{
|
{ '<F5>', function() require('dap').continue() end, desc = 'Debug: Start/Continue' },
|
||||||
'<F5>',
|
{ '<F1>', function() require('dap').step_into() end, desc = 'Debug: Step Into' },
|
||||||
function()
|
{ '<F2>', function() require('dap').step_over() end, desc = 'Debug: Step Over' },
|
||||||
require('dap').continue()
|
{ '<F3>', function() require('dap').step_out() end, desc = 'Debug: Step Out' },
|
||||||
end,
|
{ '<leader>b', function() require('dap').toggle_breakpoint() end, desc = 'Debug: Toggle Breakpoint' },
|
||||||
desc = 'Debug: Start/Continue',
|
{ '<leader>B', function() require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ') end, desc = 'Debug: Set Breakpoint' },
|
||||||
},
|
|
||||||
{
|
|
||||||
'<F1>',
|
|
||||||
function()
|
|
||||||
require('dap').step_into()
|
|
||||||
end,
|
|
||||||
desc = 'Debug: Step Into',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'<F2>',
|
|
||||||
function()
|
|
||||||
require('dap').step_over()
|
|
||||||
end,
|
|
||||||
desc = 'Debug: Step Over',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'<F3>',
|
|
||||||
function()
|
|
||||||
require('dap').step_out()
|
|
||||||
end,
|
|
||||||
desc = 'Debug: Step Out',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'<leader>b',
|
|
||||||
function()
|
|
||||||
require('dap').toggle_breakpoint()
|
|
||||||
end,
|
|
||||||
desc = 'Debug: Toggle Breakpoint',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'<leader>B',
|
|
||||||
function()
|
|
||||||
require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ')
|
|
||||||
end,
|
|
||||||
desc = 'Debug: Set Breakpoint',
|
|
||||||
},
|
|
||||||
-- 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.
|
||||||
{
|
{ '<F7>', function() require('dapui').toggle() end, desc = 'Debug: See last session result.' },
|
||||||
'<F7>',
|
|
||||||
function()
|
|
||||||
require('dapui').toggle()
|
|
||||||
end,
|
|
||||||
desc = 'Debug: See last session result.',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local dap = require 'dap'
|
local dap = require 'dap'
|
||||||
@@ -100,11 +60,13 @@ return {
|
|||||||
|
|
||||||
-- Dap UI setup
|
-- Dap UI setup
|
||||||
-- For more information, see |:help nvim-dap-ui|
|
-- For more information, see |:help nvim-dap-ui|
|
||||||
|
---@diagnostic disable-next-line: missing-fields
|
||||||
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 = '*' },
|
||||||
|
---@diagnostic disable-next-line: missing-fields
|
||||||
controls = {
|
controls = {
|
||||||
icons = {
|
icons = {
|
||||||
pause = '⏸',
|
pause = '⏸',
|
||||||
|
|||||||
@@ -2,60 +2,62 @@
|
|||||||
-- NOTE: gitsigns is already included in init.lua but contains only the base
|
-- NOTE: gitsigns is already included in init.lua but contains only the base
|
||||||
-- config. This will add also the recommended keymaps.
|
-- config. This will add also the recommended keymaps.
|
||||||
|
|
||||||
|
---@module 'lazy'
|
||||||
|
---@type LazySpec
|
||||||
return {
|
return {
|
||||||
{
|
'lewis6991/gitsigns.nvim',
|
||||||
'lewis6991/gitsigns.nvim',
|
---@module 'gitsigns'
|
||||||
opts = {
|
---@type Gitsigns.Config
|
||||||
on_attach = function(bufnr)
|
---@diagnostic disable-next-line: missing-fields
|
||||||
local gitsigns = require 'gitsigns'
|
opts = {
|
||||||
|
on_attach = function(bufnr)
|
||||||
|
local gitsigns = require 'gitsigns'
|
||||||
|
|
||||||
local function map(mode, l, r, opts)
|
local function map(mode, l, r, opts)
|
||||||
opts = opts or {}
|
opts = opts or {}
|
||||||
opts.buffer = bufnr
|
opts.buffer = bufnr
|
||||||
vim.keymap.set(mode, l, r, opts)
|
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
|
||||||
|
end, { desc = 'Jump to next git [c]hange' })
|
||||||
|
|
||||||
-- Navigation
|
map('n', '[c', function()
|
||||||
map('n', ']c', function()
|
if vim.wo.diff then
|
||||||
if vim.wo.diff then
|
vim.cmd.normal { '[c', bang = true }
|
||||||
vim.cmd.normal { ']c', bang = true }
|
else
|
||||||
else
|
gitsigns.nav_hunk 'prev'
|
||||||
gitsigns.nav_hunk 'next'
|
end
|
||||||
end
|
end, { desc = 'Jump to previous git [c]hange' })
|
||||||
end, { desc = 'Jump to next git [c]hange' })
|
|
||||||
|
|
||||||
map('n', '[c', function()
|
-- Actions
|
||||||
if vim.wo.diff then
|
-- visual mode
|
||||||
vim.cmd.normal { '[c', bang = true }
|
map('v', '<leader>hs', function() gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v' } end, { desc = 'git [s]tage hunk' })
|
||||||
else
|
map('v', '<leader>hr', function() gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v' } end, { desc = 'git [r]eset hunk' })
|
||||||
gitsigns.nav_hunk 'prev'
|
-- normal mode
|
||||||
end
|
map('n', '<leader>hs', gitsigns.stage_hunk, { desc = 'git [s]tage hunk' })
|
||||||
end, { desc = 'Jump to previous git [c]hange' })
|
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>hR', gitsigns.reset_buffer, { desc = 'git [R]eset buffer' })
|
||||||
|
map('n', '<leader>hp', gitsigns.preview_hunk, { desc = 'git [p]review hunk' })
|
||||||
|
map('n', '<leader>hi', gitsigns.preview_hunk_inline, { desc = 'git preview hunk [i]nline' })
|
||||||
|
map('n', '<leader>hb', function() gitsigns.blame_line { full = true } end, { 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' })
|
||||||
|
map('n', '<leader>hQ', function() gitsigns.setqflist 'all' end)
|
||||||
|
map('n', '<leader>hq', gitsigns.setqflist)
|
||||||
|
-- Toggles
|
||||||
|
map('n', '<leader>tb', gitsigns.toggle_current_line_blame, { desc = '[T]oggle git show [b]lame line' })
|
||||||
|
map('n', '<leader>tw', gitsigns.toggle_word_diff)
|
||||||
|
|
||||||
-- Actions
|
-- Text object
|
||||||
-- visual mode
|
map({ 'o', 'x' }, 'ih', gitsigns.select_hunk)
|
||||||
map('v', '<leader>hs', function()
|
end,
|
||||||
gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v' }
|
|
||||||
end, { desc = 'git [s]tage hunk' })
|
|
||||||
map('v', '<leader>hr', function()
|
|
||||||
gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v' }
|
|
||||||
end, { desc = 'git [r]eset 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.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.preview_hunk_inline, { desc = '[T]oggle git show [D]eleted' })
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,13 @@
|
|||||||
|
-- Add indentation guides even on blank lines
|
||||||
|
|
||||||
|
---@module 'lazy'
|
||||||
|
---@type LazySpec
|
||||||
return {
|
return {
|
||||||
{ -- 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',
|
---@module 'ibl'
|
||||||
opts = {},
|
---@type ibl.config
|
||||||
},
|
opts = {},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,60 +1,59 @@
|
|||||||
|
-- Linting
|
||||||
|
|
||||||
|
---@module 'lazy'
|
||||||
|
---@type LazySpec
|
||||||
return {
|
return {
|
||||||
|
'mfussenegger/nvim-lint',
|
||||||
|
event = { 'BufReadPre', 'BufNewFile' },
|
||||||
|
config = function()
|
||||||
|
local lint = require 'lint'
|
||||||
|
lint.linters_by_ft = {
|
||||||
|
markdown = { 'markdownlint' }, -- Make sure to install `markdownlint` via mason / npm
|
||||||
|
}
|
||||||
|
|
||||||
{ -- Linting
|
-- To allow other plugins to add linters to require('lint').linters_by_ft,
|
||||||
'mfussenegger/nvim-lint',
|
-- instead set linters_by_ft like this:
|
||||||
event = { 'BufReadPre', 'BufNewFile' },
|
-- lint.linters_by_ft = lint.linters_by_ft or {}
|
||||||
config = function()
|
-- lint.linters_by_ft['markdown'] = { 'markdownlint' }
|
||||||
local lint = require 'lint'
|
--
|
||||||
lint.linters_by_ft = {
|
-- However, note that this will enable a set of default linters,
|
||||||
markdown = { 'markdownlint' },
|
-- 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
|
||||||
|
|
||||||
-- To allow other plugins to add linters to require('lint').linters_by_ft,
|
-- Create autocommand which carries out the actual linting
|
||||||
-- instead set linters_by_ft like this:
|
-- on the specified events.
|
||||||
-- lint.linters_by_ft = lint.linters_by_ft or {}
|
local lint_augroup = vim.api.nvim_create_augroup('lint', { clear = true })
|
||||||
-- lint.linters_by_ft['markdown'] = { 'markdownlint' }
|
vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, {
|
||||||
--
|
group = lint_augroup,
|
||||||
-- However, note that this will enable a set of default linters,
|
callback = function()
|
||||||
-- which will cause errors unless these tools are available:
|
-- Only run the linter in buffers that you can modify in order to
|
||||||
-- {
|
-- avoid superfluous noise, notably within the handy LSP pop-ups that
|
||||||
-- clojure = { "clj-kondo" },
|
-- describe the hovered symbol using Markdown.
|
||||||
-- dockerfile = { "hadolint" },
|
if vim.bo.modifiable then lint.try_lint() end
|
||||||
-- inko = { "inko" },
|
end,
|
||||||
-- janet = { "janet" },
|
})
|
||||||
-- json = { "jsonlint" },
|
end,
|
||||||
-- 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()
|
|
||||||
-- Only run the linter in buffers that you can modify in order to
|
|
||||||
-- avoid superfluous noise, notably within the handy LSP pop-ups that
|
|
||||||
-- describe the hovered symbol using Markdown.
|
|
||||||
if vim.opt_local.modifiable:get() then
|
|
||||||
lint.try_lint()
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
-- Neo-tree is a Neovim plugin to browse the file system
|
-- Neo-tree is a Neovim plugin to browse the file system
|
||||||
-- https://github.com/nvim-neo-tree/neo-tree.nvim
|
-- https://github.com/nvim-neo-tree/neo-tree.nvim
|
||||||
|
|
||||||
|
---@module 'lazy'
|
||||||
|
---@type LazySpec
|
||||||
return {
|
return {
|
||||||
'nvim-neo-tree/neo-tree.nvim',
|
'nvim-neo-tree/neo-tree.nvim',
|
||||||
version = '*',
|
version = '*',
|
||||||
@@ -9,10 +11,12 @@ return {
|
|||||||
'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
|
'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
|
||||||
'MunifTanjim/nui.nvim',
|
'MunifTanjim/nui.nvim',
|
||||||
},
|
},
|
||||||
cmd = 'Neotree',
|
lazy = false,
|
||||||
keys = {
|
keys = {
|
||||||
{ '\\', ':Neotree reveal<CR>', desc = 'NeoTree reveal', silent = true },
|
{ '\\', ':Neotree reveal<CR>', desc = 'NeoTree reveal', silent = true },
|
||||||
},
|
},
|
||||||
|
---@module 'neo-tree'
|
||||||
|
---@type neotree.Config
|
||||||
opts = {
|
opts = {
|
||||||
filesystem = {
|
filesystem = {
|
||||||
window = {
|
window = {
|
||||||
|
|||||||
Reference in New Issue
Block a user