Giter Site home page Giter Site logo

tauri-apps / tauri-vscode Goto Github PK

View Code? Open in Web Editor NEW
459.0 14.0 28.0 1.42 MB

Visual Studio Code Extension for Tauri apps development

Home Page: https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode

License: Apache License 2.0

TypeScript 100.00%
tauri vscode vscode-extension vscode-plugin

tauri-vscode's Introduction

Tauri VS Code Extension

Visual Studio Code Extension that adds support to Tauri commands and tauri.conf.json JSON validation.

Supported commands

It adds the init, deps, dev and build commands to the Command Palette.

JSON validation

The extension automatically pulls the latest config schema so VS Code can display documentation and autocomplete.

Contributing

Following the official guide, run yarn to install dependencies, yarn compile to build your changes and press F5 to open a new Extension Development Host window.

tauri-vscode's People

Contributors

amrbashir avatar dependabot[bot] avatar fabianlars avatar github-actions[bot] avatar hslee2008 avatar kimlimjustin avatar lucasfernog avatar renovate-bot avatar renovate[bot] avatar sekirocc avatar soorya-u avatar u-c-s avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tauri-vscode's Issues

Documentation

It's nice that there aren't any errors, but what all can be done with this extension?

Extension is trying to use npm instead of cargo?

Hi there,

When I run cargo tauri dev in the Terminal, my app starts correctly, but when I try using Tauri: Dev from the Command Palette, I get this output:

npm ERR! Missing script: "tauri"
npm ERR! 
npm ERR! To see a list of scripts, run:
npm ERR!   npm run

npm ERR! A complete log of this run can be found in: /Users/andrew/.npm/_logs/2024-01-22T17_16_56_539Z-debug-0.log
-----------------------

Is there a way to tell it to use cargo instead?

Syntax highlighting for invoked Tauri functions

I was wondering if it would be possible to add highlighting and hover documentation within the string argument of invoked functions. I may try working on this and see how possible it would be, and was wondering if this feature was looked into.

Release for VSCodium

I've recently successfully built this application, and I'm using it in VSCodium, a telemetry free variant of VSCode (differences). This variety uses open-vsx.org as extension store, see related issue.

I wanted to request the release of tauri-vscode on open-vsx too, since I think this extension can be helpful to more developers. There's also the point that VSCodium users have to build the extension manually ATM, which means they won't get notified about updates and have to always rebuild manually.

It would be nice to have this extension there too. There's also a GitHub action for automating this process with both stores.

Related Links:

Note: English is not my mother tongue, but I hope the text is understandable.

Getting error: Couldn't detect package manager for current project.

I'm very new to Tauri, and I was just trying out what the VSCode can do. However, when I execute any tauri command from the command palette, I'm simply getting the error: Couldn't detect package manager for current project.

(in lower right status):

image

The VSCode's output channel for tauri is empty, so no further hints there either.

The code for which I was trying the extension is: https://github.com/michalvavra/tauri-leptos-example

I might well be that I'm missing some prerequisite -- are they documented somewhere?

Autocomplete event names on JS side

JS relies heavily on strings which can lead to typo issues.
The idea would be to look for events that Rust emits in the code so we have a list of available events on JS side.
Maybe even show some error waves under invalid names like following

Rust
image

JS
image

Thanks to MGlolenstine for the idea. ๐Ÿ‘

Cannot run commands

Hi,

Not sure if I've set something up wrong or if it's an issue with running in this way.

I have a tauri project that works fine when running the tauri cli via npm in the way that the template tool creates it (eg npm run tauri dev) but when in a workspace with just that project, running the command "Tauri: Dev" from the command pallet gives the following error dialog:

Error dialog saying Command: 'Tauri: Dev' resulted in an error (command 'tauri.dev' not found)

A similar dialog shows for all the other commands too.
I have tried installing @tauri-apps/cli globally in case this was needed, but this doesn't seem to affect anything.

Setup:
Windows 11 with WSL running Ubuntu 20.04
npm: 8.11.0
node: v16.16.0
cargo: cargo 1.62.1 (a748cf5a3 2022-06-08)
rustc: rustc 1.62.1 (e092d0b6b 2022-07-16)
VSCode: 1.70.2
tauri-vscode: v0.1.6 Extension is enabled on 'WSL: Ubuntu-20.04'

Support for validation in Tauri.toml

This extension now supports validation for tauri.conf.json, but not for Tauri.toml.

It would be nice to be able to switch to toml since that's common practice in the Rust community so I think this is quite needed.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Other Branches

These updates are pending. To force PRs open, click the checkbox below.

  • chore(deps): update actions/setup-node action to v4
  • chore(deps): update peter-evans/repository-dispatch action to v3

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/covector-status.yml
  • actions/checkout v4
.github/workflows/covector-version-or-publish.yml
  • actions/checkout v4
  • tauri-apps/create-pull-request v3.4.1
  • peter-evans/repository-dispatch v1
.github/workflows/publish.yml
  • actions/checkout v4
  • actions/setup-node v3
  • HaaLeo/publish-vscode-extension v1
  • HaaLeo/publish-vscode-extension v1
.github/workflows/test.yml
  • actions/checkout v4
  • actions/setup-node v3
npm
package.json
  • axios 1.6.8
  • glob 10.3.12
  • run-in-terminal 0.0.3
  • strip-ansi 6.0.1
  • @types/node 18.19.31
  • @types/vscode 1.75.0
  • prettier 3.3.2
  • typescript 5.5.2
  • vscode ^1.75.0

  • Check this box to trigger a request for Renovate to run again on this repository

Activation extension 'tauri-apps.tauri-vscode' failed

Dev Tools log:

Activating extension 'tauri-apps.tauri-vscode' failed: Cannot find module 'concat-map'
Require stack:
- /Users/mike/.vscode/extensions/tauri-apps.tauri-vscode-0.1.6/node_modules/brace-expansion/index.js
- /Users/mike/.vscode/extensions/tauri-apps.tauri-vscode-0.1.6/node_modules/minimatch/minimatch.js
- /Users/mike/.vscode/extensions/tauri-apps.tauri-vscode-0.1.6/node_modules/glob/glob.js
- /Users/mike/.vscode/extensions/tauri-apps.tauri-vscode-0.1.6/out/extension.js
- /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js
- /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-amd.js
- /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-fork.js.
$onExtensionActivationError @ mainThreadExtensionService.ts:111

Env:

Version: 1.71.0 (Universal)
Commit: 784b0177c56c607789f9638da7b6bf3230d47a8c
Date: 2022-09-01T07:25:38.437Z (4 days ago)
Electron: 19.0.12
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Darwin x64 21.6.0
Sandboxed: No

Add option to use Cargo as package manager

Currently the extension has no support for using cargo as the package manager. This causes errors when using the commands with a pure Rust (Like with Yew) or vanilla project:

image

This could be detected either by the presence of Trunk.toml, Cargo.toml, or Cargo.lock in the project directory, or by the absence of any lock/package files for the other package managers.

Needs to stress the requirement on tauri-cli.

If tauri-cli is not installed, trying to run the Build and Dev actions display very misleading error about cargo.toml file missing. Either the extension needs to check for this, or at least add a reminder to install tauri-cli in the extension description. VSCode recommends this extension when opening a tauri project, so you may assume that some users are building tauri app for the first time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.