Merge branch 'master' into master

This commit is contained in:
Peter P. 2026-06-11 11:31:29 +02:00 committed by GitHub
commit 710627a9e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 1033 additions and 977 deletions

View File

@ -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 .

9
.gitignore vendored
View File

@ -4,4 +4,11 @@ test.sh
nvim nvim
spell/ spell/
lazy-lock.json
# In your personal fork, you likely want to comment this, since it's recommended to track
# nvim-pack-lock.json in version control - see :help vim.pack-lockfile
# For the official `nvim-lua/kickstart.nvim` git repository, we leave it ignored to avoid unneeded
# merge conflicts.
nvim-pack-lock.json
.DS_Store

View File

@ -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"

138
README.md
View File

@ -12,12 +12,21 @@ Personal fork of kickstart.nvim
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 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
- 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) [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
@ -31,19 +40,142 @@ After cloning, move files into ~/.config/nvim/
[The Only Video You Need to Get Started with Neovim](https://youtu.be/m8C0Cq9Uv9o) [The Only Video You Need to Get Started with Neovim](https://youtu.be/m8C0Cq9Uv9o)
## Install Recipes ### 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:
* Remove your config directory and local data directory (for example,
`~/.config/nvim` and `~/.local/share/nvim`).
* 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. 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
<details><summary>Windows with Microsoft C++ Build Tools and CMake</summary>
Kickstart's default config is make-only for `telescope-fzf-native.nvim`.
If `make` is unavailable, the plugin is skipped.
Recommended: install `make` (see the chocolatey section below).
If you want a CMake-only setup, customize `init.lua` in two places:
1. Include `telescope-fzf-native.nvim` when `cmake` is available:
```lua
if vim.fn.executable 'make' == 1 or vim.fn.executable 'cmake' == 1 then
table.insert(plugins, gh 'nvim-telescope/telescope-fzf-native.nvim')
end
```
2. In the `PackChanged` hook, use CMake when `make` is unavailable:
```lua
if name == 'telescope-fzf-native.nvim' then
if vim.fn.executable 'make' == 1 then
run_build(name, { 'make' }, ev.data.path)
elseif vim.fn.executable 'cmake' == 1 then
run_build(name, { 'cmake', '-S.', '-Bbuild', '-DCMAKE_BUILD_TYPE=Release' }, ev.data.path)
run_build(name, { 'cmake', '--build', 'build', '--config', 'Release', '--target', 'install' }, ev.data.path)
end
return
end
```
See `telescope-fzf-native` documentation for [build details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation).
</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 the 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 tree-sitter
```
</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 fd-find tree-sitter-cli unzip git xclip neovim
```
</details>
#### Linux Install #### Linux Install
<details><summary>Ubuntu Install Steps</summary> <details><summary>Ubuntu Install Steps</summary>
```
sudo add-apt-repository ppa:neovim-ppa/unstable -y
sudo apt update
sudo apt install make gcc ripgrep fd-find tree-sitter-cli unzip git xclip neovim
```
</details>
<details><summary>Debian Install Steps</summary>
```
sudo apt update
sudo apt install make gcc ripgrep fd-find tree-sitter-cli unzip git xclip curl
# Now we install nvim
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz
sudo rm -rf /opt/nvim-linux-x86_64
sudo mkdir -p /opt/nvim-linux-x86_64
sudo chmod a+rX /opt/nvim-linux-x86_64
sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz
# make it available in /usr/local/bin, distro installs to /usr/bin
sudo ln -sf /opt/nvim-linux-x86_64/bin/nvim /usr/local/bin/
```
</details>
<details><summary>Fedora Install Steps</summary>
```
sudo dnf install -y gcc make git ripgrep fd-find tree-sitter-cli unzip neovim
```
</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>

1367
init.lua

File diff suppressed because it is too large Load Diff

View File

@ -2,4 +2,12 @@
-- 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 {}
-- Iterate over all Lua files in the plugins directory and load them
local plugins_dir = vim.fs.joinpath(vim.fn.stdpath 'config', 'lua', 'custom', 'plugins')
for file_name, type in vim.fs.dir(plugins_dir) do
if type == 'file' and file_name:match '%.lua$' and file_name ~= 'init.lua' then
local module = file_name:gsub('%.lua$', '')
require('custom.plugins.' .. module)
end
end

View File

@ -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.12') 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))

View File

@ -1,8 +1,5 @@
-- autopairs -- autopairs
-- https://github.com/windwp/nvim-autopairs -- https://github.com/windwp/nvim-autopairs
return { vim.pack.add { 'https://github.com/windwp/nvim-autopairs' }
'windwp/nvim-autopairs', require('nvim-autopairs').setup {}
event = 'InsertEnter',
opts = {},
}

View File

@ -6,143 +6,90 @@
-- 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 { vim.pack.add {
-- NOTE: Yes, you can install new plugins here! 'https://github.com/mfussenegger/nvim-dap',
'mfussenegger/nvim-dap', 'https://github.com/rcarriga/nvim-dap-ui',
-- NOTE: And you can specify dependencies as well 'https://github.com/nvim-neotest/nvim-nio',
dependencies = { 'https://github.com/mason-org/mason.nvim',
-- Creates a beautiful debugger UI 'https://github.com/jay-babu/mason-nvim-dap.nvim',
'rcarriga/nvim-dap-ui', 'https://github.com/leoluz/nvim-dap-go',
}
-- Required dependency for nvim-dap-ui
'nvim-neotest/nvim-nio', -- Basic debugging keymaps, feel free to change to your liking!
vim.keymap.set('n', '<F5>', function() require('dap').continue() end, { desc = 'Debug: Start/Continue' })
-- Installs the debug adapters for you vim.keymap.set('n', '<F1>', function() require('dap').step_into() end, { desc = 'Debug: Step Into' })
'mason-org/mason.nvim', vim.keymap.set('n', '<F2>', function() require('dap').step_over() end, { desc = 'Debug: Step Over' })
'jay-babu/mason-nvim-dap.nvim', vim.keymap.set('n', '<F3>', function() require('dap').step_out() end, { desc = 'Debug: Step Out' })
vim.keymap.set('n', '<leader>b', function() require('dap').toggle_breakpoint() end, { desc = 'Debug: Toggle Breakpoint' })
-- Add your own debuggers here vim.keymap.set('n', '<leader>B', function() require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ') end, { desc = 'Debug: Set Breakpoint' })
'leoluz/nvim-dap-go', -- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
}, vim.keymap.set('n', '<F7>', function() require('dapui').toggle() end, { desc = 'Debug: See last session result.' })
keys = {
-- Basic debugging keymaps, feel free to change to your liking! local dap = require 'dap'
{ local dapui = require 'dapui'
'<F5>',
function() require('mason-nvim-dap').setup {
require('dap').continue() -- Makes a best effort to setup the various debuggers with
end, -- reasonable debug configurations
desc = 'Debug: Start/Continue', automatic_installation = true,
},
{ -- You can provide additional configuration to the handlers,
'<F1>', -- see mason-nvim-dap README for more information
function() handlers = {},
require('dap').step_into()
end, -- You'll need to check that you have the required things installed
desc = 'Debug: Step Into', -- 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
'<F2>', 'delve',
function() },
require('dap').step_over() }
end,
desc = 'Debug: Step Over', -- Dap UI setup
}, -- For more information, see |:help nvim-dap-ui|
{ ---@diagnostic disable-next-line: missing-fields
'<F3>', dapui.setup {
function() -- Set icons to characters that are more likely to work in every terminal.
require('dap').step_out() -- Feel free to remove or use ones that you like more! :)
end, -- Don't feel like these are good choices.
desc = 'Debug: Step Out', icons = { expanded = '', collapsed = '', current_frame = '*' },
}, ---@diagnostic disable-next-line: missing-fields
{ controls = {
'<leader>b', icons = {
function() pause = '',
require('dap').toggle_breakpoint() play = '',
end, step_into = '',
desc = 'Debug: Toggle Breakpoint', step_over = '',
}, step_out = '',
{ step_back = 'b',
'<leader>B', run_last = '▶▶',
function() terminate = '',
require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ') disconnect = '',
end, },
desc = 'Debug: Set Breakpoint', },
}, }
-- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
{ -- Change breakpoint icons
'<F7>', -- vim.api.nvim_set_hl(0, 'DapBreak', { fg = '#e51400' })
function() -- vim.api.nvim_set_hl(0, 'DapStop', { fg = '#ffcc00' })
require('dapui').toggle() -- local breakpoint_icons = vim.g.have_nerd_font
end, -- and { Breakpoint = '', BreakpointCondition = '', BreakpointRejected = '', LogPoint = '', Stopped = '' }
desc = 'Debug: See last session result.', -- or { Breakpoint = '●', BreakpointCondition = '⊜', BreakpointRejected = '⊘', LogPoint = '◆', Stopped = '⭔' }
}, -- for type, icon in pairs(breakpoint_icons) do
}, -- local tp = 'Dap' .. type
config = function() -- local hl = (type == 'Stopped') and 'DapStop' or 'DapBreak'
local dap = require 'dap' -- vim.fn.sign_define(tp, { text = icon, texthl = hl, numhl = hl })
local dapui = require 'dapui' -- end
require('mason-nvim-dap').setup { dap.listeners.after.event_initialized['dapui_config'] = dapui.open
-- Makes a best effort to setup the various debuggers with dap.listeners.before.event_terminated['dapui_config'] = dapui.close
-- reasonable debug configurations dap.listeners.before.event_exited['dapui_config'] = dapui.close
automatic_installation = true,
-- Install golang specific config
-- You can provide additional configuration to the handlers, require('dap-go').setup {
-- see mason-nvim-dap README for more information delve = {
handlers = {}, -- On Windows delve must be run attached or it crashes.
-- See https://github.com/leoluz/nvim-dap-go/blob/main/README.md#configuring
-- You'll need to check that you have the required things installed detached = vim.fn.has 'win32' == 0,
-- 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',
},
}
-- 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 = '',
},
},
}
-- Change breakpoint icons
-- vim.api.nvim_set_hl(0, 'DapBreak', { fg = '#e51400' })
-- vim.api.nvim_set_hl(0, 'DapStop', { fg = '#ffcc00' })
-- local breakpoint_icons = vim.g.have_nerd_font
-- and { Breakpoint = '', BreakpointCondition = '', BreakpointRejected = '', LogPoint = '', Stopped = '' }
-- or { Breakpoint = '●', BreakpointCondition = '⊜', BreakpointRejected = '⊘', LogPoint = '◆', Stopped = '⭔' }
-- for type, icon in pairs(breakpoint_icons) do
-- local tp = 'Dap' .. type
-- local hl = (type == 'Stopped') and 'DapStop' or 'DapBreak'
-- vim.fn.sign_define(tp, { text = icon, texthl = hl, numhl = hl })
-- end
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 {
delve = {
-- On Windows delve must be run attached or it crashes.
-- See https://github.com/leoluz/nvim-dap-go/blob/main/README.md#configuring
detached = vim.fn.has 'win32' == 0,
},
}
end,
} }

View File

@ -2,60 +2,56 @@
-- 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.
return { vim.pack.add { 'https://github.com/lewis6991/gitsigns.nvim' }
{
'lewis6991/gitsigns.nvim',
opts = {
on_attach = function(bufnr)
local gitsigns = require 'gitsigns'
local function map(mode, l, r, opts) require('gitsigns').setup {
opts = opts or {} on_attach = function(bufnr)
opts.buffer = bufnr local gitsigns = require 'gitsigns'
vim.keymap.set(mode, l, r, opts)
end
-- Navigation local function map(mode, l, r, opts)
map('n', ']c', function() opts = opts or {}
if vim.wo.diff then opts.buffer = bufnr
vim.cmd.normal { ']c', bang = true } vim.keymap.set(mode, l, r, opts)
else end
gitsigns.nav_hunk 'next'
end
end, { desc = 'Jump to next git [c]hange' })
map('n', '[c', function() -- Navigation
if vim.wo.diff then map('n', ']c', function()
vim.cmd.normal { '[c', bang = true } if vim.wo.diff then
else vim.cmd.normal { ']c', bang = true }
gitsigns.nav_hunk 'prev' else
end gitsigns.nav_hunk 'next'
end, { desc = 'Jump to previous git [c]hange' }) end
end, { desc = 'Jump to next git [c]hange' })
-- Actions map('n', '[c', function()
-- visual mode if vim.wo.diff then
map('v', '<leader>hs', function() vim.cmd.normal { '[c', bang = true }
gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v' } else
end, { desc = 'git [s]tage hunk' }) gitsigns.nav_hunk 'prev'
map('v', '<leader>hr', function() end
gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v' } end, { desc = 'Jump to previous git [c]hange' })
end, { desc = 'git [r]eset hunk' })
-- normal mode -- Actions
map('n', '<leader>hs', gitsigns.stage_hunk, { desc = 'git [s]tage hunk' }) -- visual mode
map('n', '<leader>hr', gitsigns.reset_hunk, { desc = 'git [r]eset hunk' }) map('v', '<leader>hs', function() gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v' } end, { desc = 'git [s]tage hunk' })
map('n', '<leader>hS', gitsigns.stage_buffer, { desc = 'git [S]tage buffer' }) map('v', '<leader>hr', function() gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v' } end, { desc = 'git [r]eset hunk' })
map('n', '<leader>hu', gitsigns.stage_hunk, { desc = 'git [u]ndo stage hunk' }) -- normal mode
map('n', '<leader>hR', gitsigns.reset_buffer, { desc = 'git [R]eset buffer' }) map('n', '<leader>hs', gitsigns.stage_hunk, { desc = 'git [s]tage hunk' })
map('n', '<leader>hp', gitsigns.preview_hunk, { desc = 'git [p]review hunk' }) map('n', '<leader>hr', gitsigns.reset_hunk, { desc = 'git [r]eset hunk' })
map('n', '<leader>hb', gitsigns.blame_line, { desc = 'git [b]lame line' }) map('n', '<leader>hS', gitsigns.stage_buffer, { desc = 'git [S]tage buffer' })
map('n', '<leader>hd', gitsigns.diffthis, { desc = 'git [d]iff against index' }) map('n', '<leader>hR', gitsigns.reset_buffer, { desc = 'git [R]eset buffer' })
map('n', '<leader>hD', function() map('n', '<leader>hp', gitsigns.preview_hunk, { desc = 'git [p]review hunk' })
gitsigns.diffthis '@' map('n', '<leader>hi', gitsigns.preview_hunk_inline, { desc = 'git preview hunk [i]nline' })
end, { desc = 'git [D]iff against last commit' }) map('n', '<leader>hb', function() gitsigns.blame_line { full = true } end, { desc = 'git [b]lame line' })
-- Toggles map('n', '<leader>hd', gitsigns.diffthis, { desc = 'git [d]iff against index' })
map('n', '<leader>tb', gitsigns.toggle_current_line_blame, { desc = '[T]oggle git show [b]lame line' }) map('n', '<leader>hD', function() gitsigns.diffthis '@' end, { desc = 'git [D]iff against last commit' })
map('n', '<leader>tD', gitsigns.preview_hunk_inline, { desc = '[T]oggle git show [D]eleted' }) map('n', '<leader>hQ', function() gitsigns.setqflist 'all' end, { desc = 'git hunk [Q]uickfix list (all files in repo)' })
end, map('n', '<leader>hq', gitsigns.setqflist, { desc = 'git hunk [q]uickfix list (all changes in this file)' })
}, -- 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, { desc = '[T]oggle git intra-line [w]ord diff' })
-- Text object
map({ 'o', 'x' }, 'ih', gitsigns.select_hunk)
end,
} }

View File

@ -1,9 +1,6 @@
return { -- Add indentation guides even on blank lines
{ -- Add indentation guides even on blank lines
'lukas-reineke/indent-blankline.nvim', -- Enable `lukas-reineke/indent-blankline.nvim`
-- Enable `lukas-reineke/indent-blankline.nvim` -- See `:help ibl`
-- See `:help ibl` vim.pack.add { 'https://github.com/lukas-reineke/indent-blankline.nvim' }
main = 'ibl', require('ibl').setup {}
opts = {},
},
}

View File

@ -1,60 +1,53 @@
return { -- Linting
{ -- Linting vim.pack.add { 'https://github.com/mfussenegger/nvim-lint' }
'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, local lint = require 'lint'
-- instead set linters_by_ft like this: lint.linters_by_ft = {
-- lint.linters_by_ft = lint.linters_by_ft or {} markdown = { 'markdownlint' }, -- Make sure to install `markdownlint` via mason / npm
-- 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()
-- 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.bo.modifiable then
lint.try_lint()
end
end,
})
end,
},
} }
-- 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()
-- 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.bo.modifiable then lint.try_lint() end
end,
})

View File

@ -1,4 +1,26 @@
-- 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
return {} local plugins = {
{ src = 'https://github.com/nvim-neo-tree/neo-tree.nvim', version = vim.version.range '*' },
'https://github.com/nvim-lua/plenary.nvim',
'https://github.com/MunifTanjim/nui.nvim',
}
if vim.g.have_nerd_font then
table.insert(plugins, 'https://github.com/nvim-tree/nvim-web-devicons') -- not strictly required, but recommended
end
vim.pack.add(plugins)
vim.keymap.set('n', '\\', '<Cmd>Neotree reveal<CR>', { desc = 'NeoTree reveal', silent = true })
require('neo-tree').setup {
filesystem = {
window = {
mappings = {
['\\'] = 'close_window',
},
},
},
}