Closed gnikit closed 2 years ago
So the origin of this is from expand_name
and more specifically the WORD_REGEX
that requires a a-z
character to return a match. I believe the right solution in this case would be to retry with a NUMBER_REGEX after the WORD_REGEX and then return.
Update, this is substantially harder than what I originally thought mostly because after having implemented the regex to return the number variable we still need to retrieve it's caller's object which is done through
LangServer>get_definition>find_in_scope
The problem is that technically speaking, a number e.g. 10000
is not an implicit variable so it cannot be detected in the scope and hence find_in_scope
will return None
, instead we would want it to return the scope of its child.
When you call a function/subroutine and pass a number as an input argument fortls does not display the type that is supposed to be matching on the said function/subroutine, which at time can be confusing.
Therefore, hovering over
1
incall test(start, 1, finish)
will generate no hover message, in this specific case it should beinteger, intent(in) :: something
and will also produce the following log in fortls