intersystems / language-server

Repository for the VS Code Language Server
https://marketplace.visualstudio.com/items?itemName=intersystems.language-server
Other
16 stars 6 forks source link

Completion list after `..` doesn't offer classmethods #326

Closed gjsjohnmurray closed 7 months ago

gjsjohnmurray commented 7 months ago
Class YJM.Class1 Extends %RegisteredObject
{

/// A classmethod
ClassMethod MyClassMethod() As %Status
{
    Set sc = $$$OK
    // do something
    Return sc
}

/// An instance method
Method MethodName() As %Status
{
    // Completion list after .. doesn't offer classmethods even though the syntax is legal
    w ..MyClassMethod()

    // Completion list after ##class(...). correctly offers only classmethods
    w ##class(YJM.Class1).MyClassMethod()

    Set sc = $$$OK
    // do something
    Return sc
}

}
isc-bsaviano commented 7 months ago

@gjsjohnmurray Thanks for reporting this. I think this has been a bug since the first release. If the context is "instance" I only show properties and instance methods. I probably need to show all methods, properties and parameters.

isc-bsaviano commented 7 months ago

@gjsjohnmurray You can test this fix using beta 16 if you want.

gjsjohnmurray commented 7 months ago

Thanks. Looks good to me.