How to conceal text on a specific window

Hi,
I have created a minimal version of ThePrimeagen/harpoon. I have a floating window where I display a list of files that were been marked. Currently I have two functions that transform the paths from relative to absolute but I would like to instead put into the buffer directly the absolute path and then conceal the cwd and make the path relative. The behavior is basically identical at what justinmk/vim-dirvish is doing, but I can’t find a way to make syntax match work.

For context:

  • I set conceallevel=2
  • I would like to have a solution in lua
  • I don’t think I can use treesitter to query it since is just a buffer without any filetype