A VS Code extension — coding assistant for TAURI® apps.
Navigation, autocomplete, diagnostics, and symbols for commands and events.
In Tauri projects, it’s often difficult to quickly navigate between the frontend and the Rust backend and understand where a command is defined or called. This extension is designed to make that navigation fast and effortless, allowing you to jump between the frontend and backend parts of the project in both directions. As secondary features, the extension can also detect unused commands and help autocomplete command names while typing.
|
Navigation Go to Definition (F12) — Jump from frontend
Find References (Shift+F12) — See all usages across TS and Rust files. Smart CodeLens — Contextual buttons above commands/events for quick navigation. |
navigation-demo.mp4 |
|
Autocomplete Start typing inside |
autocomplete-demo.mp4 |
|
Diagnostics Real-time warnings for mismatched commands and events:
|
diagnostic-demo.mp4 |
|
Code Actions Quick fixes for undefined commands:
Note: Code actions are only available for commands |
code-action-demo.mp4 |
Workspace Symbols (Ctrl+T) — Search commands/events across entire project.
TARUS fully supports import aliases, a common JavaScript/TypeScript pattern:
import { invoke as myInvoke, emit as sendEvent } from "@tauri-apps/api/core";
// These will be correctly recognized
await myInvoke("my_command");
sendEvent("my_event");Generic type calls are fully supported:
// All these patterns work with navigation, autocomplete, and diagnostics
await invoke<number>("get_count");
await invoke<Session>("get_session", { id: 1 });
emit<void>("event_name");This extension contributes the following settings:
tarus.developerMode(boolean): Enables detailed logging and internal diagnostics (for extension developers). Requires VS Code restart. Default:false.tarus.referenceLimit(number): The maximum number of individual file links to show in CodeLens before summarizing them (e.g., '5 references'). Minimum value is 0. Default:3.
TARUS supports the following languages and frameworks:
| Language | Extensions | Features |
|---|---|---|
| Rust | .rs |
Command definitions (#[tauri::command]), event emit/listen |
| TypeScript | .ts, .tsx |
invoke(), emit(), listen(), generic calls (invoke<T>()) |
| JavaScript | .js, .jsx |
Same as TypeScript |
| Vue | .vue |
Script sections with TypeScript/JavaScript |
| Svelte | .svelte |
Script sections with TypeScript/JavaScript |
| Angular | .component.ts |
TypeScript in Angular components |
TARUS uses Tree-sitter for parsing source code. The parsing patterns are defined in .scm query files located in lsp-server/src/queries/:
| File | Description |
|---|---|
rust.scm |
Rust commands and events |
typescript.scm |
TypeScript/JavaScript calls |
javascript.scm |
JavaScript calls |
Query files use S-expression syntax to match AST patterns. Example from rust.scm:
; Match #[tauri::command] fn name()
(
(attribute_item
(attribute
(scoped_identifier
path: (identifier) @_attr_path
name: (identifier) @_attr_name)))
.
(function_item
name: (identifier) @command_name)
(#eq? @_attr_path "tauri")
(#eq? @_attr_name "command")
)If you need to support custom patterns (e.g., wrappers around Tauri APIs), you can modify the query files:
- Clone the repository
- Edit the relevant
.scmfile inlsp-server/src/queries/ - Rebuild the LSP server:
cargo build --release --manifest-path lsp-server/Cargo.toml - Replace the binary in
extension/bin/
Note: Query files are embedded at compile time, so changes require rebuilding the server.
MIT © 2026 mvoof
TAURI is trademark of [The Tauri Programme within the Commons Conservancy]