clemos / haxe-sublime-bundle

Sublime Text bundle for Haxe programming language
Apache License 2.0
237 stars 85 forks source link

No completion for base class fields #152

Closed korinVR closed 10 years ago

korinVR commented 10 years ago

Sublime Text 3 Build 3059 / Haxe 3.1.3

I don't know whether this is the compiler related or the plugin related.

(Person.hx)

class Person
{
    var name:String;
    var age:Int;

    public function new() {
        // typing 'n' here suggests 'name'
        // typing 'a' here suggests 'age'
        // typing 'h' here suggests 'hello'
    }

    public function hello() {
    }
}

(Ninja.hx)

class Ninja extends Person
{
    public function new() {
        super();

        // typing 'n' here does not suggest 'name'
        // typing 'a' here does not suggest 'age'
        // typing 'h' here does not suggest 'hello'
    }
}
clemos commented 10 years ago

Hi, This is primarily a limitation of the Haxe compiler, since it only provide completion info after . or ( symbols, no "toplevel completion" of any kind.

You can always use this.| to get available members; I thought about doing it 'under the hood' for some time.

But the compiler team is developing new toplevel completion features, as mentionned here : https://github.com/clemos/haxe-sublime-bundle/issues/129, so I'll add support for that soon, as I believe it has not been released yet.

Best