WebAssembly Language Tools aims to provide and improve the editing experience of WebAssembly Text Format. It also provides an out-of-the-box formatter (a.k.a. pretty printer) for WebAssembly Text Format.
Code Completion
Go to Definition
Find References
Hover
Rename
Document Symbols
Diagnostics
Inlay Hint
Code Action
Formatting
Semantic Highlighting
Call Hierarchy
Signature Help
We've provided pre-built binaries on GitHub Releases. You can download it according to your platform, then extract it from the compressed file.
Or, if you've installed Rust, you can run Cargo to install it globally:
cargo install wat_server
- Visual Studio Code: Install the WebAssembly Language Tools extension.
- Neovim: Built-in support in nvim-lspconfig:
require("lspconfig").wasm_language_tools.setup({ -- `settings` section is optional settings = { format = {}, lint = {} }, })
- Zed: Install the WebAssembly Text Format extension.
- Helix: Add the following lines to
<config_dir>/helix/languages.toml
:[language-server.wasm-language-tools] command = "wat_server" # or the absolute path to the binary args = [] config = { format = {}, lint = { unused = "warn" } } # this section is optional [[language]] name = "wat" language-servers = ["wasm-language-tools"]
MIT License
Copyright (c) 2024-present Pig Fang