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

Triggers Won't Fire #17

Closed
JackYoungblood opened this issue Jun 22, 2020 · 7 comments
Closed

Triggers Won't Fire #17

JackYoungblood opened this issue Jun 22, 2020 · 7 comments

Comments

@JackYoungblood
Copy link

JackYoungblood commented Jun 22, 2020

Installed hypersnips 0.1.0 in Visual Studio Code:
Version: 1.46.1
Commit: cd9ea6488829f560dc949a8b2fb789f3cdc05f5d
Date: 2020-06-17T21:13:08.304Z
Electron: 7.3.1
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64 4.15.0-106-generic

VS Code reports that Hypersnips 0.1.0 is enabled globally.

I defined a file all.hsnips in $HOME/.config/Code/User/hsnips/all.hsnips
and copied the code examples from the README.md file.

I then exited out of VS Code and restarted it. I created a file named junk.js. I typed the command box, pressed tab nothing happened. I pressed the period and nothing happened. I did the same with dategreeting .

In the command Palette I see 3 commands related to Hypersnips but when I run Hypersnips: Open Snippets Directory I get the following error:
Command 'HyperSnips: Open Snippets Directory' resulted in an error (command 'hsnips.openSnippetsDir' not found) and corresponding errors for the other Hypersnips commands.

What can I do to determine why these triggers aren't firing?

Thanks,

@JackYoungblood
Copy link
Author

I'm thinking this might be an issue with the linux version of the extension. I just installed it on VSCode on Mac and it works fine. One thing I noticed is that when I installed the extension on Mac it automatically created the $HOME/Library/Application Support/Code/User/hsnips directory. When I installed on Linux it didn't do that.

@draivin
Copy link
Owner

draivin commented Jun 23, 2020

Sorry for the delay in getting to this issue, can you check if you can run those commands when you leave all.hsnips empty?

@draivin
Copy link
Owner

draivin commented Jun 23, 2020

Also, could you open the console at Help > Toggle Developer Tools, reload the extension and check if there are any errors logged over there?

@JackYoungblood
Copy link
Author

Also, could you open the console at Help > Toggle Developer Tools, reload the extension and check if there are any errors logged over there?

This is the error that showed in the console:

Activating extension 'draivin.hsnips' failed: Cannot find module './hsnippetInstance'
Require stack:
- /home/JackYoungblood/.vscode/extensions/draivin.hsnips-0.1.0/out/extension.js
- /usr/share/code/resources/app/out/vs/loader.js
- /usr/share/code/resources/app/out/bootstrap-amd.js
- /usr/share/code/resources/app/out/bootstrap-fork.js

@JackYoungblood
Copy link
Author

Sorry for the delay in getting to this issue, can you check if you can run those commands when you leave all.hsnips empty?

I ran the commands with an empty all.hsnips and the error was the same. I ran the command with no all.hsnips file and had the same error.

@draivin
Copy link
Owner

draivin commented Jun 23, 2020

Thanks, I see the issue now, it seems that once upon a time I renamed the file HSnippetInstance to hsnippetInstance, but never cleaned the builds, so the file was still named HSnippetInstance in the output folder. As windows has no filename case sensitivity this was not an issue, but when you run it on linux this happens.

Could you try version 0.1.1 and tell me how it goes?

@JackYoungblood
Copy link
Author

Thanks, I see the issue now, it seems that once upon a time I renamed the file HSnippetInstance to hsnippetInstance, but never cleaned the builds, so the file was still named HSnippetInstance in the output folder. As windows has no filename case sensitivity this was not an issue, but when you run it on linux this happens.

Could you try version 0.1.1 and tell me how it goes?

The works now. Thanks very much for the quick fix!

@draivin draivin closed this as completed Jun 23, 2020
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