@@ -37,13 +37,14 @@ I hope you enjoy your Neovim journey,
37
37
38
38
P.S. You can delete this when you're done too. It's your config now :)
39
39
--]]
40
+
40
41
-- Set <space> as the leader key
41
42
-- See `:help mapleader`
42
43
-- NOTE: Must happen before plugins are required (otherwise wrong leader will be used)
43
44
vim .g .mapleader = ' '
44
45
vim .g .maplocalleader = ' '
45
46
46
- -- Install package manager
47
+ -- [[ Install `lazy.nvim` plugin manager ]]
47
48
-- https://github.com/folke/lazy.nvim
48
49
-- `:help lazy.nvim.txt` for more info
49
50
local lazypath = vim .fn .stdpath ' data' .. ' /lazy/lazy.nvim'
@@ -59,6 +60,7 @@ if not vim.loop.fs_stat(lazypath) then
59
60
end
60
61
vim .opt .rtp :prepend (lazypath )
61
62
63
+ -- [[ Configure plugins ]]
62
64
-- NOTE: Here is where you install your plugins.
63
65
-- You can configure plugins using the `config` key.
64
66
--
@@ -281,6 +283,12 @@ vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
281
283
vim .keymap .set (' n' , ' k' , " v:count == 0 ? 'gk' : 'k'" , { expr = true , silent = true })
282
284
vim .keymap .set (' n' , ' j' , " v:count == 0 ? 'gj' : 'j'" , { expr = true , silent = true })
283
285
286
+ -- Diagnostic keymaps
287
+ vim .keymap .set (' n' , ' [d' , vim .diagnostic .goto_prev , { desc = ' Go to previous diagnostic message' })
288
+ vim .keymap .set (' n' , ' ]d' , vim .diagnostic .goto_next , { desc = ' Go to next diagnostic message' })
289
+ vim .keymap .set (' n' , ' <leader>e' , vim .diagnostic .open_float , { desc = ' Open floating diagnostic message' })
290
+ vim .keymap .set (' n' , ' <leader>q' , vim .diagnostic .setloclist , { desc = ' Open diagnostics list' })
291
+
284
292
-- [[ Highlight on yank ]]
285
293
-- See `:help vim.highlight.on_yank()`
286
294
local highlight_group = vim .api .nvim_create_augroup (' YankHighlight' , { clear = true })
@@ -433,12 +441,6 @@ vim.defer_fn(function()
433
441
}
434
442
end , 0 )
435
443
436
- -- Diagnostic keymaps
437
- vim .keymap .set (' n' , ' [d' , vim .diagnostic .goto_prev , { desc = ' Go to previous diagnostic message' })
438
- vim .keymap .set (' n' , ' ]d' , vim .diagnostic .goto_next , { desc = ' Go to next diagnostic message' })
439
- vim .keymap .set (' n' , ' <leader>e' , vim .diagnostic .open_float , { desc = ' Open floating diagnostic message' })
440
- vim .keymap .set (' n' , ' <leader>q' , vim .diagnostic .setloclist , { desc = ' Open diagnostics list' })
441
-
442
444
-- [[ Configure LSP ]]
443
445
-- This function gets run when an LSP connects to a particular buffer.
444
446
local on_attach = function (_ , bufnr )
0 commit comments