all repos

init.lua @ 438e22cc113ddb2b22f08929d19a880cfb68a973

my nvim config
1 files changed, 4 insertions(+), 4 deletions(-)
fix(lsp): errors when there's no diagnostics
Author: Smirnov Oleksandr ss2316544@gmail.com
Committed at: 2024-12-13 18:28:32 +0200
Parent: 679a78c
M lua/plugins/lsp/attach.lua

@@ -17,17 +17,17 @@ u.map("n", "<leader>lf", function()

vim.lsp.buf.format { async = true } end, bufnr) u.map("n", "]d", function() - vim.diagnostic.jump { count = 1, float = false } + pcall(vim.diagnostic.jump, { count = 1, float = false }) end, bufnr) u.map("n", "[d", function() - vim.diagnostic.jump { count = -1, float = false } + pcall(vim.diagnostic.jump, { count = -1, float = false }) end, bufnr) u.map("n", "]D", function() - vim.diagnostic.jump { count = 1 } + pcall(vim.diagnostic.jump, { count = 1 }) end, bufnr) u.map("n", "[D", function() - vim.diagnostic.jump { count = -1 } + pcall(vim.diagnostic.jump, { count = -1 }) end, bufnr) u.map("n", "K", vim.lsp.buf.hover, bufnr)