From d00cf25fdeba03e323615407fccc0d5acf6d210c Mon Sep 17 00:00:00 2001 From: Buliway Date: Thu, 23 Oct 2025 17:52:16 +0300 Subject: [PATCH] update neovim to 0.11 --- nixos/packages.nix | 2 +- nvim/lua/custom/plugins/rust.lua | 2 +- nvim/lua/kickstart/plugins/debug.lua | 2 +- nvim/lua/kickstart/plugins/lsp.lua | 13 +++++++++++-- nvim/lua/kickstart/settings.lua | 11 ++--------- 5 files changed, 16 insertions(+), 14 deletions(-) diff --git a/nixos/packages.nix b/nixos/packages.nix index 168e12f..250119a 100644 --- a/nixos/packages.nix +++ b/nixos/packages.nix @@ -476,7 +476,7 @@ ## IDE ## ######### - neovim + pkgs2.neovim ########### ## Icons ## diff --git a/nvim/lua/custom/plugins/rust.lua b/nvim/lua/custom/plugins/rust.lua index 610dfe1..058de05 100644 --- a/nvim/lua/custom/plugins/rust.lua +++ b/nvim/lua/custom/plugins/rust.lua @@ -3,7 +3,7 @@ return { { 'mrcjkb/rustaceanvim', - version = '^5', -- Recommended + version = '^6', -- Recommended lazy = false, -- This plugin is already lazy }, } diff --git a/nvim/lua/kickstart/plugins/debug.lua b/nvim/lua/kickstart/plugins/debug.lua index d4c267b..1572536 100644 --- a/nvim/lua/kickstart/plugins/debug.lua +++ b/nvim/lua/kickstart/plugins/debug.lua @@ -18,7 +18,7 @@ return { 'nvim-neotest/nvim-nio', -- Installs the debug adapters for you - 'williamboman/mason.nvim', + 'mason-org/mason.nvim', 'jay-babu/mason-nvim-dap.nvim', -- Add your own debuggers here diff --git a/nvim/lua/kickstart/plugins/lsp.lua b/nvim/lua/kickstart/plugins/lsp.lua index 3d308a7..6618993 100644 --- a/nvim/lua/kickstart/plugins/lsp.lua +++ b/nvim/lua/kickstart/plugins/lsp.lua @@ -19,8 +19,8 @@ return { 'neovim/nvim-lspconfig', dependencies = { -- Automatically install LSPs and related tools to stdpath for Neovim - { 'williamboman/mason.nvim', config = true }, -- NOTE: Must be loaded before dependants - 'williamboman/mason-lspconfig.nvim', + { 'mason-org/mason.nvim', config = true }, -- NOTE: Must be loaded before dependants + 'mason-org/mason-lspconfig.nvim', 'WhoIsSethDaniel/mason-tool-installer.nvim', -- Useful status updates for LSP. @@ -73,6 +73,15 @@ return { vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc }) end + -- Добавляем маппинг для hover с max_width = 80 + map('K', function() + vim.lsp.buf.hover { + max_width = 80, + -- none, single, double, rounded, solid, shadow + border = 'solid', + } + end, 'Hover Documentation') + -- Rename the variable under your cursor. -- Most Language Servers support renaming across files, etc. map('grn', vim.lsp.buf.rename, '[R]e[n]ame') diff --git a/nvim/lua/kickstart/settings.lua b/nvim/lua/kickstart/settings.lua index 8468af0..762a52d 100644 --- a/nvim/lua/kickstart/settings.lua +++ b/nvim/lua/kickstart/settings.lua @@ -81,13 +81,6 @@ vim.keymap.set('v', 'y', '"+y', { desc = '[Y]ank to system clipboard' }) vim.keymap.set('n', 'd', '"+d', { desc = '[D]elete to system clipboard' }) vim.keymap.set('v', 'd', '"+d', { desc = '[D]elete to system clipboard' }) --- Change `K` hover documentation size -vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(vim.lsp.handlers.hover, { - -- border = 'rounded', - max_width = 80, - -- max_height = 15, -}) - -- Move lines in visual mode vim.keymap.set('v', '', ":m '>+1gv=gv") vim.keymap.set('v', '', ":m '>+1gv=gv") @@ -201,11 +194,11 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the upper wi -- Highlight when yanking (copying) text -- Try it with `yap` in normal mode --- See `:help vim.highlight.on_yank()` +-- See `:help vim.hl.on_yank()` vim.api.nvim_create_autocmd('TextYankPost', { desc = 'Highlight when yanking (copying) text', group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }), callback = function() - vim.highlight.on_yank() + vim.hl.on_yank() end, })