Skip to content

Commit bbed5b0

Browse files
committed
Squashed commit of the following:
commit 56b9114 Author: Richard Macklin <1863540+rmacklin@users.noreply.github.com> Date: Mon Jul 22 10:00:35 2024 -0700 Update comment about the toggle inlay hints keymap (nvim-lua#1041) commit 6f3fe35 Author: srdtrk <59252793+srdtrk@users.noreply.github.com> Date: Mon Jul 22 04:21:21 2024 +0200 lint: fix lsp warning in `vim.lsp.inlay_hint.is_enabled` (nvim-lua#947) * fix: lsp warning * review suggestion Co-authored-by: Tom Kuson <mail@tjkuson.me> --------- Co-authored-by: Tom Kuson <mail@tjkuson.me> commit 6207327 Author: Richard Macklin <1863540+rmacklin@users.noreply.github.com> Date: Sun Jul 21 19:08:09 2024 -0700 Update lazydev config to fix "Undefined field `fs_stat`" LSP error (nvim-lua#1040) 7513ec8 switched from neodev to lazydev, but in the process it introduced an LSP error in `init.lua`, which degrades the desired "first timer" experience of kickstart.nvim. This commit follows the configuration suggested in https://github.com/folke/lazydev.nvim/tree/6184ebbbc8045d70077659b7d30c705a588dc62f#-installation which resolves the LSP error. commit 7513ec8 Author: Vladislav Grechannik <52157081+VlaDexa@users.noreply.github.com> Date: Mon Jul 22 02:35:07 2024 +0200 Neovim 0.10 updates (nvim-lua#936) * Neovim 0.10 updates Provide the buffer for which to enable inlay hints Co-authored-by: Matt Mirus <matt@mattmirus.com> * refactor: replace vim.loop with vim.uv * Upgrade folke/neodev (sunsetting) to folke/lazydev * Update checkhealth for 0.10 release --------- Co-authored-by: Matt Mirus <matt@mattmirus.com> Co-authored-by: mrr11k <me+github@mrr11k.dev> Co-authored-by: Seb Tomasini <sebt@qgates.com> commit 07a9f44 Author: Richard Macklin <1863540+rmacklin@users.noreply.github.com> Date: Sun Jul 21 13:34:51 2024 -0700 Fix comment about mini.ai example (nvim-lua#985) This example wasn't using `'` so this makes more sense commit b36d84d Author: Vladislav Grechannik <52157081+VlaDexa@users.noreply.github.com> Date: Sun Jul 21 22:34:17 2024 +0200 Make conform.nvim be lazy-loadable again (nvim-lua#977) The PR that disabled lazy loading (nvim-lua#818) was to fix plugin not being loaded before write. This sets up lazy to load conform before write. commit c405d3f Author: Artyom <84637383+MZhuvka@users.noreply.github.com> Date: Sun Jul 21 23:33:26 2024 +0300 Update README.md | %userprofile%\appdata\local -> %localappdata% (nvim-lua#963) - Replace `%userprofile%\AppData\Local\nvim\` and `$env:USERPROFILE\AppData\Local\nvim` to `%localappdata%\nvim` and `$env:LOCALAPPDATA\nvim respectfully` commit 4bbca64 Author: Vladislav Grechannik <52157081+VlaDexa@users.noreply.github.com> Date: Sun Jul 21 22:24:57 2024 +0200 Make debug lazy loadable (nvim-lua#978) commit 1cdf6fb Author: Tom Kuson <mail@tjkuson.me> Date: Sun Jul 21 22:22:44 2024 +0200 Remove redundant require (nvim-lua#959) commit 202910d Author: Damjan 9000 <damjan.9000@gmail.com> Date: Sun Jul 21 22:22:10 2024 +0200 Fix neo-tree keymap description (nvim-lua#932) The lazy.nvim keys parameter does not need the `desc` to be inside a table in the way that vim.keymap.set() does. With this fix the keymap description will be properly shown for example in telescope keymap search commit 2df5137 Author: TJ DeVries <devries.timothyj@gmail.com> Date: Wed Jul 17 21:37:31 2024 -0400 fix: add required parsers from nvim-treesitter commit 3e55ff1 Author: Folke Lemaitre <folke.lemaitre@gmail.com> Date: Tue Jul 16 18:06:47 2024 +0200 fix(lazy): added error handling for bootstrap (nvim-lua#1001) commit f5c9195 Author: Vladislav Grechannik <52157081+VlaDexa@users.noreply.github.com> Date: Tue Jul 16 18:05:40 2024 +0200 which-key v3 update (nvim-lua#1022) * which-key v3 update * remove unneeded brackets from which-key registration
1 parent 2dedc77 commit bbed5b0

File tree

8 files changed

+58
-59
lines changed

8 files changed

+58
-59
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ Neovim's configurations are located under the following paths, depending on your
4646
| OS | PATH |
4747
| :- | :--- |
4848
| Linux, MacOS | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` |
49-
| Windows (cmd)| `%userprofile%\AppData\Local\nvim\` |
50-
| Windows (powershell)| `$env:USERPROFILE\AppData\Local\nvim\` |
49+
| Windows (cmd)| `%localappdata%\nvim\` |
50+
| Windows (powershell)| `$env:LOCALAPPDATA\nvim\` |
5151

5252
#### Recommended Step
5353

@@ -77,13 +77,13 @@ git clone https://github.com/cdf144/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME
7777
If you're using `cmd.exe`:
7878

7979
```
80-
git clone https://github.com/cdf144/kickstart.nvim.git %userprofile%\AppData\Local\nvim\
80+
git clone https://github.com/cdf144/kickstart.nvim.git %localappdata%\nvim\
8181
```
8282

8383
If you're using `powershell.exe`
8484

8585
```
86-
git clone https://github.com/cdf144/kickstart.nvim.git $env:USERPROFILE\AppData\Local\nvim\
86+
git clone https://github.com/cdf144/kickstart.nvim.git $env:LOCALAPPDATA\nvim\
8787
```
8888

8989
</details>

init.lua

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,10 @@ vim.api.nvim_create_autocmd('TextYankPost', {
238238
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
239239
if not vim.uv.fs_stat(lazypath) then
240240
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
241-
vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath }
241+
local out = vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath }
242+
if vim.v.shell_error ~= 0 then
243+
error('Error cloning lazy.nvim:\n' .. out)
244+
end
242245
end ---@diagnostic disable-next-line: undefined-field
243246
vim.opt.rtp:prepend(lazypath)
244247

@@ -255,7 +258,6 @@ vim.opt.rtp:prepend(lazypath)
255258
-- NOTE: Here is where you install your plugins.
256259
require('lazy').setup({
257260
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
258-
259261
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
260262
'tpope/vim-fugitive',
261263
'dstein64/nvim-scrollview',
@@ -457,7 +459,17 @@ require('lazy').setup({
457459

458460
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins
459461
-- used for completion, annotations and signatures of Neovim apis
460-
{ 'folke/lazydev.nvim', ft = 'lua', opts = {} },
462+
{
463+
'folke/lazydev.nvim',
464+
ft = 'lua',
465+
opts = {
466+
library = {
467+
-- Load luvit types when the `vim.uv` word is found
468+
{ path = 'luvit-meta/library', words = { 'vim%.uv' } },
469+
},
470+
},
471+
},
472+
{ 'Bilal2453/luvit-meta', lazy = true },
461473
},
462474
config = function()
463475
-- Brief aside: **What is LSP?**
@@ -567,7 +579,7 @@ require('lazy').setup({
567579
})
568580
end
569581

570-
-- The following autocommand is used to enable inlay hints in your
582+
-- The following code creates a keymap to toggle inlay hints in your
571583
-- code, if the language server you are using supports them
572584
--
573585
-- This may be unwanted, since they displace some of your code
@@ -599,12 +611,6 @@ require('lazy').setup({
599611
-- clangd = {},
600612
-- gopls = {},
601613
pyright = {},
602-
ruff = {
603-
on_attach = function(client, _)
604-
-- Disable hover in favor of Pyright
605-
client.server_capabilities.hoverProvider = false
606-
end,
607-
},
608614
marksman = {},
609615
html = {}, -- Includes formatter
610616
cssls = {}, -- Includes formatter
@@ -625,8 +631,6 @@ require('lazy').setup({
625631
-- client.resolved_capabilities.document_formatting = false
626632
end,
627633
},
628-
--
629-
630634
lua_ls = {
631635
-- cmd = {...},
632636
-- filetypes = { ...},
@@ -641,7 +645,12 @@ require('lazy').setup({
641645
},
642646
},
643647
},
644-
648+
ruff = {
649+
on_attach = function(client, _)
650+
-- Disable hover in favor of Pyright
651+
client.server_capabilities.hoverProvider = false
652+
end,
653+
},
645654
bashls = {
646655
filetypes = { 'sh' },
647656
},
@@ -688,7 +697,8 @@ require('lazy').setup({
688697

689698
{ -- Autoformat
690699
'stevearc/conform.nvim',
691-
lazy = false,
700+
event = { 'BufWritePre' },
701+
cmd = { 'ConformInfo' },
692702
keys = {
693703
{
694704
'<leader>f',
@@ -722,7 +732,6 @@ require('lazy').setup({
722732
mysql = { 'sql_formatter' },
723733
sh = { 'shfmt' },
724734
zsh = { 'shfmt' },
725-
726735
python = function(bufnr)
727736
if require('conform').get_formatter_info('ruff_format', bufnr).available then
728737
return { 'ruff_fix', 'ruff_format' }
@@ -908,7 +917,7 @@ require('lazy').setup({
908917
--
909918
-- Examples:
910919
-- - va) - [V]isually select [A]round [)]paren
911-
-- - yinq - [Y]ank [I]nside [N]ext [']quote
920+
-- - yinq - [Y]ank [I]nside [N]ext [Q]uote
912921
-- - ci' - [C]hange [I]nside [']quote
913922
require('mini.ai').setup { n_lines = 500 }
914923

@@ -942,7 +951,7 @@ require('lazy').setup({
942951
'nvim-treesitter/nvim-treesitter',
943952
build = ':TSUpdate',
944953
opts = {
945-
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'vim', 'vimdoc' },
954+
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' },
946955
-- Autoinstall languages that are not installed
947956
auto_install = true,
948957
highlight = {
@@ -983,7 +992,7 @@ require('lazy').setup({
983992
require 'kickstart.plugins.debug',
984993
require 'kickstart.plugins.indent_line',
985994
-- require 'kickstart.plugins.lint',
986-
-- require 'kickstart.plugins.autopairs',
995+
require 'kickstart.plugins.autopairs',
987996
-- require 'kickstart.plugins.neo-tree',
988997
require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
989998

lua/custom/plugins/coding/autopairs.lua

Lines changed: 0 additions & 13 deletions
This file was deleted.

lua/custom/plugins/init.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
--
44
-- See the kickstart.nvim README for more information
55
return {
6-
{ import = 'custom.plugins.coding' },
76
{ import = 'custom.plugins.colorscheme' },
87
{ import = 'custom.plugins.editor' },
98
{ import = 'custom.plugins.lang' },

lua/kickstart/health.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
--]]
77

88
local check_version = function()
9-
local verstr = string.format('%s.%s.%s', vim.version().major, vim.version().minor, vim.version().patch)
10-
if not vim.version.cmp then
9+
local verstr = tostring(vim.version())
10+
if not vim.version.ge then
1111
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
1212
return
1313
end
1414

15-
if vim.version.cmp(vim.version(), { 0, 9, 4 }) >= 0 then
15+
if vim.version.ge(vim.version(), '0.10-dev') then
1616
vim.health.ok(string.format("Neovim version is: '%s'", verstr))
1717
else
1818
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))

lua/kickstart/plugins/debug.lua

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,28 @@ return {
2525
'leoluz/nvim-dap-go',
2626
'mfussenegger/nvim-dap-python',
2727
},
28-
event = 'VeryLazy',
28+
keys = function(_, keys)
29+
local dap = require 'dap'
30+
local dapui = require 'dapui'
31+
return {
32+
-- Basic debugging keymaps, feel free to change to your liking!
33+
{ '<leader>dc', dap.continue, desc = '[D]ebug: Start / [C]ontinue' },
34+
{ '<leader>di', dap.step_into, desc = '[D]ebug: Step [I]nto' },
35+
{ '<leader>do', dap.step_over, desc = '[D]ebug: Step [O]ver' },
36+
{ '<leader>du', dap.step_out, desc = '[D]ebug: Step O[u]t' },
37+
{ '<leader>db', dap.toggle_breakpoint, desc = '[D]ebug: Toggle [B]reakpoint' },
38+
{
39+
'<leader>dB',
40+
function()
41+
dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ')
42+
end,
43+
desc = '[D]ebug: Set [B]reakpoint',
44+
},
45+
-- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
46+
{ '<leader>', dapui.toggle, desc = 'Debug: See last session result.' },
47+
unpack(keys),
48+
}
49+
end,
2950
config = function()
3051
local dap = require 'dap'
3152
local dapui = require 'dapui'
@@ -50,16 +71,6 @@ return {
5071
},
5172
}
5273

53-
-- Basic debugging keymaps, feel free to change to your liking!
54-
vim.keymap.set('n', '<leader>dc', dap.continue, { desc = '[D]ebug: Start / [C]ontinue' })
55-
vim.keymap.set('n', '<leader>di', dap.step_into, { desc = '[D]ebug: Step [I]nto' })
56-
vim.keymap.set('n', '<leader>do', dap.step_over, { desc = '[D]ebug: Step [O]ver' })
57-
vim.keymap.set('n', '<leader>du', dap.step_out, { desc = '[D]ebug: Step O[u]t' })
58-
vim.keymap.set('n', '<leader>db', dap.toggle_breakpoint, { desc = '[D]ebug: Toggle [b]reakpoint' })
59-
vim.keymap.set('n', '<leader>dB', function()
60-
dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ')
61-
end, { desc = '[D]ebug: Set [B]reakpoint' })
62-
6374
-- Dap UI setup
6475
-- For more information, see `:help nvim-dap-ui`
6576
---@diagnostic disable-next-line: missing-fields
@@ -84,13 +95,6 @@ return {
8495
},
8596
}
8697

87-
-- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
88-
vim.keymap.set('n', '<leader>dt', dapui.toggle, { desc = '[D]ebug: [T]oggle DAP-UI / See last session result.' })
89-
-- Reset DAP-UI
90-
vim.keymap.set('n', '<leader>dr', function()
91-
dapui.open { reset = true }
92-
end, { desc = '[D]ebug: Open [R]esetted DAP-UI' })
93-
9498
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
9599
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
96100
dap.listeners.before.event_exited['dapui_config'] = dapui.close

lua/kickstart/plugins/lint.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ return {
4747
vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, {
4848
group = lint_augroup,
4949
callback = function()
50-
require('lint').try_lint()
50+
lint.try_lint()
5151
end,
5252
})
5353
end,

lua/kickstart/plugins/neo-tree.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ return {
1111
},
1212
cmd = 'Neotree',
1313
keys = {
14-
{ '\\', ':Neotree reveal<CR>', { desc = 'NeoTree reveal' } },
14+
{ '\\', ':Neotree reveal<CR>', desc = 'NeoTree reveal' },
1515
},
1616
opts = {
1717
filesystem = {

0 commit comments

Comments
 (0)