m-demare / hlargs.nvim

Highlight arguments' definitions and usages, using Treesitter
GNU General Public License v3.0
472 stars 10 forks source link

Un-highlight arg when using marco without declaring in C #61

Closed hungnguyen1503 closed 1 year ago

hungnguyen1503 commented 1 year ago

Describe the bug When the macros aren't declared, the arguments are still highlighted.

Expected behavior Could you please support me with a config to fix it?

Screenshots or sample file image

System information

m-demare commented 1 year ago

Yeah treesitter often has trouble with macros. What are you using to grey out the undeclared macro? LSP tokens? If so, it's probably a highlight priority issue, you can probably fix it by lowering hlargs' priority:

require('hlargs').setup {
  ...
  hl_priority = 20,
}

Try playing around with the value a bit and see if that helps

hungnguyen1503 commented 1 year ago

Hi @m-demare,

My issue is fixed by your configuration. Thank you for your support.