Code Monkey home page Code Monkey logo

Comments (1)

CFiggers avatar CFiggers commented on July 1, 2024 1

At present, Janet LSP (the embedded language server that provides both autocompletion and diagnostic errors for Janet++) is too simple to provide any autocompletion or hover documentation on scoped variables at all.

You can test this yourself:

  1. Declare any function or variable inside of a top-level do block

  2. Try to trigger autocomplete or hover documentation on that variable

=> It won't work

The reason for this is simple. Janet LSP is not a full-fledged static analyzer for Janet—it merely uses a Janet runtime to evaluate forms and return parser/compiler errors as raised by Janet itself.

Since Janet itself scopes variables properly (as you would expect it to—def'ing a variable inside a do block at the REPL will not add that variable to the top-level environment either) Janet LSP does not have the ability to recognize scoped symbols and return them to autocomplete requests.

Better behavior on this is definitely something I'd like to see and will at some point work towards. That said, this one might sit open for a while (feel free to hack on Janet LSP directly—it's written in Janet!).

from vscode-janet-plus-plus.

Related Issues (19)

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.