Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension doesn't show up in Extensions #10

Closed
saikyun opened this issue Jan 25, 2023 · 6 comments
Closed

Extension doesn't show up in Extensions #10

saikyun opened this issue Jan 25, 2023 · 6 comments

Comments

@saikyun
Copy link

saikyun commented Jan 25, 2023

After having cloned the repo into ~/.vscode/extensions it doesn't show up in my Extensions tab, so I can't enable it.

Looked around in vscode docs but couldn't find a way to enable it outside generating some sort of installation file.

@sogaiu
Copy link

sogaiu commented Jan 25, 2023

I think it's possible vscode may be different now.

I also experienced similar results trying the instructions in the README.

Here's what worked for me:

  • Ensure Node.js >= 14 is available (I tried nvm, but volta -- available via brew too -- should also work IIUC) -- a 12.x series Node.js didn't work for me
  • git clone https://github.com/janet-lang/vscode-janet
  • cd vscode-janet
  • npm install
  • npm install vsce
  • vsce package
  • start vscode (or vscodium)
  • File -> Preferences -> Extensions
  • In the EXTENSIONS tab(?), click on the ... at the right (see the image below)
  • Choose "Install from VSIX..."
  • Find and select the .vsix file - here it was vscode-janet-0.0.2.vsix and it was in the vscode-janet folder where the vsce package invocation was done

Surely it would be nicer to have fewer steps or have it be more automated [1]. May be there is a way. I think there used to be [2].

install-from-vsix


[1] Looks like one can do the following sort of thing via the command line:

codium --install-extension vscode-janet-0.0.2.vsix

For vscode, the command line executable name might be code. Not sure.

[2] Some discussion here...

@sogaiu
Copy link

sogaiu commented Jan 25, 2023

There is sort of an alternative method that goes like this:

  • Open vscode (or vscodium)
  • Open the vsode-janet folder in the program
  • Choose Run -> Run without Debugging

I think that should open a new window with the extension running.

Perhaps this is meant for development of the extension itself.

@saikyun
Copy link
Author

saikyun commented Jan 26, 2023

Thanks, the steps worked other than having to do npm install -g vsce. Couldn't remember how to run it from the local install. :)

@saikyun saikyun closed this as completed Jan 26, 2023
@sogaiu
Copy link

sogaiu commented Jan 27, 2023

@saikyun Good to hear things are working for you.


On a side note, may be you are aware of this already, but FWIW, for npm / node stuff, I believe one can get into trouble using -g. In the npm / node world where backward compatibility doesn't seem to be such a priority and there is a lot of change, using project-specific things via npx seems like less trouble to me.

@saikyun
Copy link
Author

saikyun commented Jan 27, 2023 via email

@sogaiu
Copy link

sogaiu commented Jan 27, 2023

I think what I did was:

cd vscode-janet
npm install vsce
npx vsce package

npx is our friend :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants