Comments (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:
-
Declare any function or variable inside of a top-level
do
block -
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)
- TODO: Add support for long strings
- TODO: Handle Anonymous functions correctly HOT 2
- TODO: Fix Ctrl + Arrow key movement while in a comment
- TODO: Add `varfn` to list of control flow symbols (fixes indentation)
- "janet.eval not found" when evaluating HOT 2
- Starting a new REPL by evaluating a form doesn't immediately evaluate the form
- `int/to-number` doesn't syntax highlight HOT 1
- Fix autoformatting of splice (`;`) shorthand HOT 1
- Error when I import a module (e.g. json) HOT 4
- TODO: Add support to set your own path to the janet language server in the system HOT 1
- LSP fails to start HOT 4
- Add Manual Restart Command for Janet LSP
- Issues with "evaluate expression" behavior HOT 3
- New local imports not picked up by the LSP HOT 6
- Wrong indentation for many macros with `& body` args HOT 2
- Completion suggests incomplete versions of private identifiers HOT 3
- Core lib functions, `os/posix-exec` and `os/posix-fork`, lack syntax highlighting HOT 1
- Bug: Deleting a top-level form crashes the LSP
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-janet-plus-plus.