bajrangCoder/acode-react-snippets

Plugin not working

Closed this issue · 10 comments

I've tried using the plugin but it doesn't seem to work. Typing the snippet doesn't bring up any suggestions. Are there extra configuration I have to set before it starts to work?

snippets.mp4

Acode version: 1.8.7

Change the mode to jsx from pencil(✏️) icon

The original file is a jsx file, but I still renamed it using the ✏️ icon as you suggested but it's still not working.

I mean check the mode your file, is it set to jsx or tsx?

Because this plugin only adds snippet in jsx and tsx mode

How do I check my file mode?

From ✏️ > Syntax Highlighting

Thanks it worked. Will there be a future update to support .js files?

That's intentionally not added for .js

Because there are a lot of snippets and completions already available for javascript mode and if I will add this to them it might be start lagging

Btw it's not hard to add .js or .ts etc it can be added with a single line

Alright. I'm just asking because I've added some vanilla JavaScript snippets to the plugin. But since I'm not familiar with the ace editor, I don't know how to configure it to pick up those snippets. I'll create a pull request once I'm done so you can review it.

Yes, you can add those snippets but make sure to add javascript in file type option then only it will work in javascript mode and also its not hard to create snippet, you just have to add your prefix, snippet, etc in snippets.ts of this plugin

fileTypes: ["jsx", "tsx"]

Alright, thanks for the help.