Things I have tried
Added a folder
MaDo/TemplaterScripts and configured it in Templater → Options. Added some user scripts into this folders, but Templater says “No user scripts found”, which turns out to be because my script file got the secondary extension of
Failed miserably. The plugin wasn’t found in the community browser, and when I tried bluntly to copy it into the plugin folder, it failed loading. Not quite ready for installing, it seems.
This kind of works, it seems after adding
js as an extension. However, I’m not able to make new files with just the
.js extension. So some tinkering in the command prompt is still needed, alas.
So I then renamed my script file, outside of Obsidian, and of course it disappeared within the file explorer of Obsidian. But now it appears as a proper user script function.
What I’m trying to do
While you can do it, it’s a lot more fun (and free) to use VSCode instead. That way you get full syntax highlighting, code completion, hinting, linting, all the bells and whistles.
You can “Open Folder” within VSCode, and have your whole Obsidian vault and file structure all there inside the file explorer.
I’m a coder by profession, so I’m well familiar with VS Code, but I’m not very keen on changing programs all the time, so if possible I would love to do it within Obsidian.
Although it’s a bit of a pain to debug stuff using Templater (and trying to call
dataviewjs stuff at the same time)
So after some further testing, and sadly not too much response in this thread, I found that using Plaintext for Obsidian, is doing the trick for now. I’m missing a proper syntax highlighting directly from the plugin, but I’ve commented on a feature request regarding that, so hopefully it’ll come.
The main downside to this solution, is two-folded:
- My syntax highlight is not automatic, so after changes, I need to hit a button again.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.