From 7aa5ef43bde8fe8dc4e489e96a84d4ffb3091b3e Mon Sep 17 00:00:00 2001 From: Kyer Potts Date: Sun, 23 Aug 2026 17:42:36 +0800 Subject: [PATCH] fix: preserve Rust derive highlight --- lua/vulkanite/groups/semantic_tokens.lua | 1 + test/vulkanite_spec.lua | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/lua/vulkanite/groups/semantic_tokens.lua b/lua/vulkanite/groups/semantic_tokens.lua index b3a9f8b..c8b4c2a 100644 --- a/lua/vulkanite/groups/semantic_tokens.lua +++ b/lua/vulkanite/groups/semantic_tokens.lua @@ -61,6 +61,7 @@ function M.setup(colors, opts) ["@lsp.typemod.class.defaultLibrary"] = { link = "Type" }, ["@lsp.typemod.type.defaultLibrary"] = { link = "Type" }, ["@lsp.typemod.namespace.defaultLibrary"] = { link = "@module.builtin" }, + ["@lsp.typemod.namespace.attribute"] = { link = "@module" }, ["@lsp.typemod.enumMember.readonly"] = { link = "Constant" }, } end diff --git a/test/vulkanite_spec.lua b/test/vulkanite_spec.lua index 35b3cc5..0336336 100644 --- a/test/vulkanite_spec.lua +++ b/test/vulkanite_spec.lua @@ -427,6 +427,11 @@ local function run() "readonly variables preserve the variable style" ) assert_link_or_fg("@lsp.type.decorator", "Special", "decorators use the special syntax role") + assert_eq( + vim.api.nvim_get_hl(0, { name = "@lsp.typemod.namespace.attribute", link = true }).link, + "@module", + "Rust attributes preserve the namespace color" + ) assert_eq( vim.api.nvim_get_hl(0, { name = "LspKindSnippet" }).fg, 0x9083b9,