vscode-wit icon indicating copy to clipboard operation
vscode-wit copied to clipboard

[WIP] Implement LSP

Open cardoso opened this issue 1 year ago • 2 comments

Closes #3

Super WIP, but thought it might be good to have some initial feedback on the approach.

For now, https://github.com/bytecodealliance/wasm-tools is used, but I'm thinking about adding support for https://github.com/bytecodealliance/cargo-component since currently it has its own logic for resolving wit packages, which seems to have some advantages.

To test it out, have a recent version of wasm-tools installed, run npm install, npm start & reload the vscode window.

Preview

Diagnostics

Screenshot 2023-06-11 at 02 24 27

Hover

Screenshot 2023-06-11 at 11 13 44

TODO

  • [ ] lint correctly when inside deps folder
  • [ ] allow configuring problem matcher & pattern
  • [ ] run wit-deps when appropriate
  • [ ] clean up package.json scripts
  • [ ] clean up changes as much as possible

cardoso avatar Jun 11 '23 11:06 cardoso