You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not familiar with LPeg, but by adding a print(#range, range[1], range[2]) inside mt:range() here, those single range word seems don't even get parsed. 😕
Then the set logic for single range character starts to work 🎉
But I don't know why it works this way 🙈
Can anyone comment on my above suggested change?
If this is correct, I am going to open a PR. 🙂
Log File
No response
The text was updated successfully, but these errors were encountered:
tomlau10
changed the title
The set pattern for **single range char** is not working in glob
The set pattern for single range char is not working in glob
Jul 13, 2024
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Windows
What is the issue affecting?
Diagnostics/Syntax Checking
Expected Behaviour
I am testing the
glob
like pattern used inLua.doc.<scope>Name
, and the set pattern seems not working for single character..luarc.jsonc
test.lua
Actual Behaviour
aeiou
is not working as expectedReproduction steps
Use the provided snippet
Additional Notes
I know that the glob pattern syntax in defined using LPeg:
lua-language-server/script/glob/glob.lua
Lines 19 to 46 in ddc96bd
I am not familiar with LPeg, but by adding a
print(#range, range[1], range[2])
insidemt:range()
here, those single range word seems don't even get parsed. 😕lua-language-server/script/glob/matcher.lua
Lines 99 to 100 in ddc96bd
With a bit of testing, the
RangeUnit
definition seems should be changed from:to =>
Then the
set
logic for single range character starts to work 🎉But I don't know why it works this way 🙈
Can anyone comment on my above suggested change?
If this is correct, I am going to open a PR. 🙂
Log File
No response
The text was updated successfully, but these errors were encountered: