feat: enhance diagnostic keymaps setup and configure diagnostic display
Signed-off-by: juliano.barbosa <julianomb@gmail.com>
This commit is contained in:
		
							parent
							
								
									cd94dc4bf0
								
							
						
					
					
						commit
						031020cb9d
					
				
							
								
								
									
										14
									
								
								init.lua
								
								
								
								
							
							
						
						
									
										14
									
								
								init.lua
								
								
								
								
							| 
						 | 
					@ -171,7 +171,12 @@ vim.opt.scrolloff = 10
 | 
				
			||||||
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
 | 
					vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- Diagnostic keymaps
 | 
					-- Diagnostic keymaps
 | 
				
			||||||
 | 
					-- 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', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
 | 
					    vim.keymap.set('n', '<leader>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
 | 
					-- 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 <C-\><C-n>, which
 | 
					-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
 | 
				
			||||||
| 
						 | 
					@ -234,6 +239,15 @@ vim.keymap.set('n', '<leader>taa', ':!make applyA<CR>', opts)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- [[ JMB End ]]
 | 
					-- [[ 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 ]]
 | 
					-- [[ Install `lazy.nvim` plugin manager ]]
 | 
				
			||||||
--    See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
 | 
					--    See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
 | 
				
			||||||
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
 | 
					local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue