Tips for better dev experience with dataviewjs

Hello,
New to Obsidian and I have a long list of things I want to dev in my vault with dataviewjs.

But the problem, programming code blocks in obsidian is a real pain. No autocompletion for basic js functions, no automatic formatting and so on.
I spent all day working on a 200-lines block note.
I’d like to know if there are any solutions for creating my scripts more quickly on real code editors.

In my opinion, developing in obsidian is just generally not the nicest thing, since it simply does not have the advantages a lot of other code editors offer (such as vsCode or Atom, etc.). I know this is not the answer you are looking for, but you might be best of developing in those editors, and copy pasting your code to your dataviewjs block when you are done. But if anyone else has a good dev flow in obsidian feel free to correct me!

Sorry for a late response, but in recent version of Obsidian and the Dataview plugin, we at least got syntax highlighting which makes it a little bit easier.

However, the main reason I wanted to respond is to suggest using dv.view() script for larger code blocks. This has a few advantages which might help you a lot. First of all, it reduces the foot print in the note having the call to dv.view(), since there it could look like `$= await dv.view(“My genious script”) `.

But secondly, and this is the main point, this would refer to a pure javascript file at a location of your choice, and this file you could easily maintain using a code editor like VS Code or similar. And since you’re calling it through this syntax, you wouldn’t need to copy code back-and-forth either. See link Codeblock Reference - Dataview for a little documentation.