Closed Vendicated closed 1 year ago
Yeah, actually theses could also be hex numbers, therefore the false positives. But I, of course, see your point. Maybe some options are possible, e.g.:
The "F" is difficult because the "l" is interpreted as "long" (maybe the check need to be extended that the "l" is not followed by something ...)
i think it is safe to assume that you can't call a number as a function... (well, in the screenshot it is a function declaration and not a call, but oh well, doesn't change much)
so maybe edit the regex here
/(?<!\w)[0-9a-fA-FbhxulULHB_]+\b(?!\()/
I haven't tested this regex that much, so please take it with a grain of salt.
My suggestion doesn't fix the false positives when declaring/using a variable though, and I doubt there is a language-agnostic way of doing that...
Maybe there could be an option for the mode: "lazy" and "strict".
I have thought about your original idea.
What about e.g.: "; Write to address 1000h(audio_port)." One could argue: there should be a space between h and (. But if not ...
Not sure if this problem can really be solved without more context.
Maybe simply fork the project and use an regex that fits better for you.
Do you mind if I close this issue?
This could also be configurable if someone needs this without prefix
In any case, it's wrongfully adding hovers to things like methods, and it would be cool to not have these false positives