all repos

init.lua @ e378df7f8ca2cec50f292b5be411af0055e1f40e

my nvim config
1 files changed, 8 insertions(+), 4 deletions(-)
refactor(lsp.attach): remove deprecation wanrings

)
Author: Smirnov Oleksandr ss2316544@gmail.com
Committed at: 2024-07-26 23:41:05 +0300
Parent: 27ed58f
M lua/plugins/lsp/attach.lua

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

vim.lsp.buf.format { async = true } end, bufnr) u.map("n", "]d", function() - vim.diagnostic.goto_next { float = false } + vim.diagnostic.jump { count = 1, float = false } end, bufnr) u.map("n", "[d", function() - vim.diagnostic.goto_prev { float = false } + vim.diagnostic.jump { count = -1, float = false } end, bufnr) - u.map("n", "]D", vim.diagnostic.goto_next, bufnr) - u.map("n", "[D", vim.diagnostic.goto_prev, bufnr) + u.map("n", "]D", function() + vim.diagnostic.jump { count = 1 } + end, bufnr) + u.map("n", "[D", function() + vim.diagnostic.jump { count = -1 } + end, bufnr) u.map("n", "K", vim.lsp.buf.hover, bufnr) u.map("n", "gd", "<cmd>Telescope lsp_definitions<cr>", bufnr)