Compare commits

..

No commits in common. "174b5fa2b13e7107a05e974e44f9bf59dece95f9" and "4b065ad2f71935b8b053d26a65735f40bdc85969" have entirely different histories.

11 changed files with 1093 additions and 1057 deletions

4
.gitignore vendored
View File

@ -6,9 +6,9 @@ nvim
spell/ spell/
# In your personal fork, you likely want to comment this, since it's recommended to track # 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 # 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 # For the official `nvim-lua/kickstart.nvim` git repository, we leave it ignored to avoid unneeded
# merge conflicts. # merge conflicts.
nvim-pack-lock.json lazy-lock.json
.DS_Store .DS_Store

View File

@ -69,9 +69,9 @@ fork to your machine using one of the commands below, depending on your OS.
> 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`
You likely want to remove `nvim-pack-lock.json` from your fork's `.gitignore` You likely want to remove `lazy-lock.json` from your fork's `.gitignore` file
file too - it's ignored in the kickstart repo to make maintenance easier, but too - it's ignored in the kickstart repo to make maintenance easier, but it's
it's recommended to track it in version control (see `:help vim.pack-lockfile`). [recommended to track it in version control](https://lazy.folke.io/usage/lockfile).
#### Clone kickstart.nvim #### Clone kickstart.nvim
@ -111,10 +111,8 @@ Start Neovim
nvim nvim
``` ```
That's it! `vim.pack` will install all the plugins from your config. Use That's it! Lazy will install all the plugins you have. Use `:Lazy` to view
`:lua vim.pack.update(nil, { offline = true })` to inspect plugin state and the current plugin status. Hit `q` to close the window.
`:lua vim.pack.update()` to fetch updates (`:write` applies updates, `:quit`
cancels them).
#### Read The Friendly Documentation #### Read The Friendly Documentation
@ -148,8 +146,7 @@ examples of adding popularly requested plugins.
`~/.local/share/nvim-kickstart`. You can apply this approach to any Neovim `~/.local/share/nvim-kickstart`. You can apply this approach to any Neovim
distribution that you would like to try out. distribution that you would like to try out.
* What if I want to "uninstall" this configuration: * What if I want to "uninstall" this configuration:
* Remove your config directory and local data directory (for example, * See [lazy.nvim uninstall](https://lazy.folke.io/usage#-uninstalling) information
`~/.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? * 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 * 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. configuration that someone can easily use to `git clone` as a basis for their own.
@ -170,36 +167,17 @@ After installing all the dependencies continue with the [Install Kickstart](#ins
#### Windows Installation #### Windows Installation
<details><summary>Windows with Microsoft C++ Build Tools and CMake</summary> <details><summary>Windows with Microsoft C++ Build Tools and CMake</summary>
Kickstart's default config is make-only for `telescope-fzf-native.nvim`. Installation may require installing build tools and updating the run command for `telescope-fzf-native`
If `make` is unavailable, the plugin is skipped.
Recommended: install `make` (see the chocolatey section below). See `telescope-fzf-native` documentation for [more details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation)
If you want a CMake-only setup, customize `init.lua` in two places: This requires:
1. Include `telescope-fzf-native.nvim` when `cmake` is available: - Install CMake and the Microsoft C++ Build Tools on Windows
```lua ```lua
if vim.fn.executable 'make' == 1 or vim.fn.executable 'cmake' == 1 then {'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }
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>
<details><summary>Windows with gcc/make using chocolatey</summary> <details><summary>Windows with gcc/make using chocolatey</summary>
Alternatively, one can install gcc and make which don't require changing the config, Alternatively, one can install gcc and make which don't require changing the config,

1645
init.lua

File diff suppressed because it is too large Load Diff

View File

@ -3,11 +3,6 @@
-- --
-- See the kickstart.nvim README for more information -- See the kickstart.nvim README for more information
-- Iterate over all Lua files in the plugins directory and load them ---@module 'lazy'
local plugins_dir = vim.fs.joinpath(vim.fn.stdpath 'config', 'lua', 'custom', 'plugins') ---@type LazySpec
for file_name, type in vim.fs.dir(plugins_dir) do return {}
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.12') 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))

View File

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

View File

@ -6,90 +6,105 @@
-- 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 ;)
vim.pack.add { ---@module 'lazy'
'https://github.com/mfussenegger/nvim-dap', ---@type LazySpec
'https://github.com/rcarriga/nvim-dap-ui', return {
'https://github.com/nvim-neotest/nvim-nio', -- NOTE: Yes, you can install new plugins here!
'https://github.com/mason-org/mason.nvim', 'mfussenegger/nvim-dap',
'https://github.com/jay-babu/mason-nvim-dap.nvim', -- NOTE: And you can specify dependencies as well
'https://github.com/leoluz/nvim-dap-go', dependencies = {
} -- Creates a beautiful debugger UI
'rcarriga/nvim-dap-ui',
-- Basic debugging keymaps, feel free to change to your liking! -- Required dependency for nvim-dap-ui
vim.keymap.set('n', '<F5>', function() require('dap').continue() end, { desc = 'Debug: Start/Continue' }) 'nvim-neotest/nvim-nio',
vim.keymap.set('n', '<F1>', function() require('dap').step_into() end, { desc = 'Debug: Step Into' })
vim.keymap.set('n', '<F2>', function() require('dap').step_over() end, { desc = 'Debug: Step Over' })
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' })
vim.keymap.set('n', '<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.
vim.keymap.set('n', '<F7>', function() require('dapui').toggle() end, { desc = 'Debug: See last session result.' })
local dap = require 'dap' -- Installs the debug adapters for you
local dapui = require 'dapui' 'mason-org/mason.nvim',
'jay-babu/mason-nvim-dap.nvim',
require('mason-nvim-dap').setup { -- Add your own debuggers here
-- Makes a best effort to setup the various debuggers with 'leoluz/nvim-dap-go',
-- reasonable debug configurations
automatic_installation = true,
-- You can provide additional configuration to the handlers,
-- see mason-nvim-dap README for more information
handlers = {},
-- You'll need to check that you have the required things installed
-- online, please don't ask me how to install them :)
ensure_installed = {
-- Update this to ensure that you have the debuggers for the langs you want
'delve',
}, },
} keys = {
-- Basic debugging keymaps, feel free to change to your liking!
-- Dap UI setup { '<F5>', function() require('dap').continue() end, desc = 'Debug: Start/Continue' },
-- For more information, see |:help nvim-dap-ui| { '<F1>', function() require('dap').step_into() end, desc = 'Debug: Step Into' },
---@diagnostic disable-next-line: missing-fields { '<F2>', function() require('dap').step_over() end, desc = 'Debug: Step Over' },
dapui.setup { { '<F3>', function() require('dap').step_out() end, desc = 'Debug: Step Out' },
-- Set icons to characters that are more likely to work in every terminal. { '<leader>b', function() require('dap').toggle_breakpoint() end, desc = 'Debug: Toggle Breakpoint' },
-- Feel free to remove or use ones that you like more! :) { '<leader>B', function() require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ') end, desc = 'Debug: Set Breakpoint' },
-- Don't feel like these are good choices. -- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
icons = { expanded = '', collapsed = '', current_frame = '*' }, { '<F7>', function() require('dapui').toggle() end, desc = 'Debug: See last session result.' },
---@diagnostic disable-next-line: missing-fields
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,
}, },
config = function()
local dap = require 'dap'
local dapui = require 'dapui'
require('mason-nvim-dap').setup {
-- Makes a best effort to setup the various debuggers with
-- reasonable debug configurations
automatic_installation = true,
-- You can provide additional configuration to the handlers,
-- see mason-nvim-dap README for more information
handlers = {},
-- You'll need to check that you have the required things installed
-- online, please don't ask me how to install them :)
ensure_installed = {
-- Update this to ensure that you have the debuggers for the langs you want
'delve',
},
}
-- Dap UI setup
-- For more information, see |:help nvim-dap-ui|
---@diagnostic disable-next-line: missing-fields
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 = '*' },
---@diagnostic disable-next-line: missing-fields
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,56 +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.
vim.pack.add { 'https://github.com/lewis6991/gitsigns.nvim' } ---@module 'lazy'
---@type LazySpec
return {
'lewis6991/gitsigns.nvim',
---@module 'gitsigns'
---@type Gitsigns.Config
---@diagnostic disable-next-line: missing-fields
opts = {
on_attach = function(bufnr)
local gitsigns = require 'gitsigns'
require('gitsigns').setup { local function map(mode, l, r, opts)
on_attach = function(bufnr) opts = opts or {}
local gitsigns = require 'gitsigns' opts.buffer = bufnr
vim.keymap.set(mode, l, r, opts)
local function map(mode, l, r, opts)
opts = opts or {}
opts.buffer = bufnr
vim.keymap.set(mode, l, r, opts)
end
-- Navigation
map('n', ']c', function()
if vim.wo.diff then
vim.cmd.normal { ']c', bang = true }
else
gitsigns.nav_hunk 'next'
end end
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, { desc = 'git hunk [Q]uickfix list (all files in repo)' })
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 -- 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>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, { desc = 'git hunk [Q]uickfix list (all files in repo)' })
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,6 +1,13 @@
-- Add indentation guides even on blank lines -- Add indentation guides even on blank lines
-- Enable `lukas-reineke/indent-blankline.nvim` ---@module 'lazy'
-- See `:help ibl` ---@type LazySpec
vim.pack.add { 'https://github.com/lukas-reineke/indent-blankline.nvim' } return {
require('ibl').setup {} 'lukas-reineke/indent-blankline.nvim',
-- Enable `lukas-reineke/indent-blankline.nvim`
-- See `:help ibl`
main = 'ibl',
---@module 'ibl'
---@type ibl.config
opts = {},
}

View File

@ -1,53 +1,59 @@
-- Linting -- Linting
vim.pack.add { 'https://github.com/mfussenegger/nvim-lint' } ---@module 'lazy'
---@type LazySpec
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
}
local lint = require 'lint' -- To allow other plugins to add linters to require('lint').linters_by_ft,
lint.linters_by_ft = { -- instead set linters_by_ft like this:
markdown = { 'markdownlint' }, -- Make sure to install `markdownlint` via mason / npm -- 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
-- 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" },
-- 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,
}) }

View File

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