Skip to content

Commit 4698656

Browse files
committed
refactor: change tool and var highlighting to use {} syntax
1 parent 2e69bfe commit 4698656

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lua/mcphub/extensions/codecompanion/variables.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ function M.update_variable_syntax(resources)
9999
vim.api.nvim_buf_call(bufnr, function()
100100
for _, resource in ipairs(resources) do
101101
local uri = resource.uri
102-
vim.cmd.syntax('match CodeCompanionChatVariable "#' .. uri .. '\\(\\ze\\s\\|\\ze$\\)"')
102+
vim.cmd.syntax('match CodeCompanionChatVariable "#{' .. uri .. '}"')
103+
vim.cmd.syntax('match CodeCompanionChatVariable "#{' .. uri .. '}{[^}]*}"')
103104
end
104105
end)
105106
end

0 commit comments

Comments
 (0)