-
Notifications
You must be signed in to change notification settings - Fork 20
WASM-based language server support #253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
It now suggests all keywords based on the context, so thats probably why tests failed. Not sure if this is false negative /shrug |
|
Thanks for trying to contribute. I have only skimmed the code for a bit. There's a few problematic things in there.
And please don't just give these prompts Claude, have a look at the stuff yourself. LLMs are incredibly bad at writing code for complex Rust codebases (they are great for other things though). I need all code to be removed that has nothing to do with WASM. Otherwise it's just not reviewable. It's probably easy for me to add WASM with Claude Code, but I have a bit higher standards than what LLMs typically provide. You are probably pretty young and are getting better at programming with LLMs. I just really want to encourage you to trust them less and try to think about the programs critically. There's a lot of non-obvious issues here, that are typical for LLMs.
Why? This just sounds like a broken implementation of LSP. |
|
Some environments like Pyodide does not fully support stuff like syscalls, and I think adding a method to "blacklist" unavailable symbols would debloat completion results. About the actual playground, "playground" here means a web version, this only provides the binary needed for powering a true playground. It would require something like |
|
Also this alters the behavior of UTF-16 chars, lemme revert that as well. |
No worries, take your time. I just wanted to make it clear that I want a clean solution, otherwise I will not merge.
That's the wrong approach. The
That's ok. These are just parameters to |
|
Ye, I'm refining the impl, |
f3ec99b to
befa201
Compare
wasm language server with a subset of capabilities, ty zubanls#137 for `local_fs_stub` & `memfs`
|
Imma try making a playground this week, it works with CodeMirror :D |
or anyone else has rights to this content. I here by grant to Dave Halter
(the owner of Zuban) a perpetual, worldwide, non-exclusive, no-charge,
royalty-free, irrevocable copyright license to reproduce, prepare derivative
works of, publicly display, publicly perform, sublicense, sell and distribute
my contributions and such derivative works.
This work is derived from #137 (as well as Claude) so I'm not sure whether to check the one above xD. This PR implements a working language server for WASM conforming to
LSP@3.17. I've tested internally with CodeMirror 6 and@codemirror/lsp-client, completions, hover definition, diagnostics, they are all functional as expected. All builtin stubs are embedded to the binary so the server itself should work out of the box.Current capabilities
initializeshutdowninitializedexittextDocument/didClosetextDocument/didSavetextDocument/didOpentextDocument/didChangetextDocument/completiontextDocument/hovertextDocument/definitiontextDocument/declarationtextDocument/typeDefinitiontextDocument/implementationtextDocument/referencestextDocument/signatureHelptextDocument/prepareRenametextDocument/renametextDocument/documentSymboltextDocument/diagnostictextDocument/inlayHintHaven't tested
inlayHintand stuff which navigates to other files.It also exposes
set_unavailablewhich marks symbols as unavailable, useful for environments like Pyodide where most syscalls aren't implemented.A playground is kinda out-of-scope here so there so it better be a dedicated project.