Code Monkey home page Code Monkey logo

Comments (7)

SuperAuguste avatar SuperAuguste commented on June 1, 2024 1

I actually had this exact same thought 1 hour ago and fixed this in one of the recent commits, which should be pushed! If you pull the most recent version of zls, you should not get private decls showing up in import statements!

from zls.

Vexu avatar Vexu commented on June 1, 2024 1

Ah, I didn't notice. This is coming together so quickly. Works correctly after updating to master.

from zls.

SuperAuguste avatar SuperAuguste commented on June 1, 2024 1

This should now be fixed thanks to @alexnask's PR! Can you tell us if this is the intended behavior you expect? Thanks! 🎉

from zls.

Vexu avatar Vexu commented on June 1, 2024

Now the issue is that private declarations in the same file are not completed.

const foo  = struct {
    var a = 1;
    pub var b = 2;
};
test "" {
    foo. // only b shows up
}

Also visib_token can only ever be pub so we can just check visib_token != null.

from zls.

SuperAuguste avatar SuperAuguste commented on June 1, 2024

Isn't this the correct behavior?

from zls.

Vexu avatar Vexu commented on June 1, 2024

Isn't this the correct behavior?

No, pub is only needed when accessing declarations in different files.

from zls.

Vexu avatar Vexu commented on June 1, 2024

Works as expected now.

from zls.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.