1 Commits

14 changed files with 547 additions and 613 deletions

View File

@@ -11,7 +11,7 @@ assignees: ''
## Before Reporting an Issue ## Before Reporting an Issue
- I have read the kickstart.nvim README.md. - I have read the kickstart.nvim README.md.
- I have read the appropriate plugin's documentation. - I have read the appropiate plugin's documentation.
- I have searched that this issue has not been reported before. - I have searched that this issue has not been reported before.
- [ ] **By checking this, I confirm that the above steps are completed. I understand leaving this unchecked will result in this report being closed immediately.** - [ ] **By checking this, I confirm that the above steps are completed. I understand leaving this unchecked will result in this report being closed immediately.**

View File

@@ -9,12 +9,13 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout Code - name: Checkout Code
uses: actions/checkout@v6 uses: actions/checkout@v2
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@v4 uses: JohnnyMorganz/stylua-action@v3
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
version: latest version: latest
args: --check . args: --check .

7
.gitignore vendored
View File

@@ -4,11 +4,4 @@ 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

View File

@@ -4,4 +4,3 @@ 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"

123
README.md
View File

@@ -17,38 +17,28 @@ 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 at least the latest If you are experiencing issues, please make sure you have the latest versions.
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
- Emoji fonts (Ubuntu only, and only if you want emoji!) `sudo apt install fonts-noto-color-emoji`
- Language Setup: - Language Setup:
- If you want to write Typescript, you need `npm` - If you want to write Typescript, you need `npm`
- 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:
@@ -65,7 +55,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`
@@ -74,8 +64,7 @@ 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
@@ -162,7 +151,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
@@ -193,7 +182,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 tree-sitter choco install -y neovim git ripgrep wget fd unzip gzip mingw make
``` ```
</details> </details>
<details><summary>WSL (Windows Subsystem for Linux)</summary> <details><summary>WSL (Windows Subsystem for Linux)</summary>
@@ -203,7 +192,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 fd-find tree-sitter-cli unzip git xclip neovim sudo apt install make gcc ripgrep unzip git xclip neovim
``` ```
</details> </details>
@@ -213,111 +202,37 @@ sudo apt install make gcc ripgrep fd-find tree-sitter-cli 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 fd-find tree-sitter-cli unzip git xclip neovim sudo apt install make gcc ripgrep 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 fd-find tree-sitter-cli unzip git xclip curl sudo apt install make gcc ripgrep 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-linux64.tar.gz
sudo rm -rf /opt/nvim-linux-x86_64 sudo rm -rf /opt/nvim-linux64
sudo mkdir -p /opt/nvim-linux-x86_64 sudo mkdir -p /opt/nvim-linux64
sudo chmod a+rX /opt/nvim-linux-x86_64 sudo chmod a+rX /opt/nvim-linux64
sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz sudo tar -C /opt -xzf nvim-linux64.tar.gz
# make it available in /usr/local/bin, distro installs to /usr/bin # 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/ sudo ln -sf /opt/nvim-linux64/bin/nvim /usr/local/bin/
``` ```
</details> </details>
<details><summary>Fedora Install Steps</summary> <details><summary>Fedora Install Steps</summary>
``` ```
sudo dnf install -y gcc make git ripgrep fd-find tree-sitter-cli unzip neovim sudo dnf install -y gcc make git ripgrep fd-find 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 tree-sitter-cli unzip neovim sudo pacman -S --noconfirm --needed gcc make git ripgrep fd 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>

708
init.lua

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,4 @@
-- 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 {}

View File

@@ -12,7 +12,7 @@ local check_version = function()
return return
end end
if vim.version.ge(vim.version(), '0.11') then if vim.version.ge(vim.version(), '0.10-dev') 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,10 +1,16 @@
-- 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',
opts = {}, -- 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,
} }

View File

@@ -6,8 +6,6 @@
-- 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',
@@ -20,7 +18,7 @@ return {
'nvim-neotest/nvim-nio', 'nvim-neotest/nvim-nio',
-- Installs the debug adapters for you -- Installs the debug adapters for you
'mason-org/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
@@ -28,14 +26,56 @@ 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' }, {
{ '<F1>', function() require('dap').step_into() end, desc = 'Debug: Step Into' }, '<F5>',
{ '<F2>', function() require('dap').step_over() end, desc = 'Debug: Step Over' }, function()
{ '<F3>', function() require('dap').step_out() end, desc = 'Debug: Step Out' }, require('dap').continue()
{ '<leader>b', function() require('dap').toggle_breakpoint() end, desc = 'Debug: Toggle Breakpoint' }, end,
{ '<leader>B', function() require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ') end, desc = 'Debug: Set Breakpoint' }, desc = 'Debug: Start/Continue',
},
{
'<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'
@@ -60,13 +100,11 @@ 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 = '',

View File

@@ -2,62 +2,60 @@
-- 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', {
---@module 'gitsigns' 'lewis6991/gitsigns.nvim',
---@type Gitsigns.Config opts = {
---@diagnostic disable-next-line: missing-fields on_attach = function(bufnr)
opts = { local gitsigns = require 'gitsigns'
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' })
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() gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v' } end, { desc = 'git [s]tage hunk' }) vim.cmd.normal { '[c', bang = true }
map('v', '<leader>hr', function() gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v' } end, { desc = 'git [r]eset hunk' }) else
-- normal mode gitsigns.nav_hunk 'prev'
map('n', '<leader>hs', gitsigns.stage_hunk, { desc = 'git [s]tage hunk' }) end
map('n', '<leader>hr', gitsigns.reset_hunk, { desc = 'git [r]eset hunk' }) end, { desc = 'Jump to previous git [c]hange' })
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)
-- Text object -- Actions
map({ 'o', 'x' }, 'ih', gitsigns.select_hunk) -- visual mode
end, map('v', '<leader>hs', function()
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.undo_stage_hunk, { desc = 'git [u]ndo stage hunk' })
map('n', '<leader>hR', gitsigns.reset_buffer, { desc = 'git [R]eset buffer' })
map('n', '<leader>hp', gitsigns.preview_hunk, { desc = 'git [p]review hunk' })
map('n', '<leader>hb', gitsigns.blame_line, { desc = 'git [b]lame line' })
map('n', '<leader>hd', gitsigns.diffthis, { desc = 'git [d]iff against index' })
map('n', '<leader>hD', function()
gitsigns.diffthis '@'
end, { desc = 'git [D]iff against last commit' })
-- Toggles
map('n', '<leader>tb', gitsigns.toggle_current_line_blame, { desc = '[T]oggle git show [b]lame line' })
map('n', '<leader>tD', gitsigns.toggle_deleted, { desc = '[T]oggle git show [D]eleted' })
end,
},
}, },
} }

View File

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

View File

@@ -1,59 +1,60 @@
-- 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
}
-- To allow other plugins to add linters to require('lint').linters_by_ft, { -- Linting
-- instead set linters_by_ft like this: 'mfussenegger/nvim-lint',
-- lint.linters_by_ft = lint.linters_by_ft or {} event = { 'BufReadPre', 'BufNewFile' },
-- lint.linters_by_ft['markdown'] = { 'markdownlint' } config = function()
-- local lint = require 'lint'
-- However, note that this will enable a set of default linters, lint.linters_by_ft = {
-- which will cause errors unless these tools are available: markdown = { 'markdownlint' },
-- { }
-- 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 -- To allow other plugins to add linters to require('lint').linters_by_ft,
-- on the specified events. -- instead set linters_by_ft like this:
local lint_augroup = vim.api.nvim_create_augroup('lint', { clear = true }) -- lint.linters_by_ft = lint.linters_by_ft or {}
vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, { -- lint.linters_by_ft['markdown'] = { 'markdownlint' }
group = lint_augroup, --
callback = function() -- However, note that this will enable a set of default linters,
-- Only run the linter in buffers that you can modify in order to -- which will cause errors unless these tools are available:
-- avoid superfluous noise, notably within the handy LSP pop-ups that -- {
-- describe the hovered symbol using Markdown. -- clojure = { "clj-kondo" },
if vim.bo.modifiable then lint.try_lint() end -- dockerfile = { "hadolint" },
end, -- inko = { "inko" },
}) -- janet = { "janet" },
end, -- 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.opt_local.modifiable:get() then
lint.try_lint()
end
end,
})
end,
},
} }

View File

@@ -1,8 +1,6 @@
-- 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 = '*',
@@ -11,12 +9,10 @@ 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',
}, },
lazy = false, cmd = 'Neotree',
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 = {