Giter Site home page Giter Site logo

vscode-shadowenv's Introduction

Shadowenv for Visual Studio Code

This extension adds support for Shadowenv to VS Code, including:

  • Auto-load the environment if the directory is trusted
  • Prompt to trust the directory if not already trusted
  • Auto-detect creation, change, and deletion of Shadowlisp, reloading the environment.

Prerequisites

This extension needs Shadowenv installed to work. Please see the Shadowenv documentation for more details.

Install

Via Quick Open:

  1. Download, install and open VS Code
  2. Press cmd+p to open the Quick Open dialog
  3. Type ext install shadowenv
  4. Click the Install button, then the Enable button

Via the Extensions tab:

  1. Click the extensions tab or press cmd+shift+x
  2. Search for shadowenv
  3. Click the Install button, then the Enable button

Via the command line:

  1. Open a command-line prompt
  2. Run code --install-extension Shopify.vscode-shadowenv

Usage

The following describes the usage of this extension that is automatically enabled each time you open up VS Code.

Commands

In order to run a command press cmd+shift+p to view the Command Palette. There type:

  • shadowenv trust to trust and load the local Shadowenv
  • shadowenv --version to view the current shadowenv version

Contribute

For any bugs and feature requests please open an issue. For code contributions please create a pull request. Enjoy!

Releasing

  1. Make sure you bump the version in package.json, update the CHANGELOG.md
  2. Tag the new version
  3. log in to or create account on dev.azure.com
  4. Get @burke or someone else who has done a release to add you to the Shopify publisher (https://marketplace.visualstudio.com/manage/publishers/Shopify)
  5. Click the "I already have an account" button; don't go to portal.azure.com
  6. Click the settings icon right next to your avatar after logged in; Personal Access Tokens
  7. New Token > All Accessible Organizations, Full access
  8. npm config set prefix ~/nodewhatever
  9. npm install -g vsce
  10. ~/nodewhatever/bin/vsce package
  11. vsce login Shopify (then paste token)
  12. vsce publish

vscode-shadowenv's People

Contributors

burke avatar cursedcoder avatar dependabot[bot] avatar drinkbeer avatar lavoiesl avatar movermeyer avatar shanesmith avatar

Stargazers

 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  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

vscode-shadowenv's Issues

vscode-shadowenv may load after other extensions

If you open a folder through vscode rather than code ., vscode-shadowenv may not set up the environment before other extensions start getting enabled. This can lead to environment issues. This is especially apparent with the Go plugin, where it may end up picking the incorrect version of Go if vscode-shadowenv doesn't start in time.

If you disable the Go extension, reload, wait for vscode-shadowenv to finish, and then enable the Go extension, it seems to load fine (it least picks the correct version).

I'm not sure if this is solveable without something like microsoft/vscode#57481

shadowenv error

Hi,

I got shadowenv error like screenshot below when booting.

image

Why this error is reported and how can I resolve it?

vscode version info:

バージョン: 1.77.1 (system setup)
コミット: b7886d7461186a5eac768481578c1d7ca80e2d21
日付: 2023-04-04T23:21:11.906Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Windows_NT x64 10.0.22621
Sandboxed: No
Ruby LSP version: v0.2.3

It's causing an error

Type: Bug

Just booting up VS-vode

Extension version: 0.1.1
VS Code version: Code 1.77.3 (Universal) (704ed70d4fd1c6bd6342c436f1ede30d1cff4710, 2023-04-12T09:19:37.325Z)
OS version: Darwin arm64 22.4.0
Modes:
Sandboxed: No

System Info
Item Value
CPUs Apple M2 (8 x 24)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) 37, 12, 6
Memory (System) 8.00GB (0.50GB free)
Process Argv --crash-reporter-id 9541f94c-63c0-45f0-91e8-342e5f34951d
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscorecescf:30445987
pythondataviewer:30285071
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
vscaat:30438848
vsclangdc:30486549
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyone:30548225
vscccc:30610679
nodejswelcome1cf:30587006
2e4cg342:30602488
pyind779:30671433
89544117:30613380
pythonsymbol12:30671437
a9j8j154:30646983
vsccsb:30705552
azdwalk:30687957
pythonms35:30701012
pythonfmttextcf:30716743

Breaks after refresh as of latest version

It seems like the issue is that process.env gets clobbered, but our previous store for shadowenv_data would persist and make things continue to work.

The easiest solution would probably be to continue to store __shadowenv_data in that off-to-the-side variable rather than the process env, but we also likely want it in the process env.

Shadowenv not always executed when opening a terminal

Scenarios:

  • Open VSCode from the Dock => Result: works as expected
  • Open VSCode from command line using code . ==> Result: Shadowenv not initialized properly need to cd .. & cd <project> to initialize.
  • Split terminal ==> Result: Shadowenv not initialized properly need to cd .. & cd <project> to initialize.

Looks like we're missing some triggers for some situations

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.