From 6635ed588b0b5b54ba86e1c751d2ab3c49133c80 Mon Sep 17 00:00:00 2001 From: Oscar Wallberg Date: Fri, 10 Apr 2026 18:42:18 +0200 Subject: [PATCH] fix: address deprecations --- lua/plugins/nvim-tree.lua | 6 +++--- lua/util.lua | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/plugins/nvim-tree.lua b/lua/plugins/nvim-tree.lua index f572b87..d43b9de 100644 --- a/lua/plugins/nvim-tree.lua +++ b/lua/plugins/nvim-tree.lua @@ -39,10 +39,10 @@ vim.keymap.set("n", "tt", function() end) ---@class nvim_tree.api.decorator.UserDecorator -local UserDecorator = require("nvim-tree.api").decorator.UserDecorator +local Decorator = require("nvim-tree.api").Decorator ---@class GitIgnoreDecorator: nvim_tree.api.decorator.UserDecorator -local GitIgnoreDecorator = UserDecorator:extend() +local GitIgnoreDecorator = Decorator:extend() function GitIgnoreDecorator:new() self.enabled = true @@ -81,7 +81,7 @@ require("nvim-tree").setup({ end local api = require("nvim-tree.api") - api.config.mappings.default_on_attach(bufnr) + api.map.on_attach.default(bufnr) vim.keymap.del("n", "D", { buffer = bufnr }) vim.keymap.del("n", "bt", { buffer = bufnr }) diff --git a/lua/util.lua b/lua/util.lua index 8a1fffc..89dabf7 100644 --- a/lua/util.lua +++ b/lua/util.lua @@ -205,7 +205,7 @@ function Util.format(opts) local new_lines = vim.split(output:gsub("\r\n", "\n"), "\n", { plain = true }) - local diff = vim.diff( + local diff = vim.text.diff( table.concat(old_lines, "\n"), table.concat(new_lines, "\n"), { result_type = "indices", algorithm = "histogram" }