all repos

init.lua @ 0908e01aa608488ca2bbf612faa03e34ee897c08

my nvim config
1 files changed, 5 insertions(+), 3 deletions(-)
refactor(lsp): update lsp things to newer version
Author: Oleksandr Smirnov olexsmir@gmail.com
Committed at: 2025-01-30 01:08:05 +0200
Parent: 727fe31
M lua/plugins/lsp/attach.lua

@@ -9,7 +9,9 @@ if not client then

error "couldn't get an lsp server" end - if client.supports_method "textDocument/codeLens" then + if + client:supports_method(vim.lsp.protocol.Methods.textDocument_codeLens) + then vim.lsp.codelens.refresh { bufnr = bufnr } end

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

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