-
Notifications
You must be signed in to change notification settings - Fork 55
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
VSCode plugin #408
Comments
After some investigation, VSCode doesn't seem to support native modules, so I'll probably integrate with the CLI. |
By native modules, are you in this case talking about sqlite3 (basically, this issue)? I have had others report issues with this dependency as well. See e.g. Galooshi/atom-import-js#18 I've been trying to find a good-enough alternative that doesn't require native builds (and with that easier to install). If you know of one, that could be a good place to start, replacing sqlite with something js-only. The |
Yup, that's the issue. As far as I can tell, VSCode doesn't actually I'm not that familiar with persistence libs for node, so I'm not sure if there's something suitable out there. I don't know of any that support multiple processes reading/writing. But I think integrating against the CLI is a fine place to start, so I'll probably go ahead with that for now. It also has the advantage that there's only one import-js API to maintain (no JS API). What do you think? |
Yeah, sounds good. The js api isn't ideal as well, it was sort of hacked together to quickly support the atom plugin |
Hey there, user from the sqlite3 issue. I got my version of the plugin to work on my computer, but sadly couldnt find a solution for other builds (like a generic script to build against the right target). I added this script to my package.json
following advice from this repo https://github.com/bytheway/electron-sqlite3 But yeah, I did not find much else about compiling modules for vscode |
It's a work in progress, but here's what I have so far: https://github.com/dabbott/vscode-import-js You can install it from the VS Code marketplace. Just search "importjs". I wasn't able to call some of the CLI commands from VS Code (possibly env/path issues?), so instead I based it off the sublime plugin. |
I was checking your code earlier today and found it interesting (had hope I could borrow some ideas from it haha). Unfortunally I think this approach wont work for the extension I was working I was messing around trying to add sqlite support to the vscode-database extension, it's working for me, but as it's now, I don't think it's practical to merge my fork of it. |
I'm going to write a VSCode plugin for import-js, unless someone else has already written one.
After talking with @lencioni, it sounds like there are two approaches: import the
import-js
package directly as a dependency (like the Atom plugin), or have the user install vianpm i -g import-js
and integrate with the CLI (like the Sublime plugin). I tend to prefer the Atom plugin, since it's simpler for the user, so I'm planning to base the VSCode plugin off the Atom plugin.The text was updated successfully, but these errors were encountered: