Open p00f opened 2 years ago
Currently all symbols are taken as references https://github.com/nvim-treesitter/nvim-treesitter/blob/1d66657e6d0f1f8f79ddc48ff1dac9788694cc2d/queries/fennel/locals.scm#L24-L24
Is a quoted symbol nothing related to a variable/reference? or is it just a like a different subset? I'm not familiar with fennel, so not sure the correct solution here.
Quoted symbols are inserted as-it-is at the time of macro expansion For example compare the expansion of p1 and p2
p1 expands to (print n)
because n is inside the quoted form
`(print n)
p2 expands to (print 1)
because n
is unquoted and gets replaced by the actual argument given (n=1)
`(print ,n)
i.e. a quoted variable is not the same as the argument
From https://fennel-lang.org/macros
Symbols inside a quoted form remain as symbols. Symbols in an unquoted form (like
,condition
and,body
above) are evaluated meaning they are replaced with whatever value they have in the code at that point.
Before reporting
:TSUpdate
Describe the bug
quoted symbol
n
is highlighted by the refactor.highlight_defintions moduleTo Reproduce
N/A
Expected behavior
quoted symbols and not-unquoted symbols in quoted lists should not be taken into account for locals
Output of
:checkhealth nvim-treesitter
Output of
nvim --version
Additional context
No response