diff --git a/.clinerules b/.clinerules new file mode 100644 index 00000000..e69de29b diff --git a/init.lua b/init.lua index 7a1ca46a..7c5675e7 100644 --- a/init.lua +++ b/init.lua @@ -171,7 +171,12 @@ vim.opt.scrolloff = 10 vim.keymap.set('n', '', 'nohlsearch') -- Diagnostic keymaps -vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' }) +-- Set up diagnostic keymaps only after VimEnter to ensure diagnostic module is loaded +vim.api.nvim_create_autocmd('VimEnter', { + callback = function() + vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' }) + end, +}) -- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier -- for people to discover. Otherwise, you normally need to press , which @@ -234,6 +239,15 @@ vim.keymap.set('n', 'taa', ':!make applyA', opts) -- [[ JMB End ]] +-- Configure diagnostic display +vim.diagnostic.config({ + virtual_text = true, + signs = true, + underline = true, + update_in_insert = false, + severity_sort = true, +}) + -- [[ Install `lazy.nvim` plugin manager ]] -- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'