From 3df003abb53fc684ffe5d38da7370cc451f48462 Mon Sep 17 00:00:00 2001 From: Evan Purkhiser Date: Tue, 7 Apr 2026 15:09:03 -0400 Subject: [PATCH] fix: replace deprecated vim.highlight and vim.validate calls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - vim.highlight.priorities → vim.hl.priorities (deprecated in nvim 0.12) - vim.validate({name = {val, type}}) → vim.validate(name, val, type) (deprecated in nvim 1.0) --- lua/git-conflict.lua | 2 +- lua/git-conflict/colors.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/git-conflict.lua b/lua/git-conflict.lua index 7e22434..76551dd 100644 --- a/lua/git-conflict.lua +++ b/lua/git-conflict.lua @@ -108,7 +108,7 @@ local ANCESTOR_HL = 'GitConflictAncestor' local CURRENT_LABEL_HL = 'GitConflictCurrentLabel' local INCOMING_LABEL_HL = 'GitConflictIncomingLabel' local ANCESTOR_LABEL_HL = 'GitConflictAncestorLabel' -local PRIORITY = vim.highlight.priorities.user +local PRIORITY = vim.hl.priorities.user local NAMESPACE = api.nvim_create_namespace('git-conflict') local AUGROUP_NAME = 'GitConflictCommands' diff --git a/lua/git-conflict/colors.lua b/lua/git-conflict/colors.lua index d37e938..f851f5f 100644 --- a/lua/git-conflict/colors.lua +++ b/lua/git-conflict/colors.lua @@ -9,7 +9,7 @@ local rshift, band = bit.rshift, bit.band --@param rgb_24bit (number) 24-bit RGB value --@returns (table) with keys 'r', 'g', 'b' in [0,255] local function decode_24bit_rgb(rgb_24bit) - vim.validate({ rgb_24bit = { rgb_24bit, 'n', true } }) + vim.validate('rgb_24bit', rgb_24bit, 'number', true) local r = band(rshift(rgb_24bit, 16), 255) local g = band(rshift(rgb_24bit, 8), 255) local b = band(rgb_24bit, 255)